blinky: replace deprecated Signal(max=...) (#42)
authorNicolas Robin <13021796+nicolas-robin@users.noreply.github.com>
Mon, 13 Jan 2020 18:54:23 +0000 (19:54 +0100)
committerwhitequark <whitequark@whitequark.org>
Mon, 13 Jan 2020 18:54:23 +0000 (18:54 +0000)
nmigen_boards/test/blinky.py

index 4eb76db64c3ae7b7790e664ae686cf1f5b7e4cee..460fb0a8655c516d53357d094513fb1f53950c16 100644 (file)
@@ -31,7 +31,7 @@ class Blinky(Elaboratable):
             inverts[index] ^= switch
 
         clk_freq = platform.default_clk_frequency
-        timer = Signal(max=int(clk_freq//2), reset=int(clk_freq//2) - 1)
+        timer = Signal(range(int(clk_freq//2)), reset=int(clk_freq//2) - 1)
         flops = Signal(len(leds))
 
         m.d.comb += Cat(leds).eq(flops ^ Cat(inverts))