soc/cores/led: Minor cosmetic cleanups.
This commit is contained in:
parent
19b1e50cbd
commit
61dcd1e8fd
|
@ -21,10 +21,10 @@ class LedChaser(Module, AutoCSR):
|
|||
|
||||
# # #
|
||||
|
||||
n = len(pads)
|
||||
chaser = Signal(n)
|
||||
mode = Signal(reset=_CHASER_MODE)
|
||||
timer = WaitTimer(int(period*sys_clk_freq/(2*n)))
|
||||
n = len(pads)
|
||||
chaser = Signal(n)
|
||||
mode = Signal(reset=_CHASER_MODE)
|
||||
timer = WaitTimer(int(period*sys_clk_freq/(2*n)))
|
||||
self.submodules += timer
|
||||
self.comb += timer.wait.eq(~timer.done)
|
||||
self.sync += If(timer.done, chaser.eq(Cat(~chaser[-1], chaser)))
|
||||
|
|
Loading…
Reference in New Issue