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 f780b5f commit efc15a9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion litex_boards/platforms/qmtech_daughterboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def __init__(self, segs, sels, sys_clk_freq, period=1e-2):

self.comb += Case(hexa, cases)

timer = WaitTimer(int(period*sys_clk_freq/(2*n)))
timer = WaitTimer(period*sys_clk_freq/(2*n))
self.submodules += timer
self.comb += timer.wait.eq(~timer.done)
self.sync += If(timer.done,
Expand Down
4 changes: 2 additions & 2 deletions litex_boards/targets/gsd_orangecrab.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def __init__(self, platform, sys_clk_freq, with_usb_pll=False):
usb_pll.create_clkout(self.cd_usb_12, 12e6)

# FPGA Reset (press usr_btn for 1 second to fallback to bootloader)
reset_timer = WaitTimer(int(48e6))
reset_timer = WaitTimer(48e6)
reset_timer = ClockDomainsRenamer("por")(reset_timer)
self.submodules += reset_timer
self.comb += reset_timer.wait.eq(~rst_n)
Expand Down Expand Up @@ -135,7 +135,7 @@ def __init__(self, platform, sys_clk_freq, with_usb_pll=False):
usb_pll.create_clkout(self.cd_usb_12, 12e6)

# FPGA Reset (press usr_btn for 1 second to fallback to bootloader)
reset_timer = WaitTimer(int(48e6))
reset_timer = WaitTimer(48e6)
reset_timer = ClockDomainsRenamer("por")(reset_timer)
self.submodules += reset_timer
self.comb += reset_timer.wait.eq(~rst_n)
Expand Down

0 comments on commit efc15a9

Please sign in to comment.