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)
|
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)))
|
||||||
|
|
Loading…
Reference in New Issue