Update Renode models with new ClockEntry API

This commit is contained in:
Piotr Zierhoffer 2022-02-04 04:04:37 +01:00
parent fcb67d5d16
commit e21e55807e
4 changed files with 5 additions and 5 deletions

View file

@ -28,7 +28,7 @@ namespace Antmicro.Renode.Peripherals.I2C
dataFromSlave = new Queue<byte>();
IRQ = new GPIO();
irqTimeoutCallback = new ClockEntry((ulong)5, ClockEntry.FrequencyToRatio(machine, 1000), this.FinishTransaction, machine, "Irq Scheduler");
irqTimeoutCallback = new ClockEntry((ulong)5, 1000, this.FinishTransaction, machine, "Irq Scheduler");
var registersMap = new Dictionary<long, DoubleWordRegister>()
{

View file

@ -27,7 +27,7 @@ namespace Antmicro.Renode.Peripherals.I2C
dataFromSlave = new Queue<byte>();
IRQ = new GPIO();
irqTimeoutCallback = new ClockEntry((ulong)5, ClockEntry.FrequencyToRatio(machine, 1000), this.FinishTransaction, machine, "Irq Scheduler");
irqTimeoutCallback = new ClockEntry((ulong)5, 1000, this.FinishTransaction, machine, "Irq Scheduler");
var registersMap = new Dictionary<long, DoubleWordRegister>()
{

View file

@ -19,7 +19,7 @@ namespace Antmicro.Renode.Peripherals.Timers
{
public BetrustedWatchdog(Machine machine) : base(machine)
{
machine.ClockSource.AddClockEntry(new ClockEntry(10, ClockEntry.FrequencyToRatio(this, 1000), OnTick, this, String.Empty));
machine.ClockSource.AddClockEntry(new ClockEntry(10, 1000, OnTick, this, String.Empty));
var registersMap = new Dictionary<long, DoubleWordRegister>()
{
{(long)Registers.Watchdog, new DoubleWordRegister(this)
@ -103,4 +103,4 @@ namespace Antmicro.Renode.Peripherals.Timers
State = 0x8,
}
}
}
}

View file

@ -23,7 +23,7 @@ namespace Antmicro.Renode.Peripherals.Timers
{
public TickTimer(Machine machine, ulong periodInMs = 1) : base(machine)
{
machine.ClockSource.AddClockEntry(new ClockEntry(periodInMs, ClockEntry.FrequencyToRatio(this, 1000), OnTick, this, "TickTimer"));
machine.ClockSource.AddClockEntry(new ClockEntry(periodInMs, 1000, OnTick, this, "TickTimer"));
this.IRQ = new GPIO();
DefineRegisters();
}