global: Use new WaitTimer integrated cast to int.

This commit is contained in:
Florent Kermarrec 2023-08-01 14:42:16 +02:00
parent 16224432d9
commit cb1e1932b3
2 changed files with 2 additions and 2 deletions

View File

@ -95,7 +95,7 @@ class BenchSoC(SoCCore):
self.specials += MultiReg(switches_pads, switches)
# Send Switches value on UDP Streamer TX every 500ms.
switches_timer = WaitTimer(int(500e-3*sys_clk_freq))
switches_timer = WaitTimer(500e-3*sys_clk_freq)
switches_fsm = FSM(reset_state="IDLE")
self.submodules += switches_timer, switches_fsm
switches_fsm.act("IDLE",

View File

@ -575,7 +575,7 @@ class LiteEthDHCP(LiteXModule):
]
# DHCP Timeout.
self.timeout_timer = timeout_timer = WaitTimer(int(timeout*sys_clk_freq))
self.timeout_timer = timeout_timer = WaitTimer(timeout*sys_clk_freq)
self.comb += [
timeout_timer.wait.eq(~self.done),
self.timeout.eq(timeout_timer.done),