emulation: cast frequency to ulong for Renode v1.16+ compatibility

Renode v1.16 changed the LimitTimer constructor signature from
`long frequency` to `ulong frequency`. Without this cast, the
LiteX_Timer_32 peripheral fails to compile against current Renode
versions, causing emulation to exit immediately with a peripheral
build failure rather than booting Xous.

Tested with Renode v1.16.1.4499 (build 9d55b4e6-202604170227)
against the standard emulation/xous-release.resc startup. With
the cast, Xous boots through to the main loop. Without it,
Renode exits before any boot output appears.
This commit is contained in:
tunnell 2026-04-26 08:39:01 -05:00
parent b0f5c5a4ce
commit dd45a11c7b

View file

@ -20,7 +20,7 @@ namespace Antmicro.Renode.Peripherals.Timers.Betrusted
public LiteX_Timer_32(Machine machine, long frequency) : base(machine)
{
IRQ = new GPIO();
innerTimer = new LimitTimer(machine.ClockSource, frequency, this, "LiteXTimer32", eventEnabled: true, autoUpdate: true);
innerTimer = new LimitTimer(machine.ClockSource, (ulong)frequency, this, "LiteXTimer32", eventEnabled: true, autoUpdate: true);
innerTimer.LimitReached += delegate
{
this.Log(LogLevel.Noisy, "Limit reached");