Skip to content

Commit

Permalink
global: Use new WaitTimer integrated cast to int.
Browse files Browse the repository at this point in the history
  • Loading branch information
enjoy-digital committed Aug 1, 2023
1 parent 3b2af0a commit 7a7389d
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion liteiclink/serdes/gth_ultrascale_init.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def __init__(self, sys_clk_freq, rx, buffer_enable):
fsm = ResetInserter()(FSM(reset_state="RESET_ALL"))
self.submodules.fsm = fsm

ready_timer = WaitTimer(int(10e-3*sys_clk_freq))
ready_timer = WaitTimer(10e-3*sys_clk_freq)
self.submodules.ready_timer = ready_timer
self.comb += [
ready_timer.wait.eq(~self.done & ~fsm.reset),
Expand Down
8 changes: 4 additions & 4 deletions liteiclink/serdes/gtp_7series_init.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ def __init__(self, sys_clk_freq, buffer_enable):
)
)
# Wait 500ns after configuration before releasing GTP reset (to follow AR43482)
init_delay = WaitTimer(int(500e-9*sys_clk_freq))
init_delay = WaitTimer(500e-9*sys_clk_freq)
self.submodules += init_delay
self.comb += init_delay.wait.eq(1)
fsm.act("WAIT-INIT-DELAY",
Expand Down Expand Up @@ -164,7 +164,7 @@ def __init__(self, sys_clk_freq, buffer_enable):
)

# FSM watchdog / restart
watchdog = WaitTimer(int(1e-3*sys_clk_freq))
watchdog = WaitTimer(1e-3*sys_clk_freq)
self.submodules += watchdog
self.comb += [
watchdog.wait.eq(~fsm.reset & ~self.done),
Expand Down Expand Up @@ -245,7 +245,7 @@ def __init__(self, sys_clk_freq, buffer_enable):
NextState("WAIT-INIT-DELAY")
)
# Wait 500ns after configuration before releasing GTP reset (to follow AR43482)
init_delay = WaitTimer(int(500e-9*sys_clk_freq))
init_delay = WaitTimer(500e-9*sys_clk_freq)
self.submodules += init_delay
self.comb += init_delay.wait.eq(1)
fsm.act("WAIT-INIT-DELAY",
Expand Down Expand Up @@ -329,7 +329,7 @@ def __init__(self, sys_clk_freq, buffer_enable):
)

# FSM watchdog / restart
watchdog = WaitTimer(int(4e-3*sys_clk_freq))
watchdog = WaitTimer(4e-3*sys_clk_freq)
self.submodules += watchdog
self.comb += [
watchdog.wait.eq(~fsm.reset & ~self.done),
Expand Down
4 changes: 2 additions & 2 deletions liteiclink/serdes/gtx_7series_init.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def __init__(self, sys_clk_freq, buffer_enable):
)
)
# Wait 500ns after configuration before releasing GTX reset (to follow AR43482)
init_delay = WaitTimer(int(500e-9*sys_clk_freq))
init_delay = WaitTimer(500e-9*sys_clk_freq)
self.submodules += init_delay
self.comb += init_delay.wait.eq(1)
fsm.act("WAIT-INIT-DELAY",
Expand Down Expand Up @@ -154,7 +154,7 @@ def __init__(self, sys_clk_freq, buffer_enable):
)

# FSM watchdog / restart
watchdog = WaitTimer(int(1e-3*sys_clk_freq))
watchdog = WaitTimer(1e-3*sys_clk_freq)
self.submodules += watchdog
self.comb += [
watchdog.wait.eq(~fsm.reset & ~self.done),
Expand Down
2 changes: 1 addition & 1 deletion liteiclink/serdes/gty_ultrascale_init.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def __init__(self, sys_clk_freq, rx, buffer_enable):
fsm = ResetInserter()(FSM(reset_state="RESET_ALL"))
self.submodules.fsm = fsm

ready_timer = WaitTimer(int(10e-3*sys_clk_freq))
ready_timer = WaitTimer(10e-3*sys_clk_freq)
self.submodules += ready_timer
self.comb += [
ready_timer.wait.eq(~self.done & ~fsm.reset),
Expand Down

0 comments on commit 7a7389d

Please sign in to comment.