mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-15 08:30:02 +00:00
emulation: fix renode compatibility for peripherals
Many of the devicse have changed from `uint` to `ulong`, so forward-port the peripherals to work with the new format. Signed-off-by: Sean Cross <sean@xobs.io>
This commit is contained in:
parent
eb33af53e0
commit
5c52fbd522
5 changed files with 7 additions and 8 deletions
|
|
@ -148,7 +148,7 @@ namespace Antmicro.Renode.Peripherals.SPI.Betrusted
|
|||
}
|
||||
}
|
||||
|
||||
private void HandleTxFifoWrite(uint value)
|
||||
private void HandleTxFifoWrite(ulong value)
|
||||
{
|
||||
txQueue.Enqueue((byte)(value));
|
||||
txQueue.Enqueue((byte)(value >> 8));
|
||||
|
|
|
|||
|
|
@ -77,9 +77,9 @@ namespace Antmicro.Renode.Peripherals.Timers.Betrusted
|
|||
}
|
||||
|
||||
// Convert "approximately 65MHz" ticks to milliseconds
|
||||
private uint XilinxClockToMs(uint xilinx_clocks)
|
||||
private uint XilinxClockToMs(ulong xilinx_clocks)
|
||||
{
|
||||
uint adjusted = (uint)((((ulong)xilinx_clocks) * 100) / 65000000);
|
||||
uint adjusted = (uint)((xilinx_clocks * 100) / 65000000);
|
||||
this.Log(LogLevel.Debug, "Watchdog timer set for {0}. Will expire after {1} msec", xilinx_clocks, adjusted * 10);
|
||||
return adjusted;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -113,8 +113,8 @@ namespace Antmicro.Renode.Peripherals.Timers.Betrusted
|
|||
private IFlagRegisterField irqPending;
|
||||
|
||||
private uint latchedValue;
|
||||
private uint loadValue;
|
||||
private uint reloadValue;
|
||||
private ulong loadValue;
|
||||
private ulong reloadValue;
|
||||
|
||||
private readonly LimitTimer innerTimer;
|
||||
|
||||
|
|
|
|||
|
|
@ -806,7 +806,7 @@ namespace Antmicro.Renode.Peripherals.Network.Betrusted
|
|||
}
|
||||
}
|
||||
|
||||
private uint GetWriteRegister(uint val, uint order)
|
||||
private uint GetWriteRegister(uint val, ulong order)
|
||||
{
|
||||
if (order == 0)
|
||||
{
|
||||
|
|
@ -1214,4 +1214,3 @@ namespace Antmicro.Renode.Peripherals.Network.Betrusted
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -326,7 +326,7 @@ namespace Antmicro.Renode.Peripherals.Miscellaneous.Betrusted
|
|||
this.lockAddress = 0;
|
||||
}
|
||||
|
||||
private uint address;
|
||||
private ulong address;
|
||||
private UInt32[] data;
|
||||
private bool[] locked;
|
||||
private uint lockAddress;
|
||||
|
|
|
|||
Loading…
Reference in a new issue