From 6fd7735f77b9a5d7171b3517293af745c6f04801 Mon Sep 17 00:00:00 2001 From: whitequark Date: Sun, 4 Aug 2019 09:35:14 +0000 Subject: [PATCH] Remove useless _blinky.build_and_program() function. --- nmigen_boards/_blinky.py | 4 ---- nmigen_boards/blackice.py | 4 ++-- nmigen_boards/blackice_ii.py | 4 ++-- nmigen_boards/ice40_hx1k_blink_evn.py | 4 ++-- nmigen_boards/ice40_hx8k_b_evn.py | 4 ++-- nmigen_boards/icestick.py | 4 ++-- nmigen_boards/kc705.py | 4 ++-- nmigen_boards/tinyfpga_bx.py | 4 ++-- nmigen_boards/versa_ecp5.py | 4 ++-- nmigen_boards/versa_ecp5_5g.py | 4 ++-- 10 files changed, 18 insertions(+), 22 deletions(-) diff --git a/nmigen_boards/_blinky.py b/nmigen_boards/_blinky.py index 87ea57b..a9bbde9 100644 --- a/nmigen_boards/_blinky.py +++ b/nmigen_boards/_blinky.py @@ -25,7 +25,3 @@ class Blinky(Elaboratable): m.d.sync += ctr.eq(ctr - 1) return m - - -def build_and_program(platform_cls, **kwargs): - platform_cls().build(Blinky(), do_program=True, **kwargs) diff --git a/nmigen_boards/blackice.py b/nmigen_boards/blackice.py index 2ec16a1..aa84d5e 100644 --- a/nmigen_boards/blackice.py +++ b/nmigen_boards/blackice.py @@ -73,5 +73,5 @@ class BlackIcePlatform(LatticeICE40Platform): if __name__ == "__main__": - from ._blinky import build_and_program - build_and_program(BlackIcePlatform) + from ._blinky import Blinky + BlackIcePlatform().build(Blinky(), do_program=True) diff --git a/nmigen_boards/blackice_ii.py b/nmigen_boards/blackice_ii.py index da303a9..b17221c 100644 --- a/nmigen_boards/blackice_ii.py +++ b/nmigen_boards/blackice_ii.py @@ -75,5 +75,5 @@ class BlackIceIIPlatform(LatticeICE40Platform): if __name__ == "__main__": - from ._blinky import build_and_program - build_and_program(BlackIceIIPlatform) + from ._blinky import Blinky + BlackIceIIPlatform().build(Blinky(), do_program=True) diff --git a/nmigen_boards/ice40_hx1k_blink_evn.py b/nmigen_boards/ice40_hx1k_blink_evn.py index 7ada8c8..a3233b9 100644 --- a/nmigen_boards/ice40_hx1k_blink_evn.py +++ b/nmigen_boards/ice40_hx1k_blink_evn.py @@ -47,5 +47,5 @@ class ICE40HX1KBlinkEVNPlatform(LatticeICE40Platform): if __name__ == "__main__": - from ._blinky import build_and_program - build_and_program(ICE40HX1KBlinkEVNPlatform) + from ._blinky import Blinky + ICE40HX1KBlinkEVNPlatform().build(Blinky(), do_program=True) diff --git a/nmigen_boards/ice40_hx8k_b_evn.py b/nmigen_boards/ice40_hx8k_b_evn.py index 39b478d..31fd013 100644 --- a/nmigen_boards/ice40_hx8k_b_evn.py +++ b/nmigen_boards/ice40_hx8k_b_evn.py @@ -67,5 +67,5 @@ class ICE40HX8KBEVNPlatform(LatticeICE40Platform): if __name__ == "__main__": - from ._blinky import build_and_program - build_and_program(ICE40HX8KBEVNPlatform) + from ._blinky import Blinky + ICE40HX8KBEVNPlatform().build(Blinky(), do_program=True) diff --git a/nmigen_boards/icestick.py b/nmigen_boards/icestick.py index bdeb112..dccf34c 100644 --- a/nmigen_boards/icestick.py +++ b/nmigen_boards/icestick.py @@ -53,5 +53,5 @@ class ICEStickPlatform(LatticeICE40Platform): if __name__ == "__main__": - from ._blinky import build_and_program - build_and_program(ICEStickPlatform) + from ._blinky import Blinky + ICEStickPlatform().build(Blinky(), do_program=True) diff --git a/nmigen_boards/kc705.py b/nmigen_boards/kc705.py index 91e4a5b..613c0ba 100644 --- a/nmigen_boards/kc705.py +++ b/nmigen_boards/kc705.py @@ -44,5 +44,5 @@ class KC705Platform(Xilinx7SeriesPlatform): if __name__ == "__main__": - from ._blinky import build_and_program - build_and_program(KC705Platform) + from ._blinky import Blinky + KC705Platform().build(Blinky(), do_program=True) diff --git a/nmigen_boards/tinyfpga_bx.py b/nmigen_boards/tinyfpga_bx.py index 5e272cb..aefddb7 100644 --- a/nmigen_boards/tinyfpga_bx.py +++ b/nmigen_boards/tinyfpga_bx.py @@ -50,5 +50,5 @@ class TinyFPGABXPlatform(LatticeICE40Platform): if __name__ == "__main__": - from ._blinky import build_and_program - build_and_program(TinyFPGABXPlatform) + from ._blinky import Blinky + TinyFPGABXPlatform().build(Blinky(), do_program=True) diff --git a/nmigen_boards/versa_ecp5.py b/nmigen_boards/versa_ecp5.py index 4462e4d..e20f8cc 100644 --- a/nmigen_boards/versa_ecp5.py +++ b/nmigen_boards/versa_ecp5.py @@ -180,5 +180,5 @@ class VersaECP5Platform(LatticeECP5Platform): if __name__ == "__main__": - from ._blinky import build_and_program - build_and_program(VersaECP5Platform) + from ._blinky import Blinky + VersaECP5Platform().build(Blinky(), do_program=True) diff --git a/nmigen_boards/versa_ecp5_5g.py b/nmigen_boards/versa_ecp5_5g.py index d6441f4..02fa8b1 100644 --- a/nmigen_boards/versa_ecp5_5g.py +++ b/nmigen_boards/versa_ecp5_5g.py @@ -10,5 +10,5 @@ class VersaECP55GPlatform(VersaECP5Platform): if __name__ == "__main__": - from ._blinky import build_and_program - build_and_program(VersaECP55GPlatform) + from ._blinky import Blinky + VersaECP55GPlatform().build(Blinky(), do_program=True) -- 2.30.2