soc/cores/led: Minor cosmetic cleanups.

This commit is contained in:
Florent Kermarrec 2021-03-03 09:02:41 +01:00
parent 19b1e50cbd
commit 61dcd1e8fd
1 changed files with 4 additions and 4 deletions

View File

@ -21,10 +21,10 @@ class LedChaser(Module, AutoCSR):
# # # # # #
n = len(pads) n = len(pads)
chaser = Signal(n) chaser = Signal(n)
mode = Signal(reset=_CHASER_MODE) mode = Signal(reset=_CHASER_MODE)
timer = WaitTimer(int(period*sys_clk_freq/(2*n))) timer = WaitTimer(int(period*sys_clk_freq/(2*n)))
self.submodules += timer self.submodules += timer
self.comb += timer.wait.eq(~timer.done) self.comb += timer.wait.eq(~timer.done)
self.sync += If(timer.done, chaser.eq(Cat(~chaser[-1], chaser))) self.sync += If(timer.done, chaser.eq(Cat(~chaser[-1], chaser)))