Merge pull request #96 from antmicro/clockentry-api

Update Renode models with new ClockEntry API
This commit is contained in:
Sean Cross 2022-02-04 11:40:41 +08:00 committed by GitHub
commit 459a61a2c9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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();
}