From 52bcf5f6faa09e2ac74a4c446090215e89a8e0fa Mon Sep 17 00:00:00 2001 From: whitequark Date: Mon, 23 Sep 2019 08:16:07 +0000 Subject: [PATCH] =?utf8?q?=5Fblinky=E2=86=92test.blinky?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Expose blinky as a stable component, to make writing out-of-tree board files a bit nicer. --- nmigen_boards/arty_a7.py | 2 +- nmigen_boards/atlys.py | 2 +- nmigen_boards/blackice.py | 2 +- nmigen_boards/blackice_ii.py | 2 +- nmigen_boards/fomu_hacker.py | 2 +- nmigen_boards/ice40_hx1k_blink_evn.py | 2 +- nmigen_boards/ice40_hx8k_b_evn.py | 2 +- nmigen_boards/icebreaker.py | 2 +- nmigen_boards/icestick.py | 2 +- nmigen_boards/kc705.py | 2 +- nmigen_boards/mercury.py | 2 +- nmigen_boards/numato_mimas.py | 2 +- nmigen_boards/{_blinky.py => test/blinky.py} | 3 +++ nmigen_boards/tinyfpga_bx.py | 2 +- nmigen_boards/versa_ecp5.py | 2 +- nmigen_boards/versa_ecp5_5g.py | 2 +- 16 files changed, 18 insertions(+), 15 deletions(-) rename nmigen_boards/{_blinky.py => test/blinky.py} (96%) diff --git a/nmigen_boards/arty_a7.py b/nmigen_boards/arty_a7.py index 53869a3..57fe765 100644 --- a/nmigen_boards/arty_a7.py +++ b/nmigen_boards/arty_a7.py @@ -215,5 +215,5 @@ class ArtyA7Platform(Xilinx7SeriesPlatform): if __name__ == "__main__": - from ._blinky import Blinky + from .test.blinky import * ArtyA7Platform().build(Blinky(), do_program=True) diff --git a/nmigen_boards/atlys.py b/nmigen_boards/atlys.py index d010307..d70c6d0 100644 --- a/nmigen_boards/atlys.py +++ b/nmigen_boards/atlys.py @@ -226,5 +226,5 @@ class AtlysPlatform(XilinxSpartan6Platform): if __name__ == "__main__": - from ._blinky import Blinky + from .test.blinky import * AtlysPlatform().build(Blinky(), do_program=True) diff --git a/nmigen_boards/blackice.py b/nmigen_boards/blackice.py index ec67def..385401d 100644 --- a/nmigen_boards/blackice.py +++ b/nmigen_boards/blackice.py @@ -56,5 +56,5 @@ class BlackIcePlatform(LatticeICE40Platform): if __name__ == "__main__": - from ._blinky import Blinky + from .test.blinky import * BlackIcePlatform().build(Blinky(), do_program=True) diff --git a/nmigen_boards/blackice_ii.py b/nmigen_boards/blackice_ii.py index baa135c..86e381d 100644 --- a/nmigen_boards/blackice_ii.py +++ b/nmigen_boards/blackice_ii.py @@ -58,5 +58,5 @@ class BlackIceIIPlatform(LatticeICE40Platform): if __name__ == "__main__": - from ._blinky import Blinky + from .test.blinky import * BlackIceIIPlatform().build(Blinky(), do_program=True) diff --git a/nmigen_boards/fomu_hacker.py b/nmigen_boards/fomu_hacker.py index 2ff0038..0ddfe49 100644 --- a/nmigen_boards/fomu_hacker.py +++ b/nmigen_boards/fomu_hacker.py @@ -50,5 +50,5 @@ class FomuHackerPlatform(LatticeICE40Platform): if __name__ == "__main__": - from ._blinky import Blinky + from .test.blinky import * FomuHackerPlatform().build(Blinky(), do_program=True) diff --git a/nmigen_boards/ice40_hx1k_blink_evn.py b/nmigen_boards/ice40_hx1k_blink_evn.py index 2a76603..ae46f24 100644 --- a/nmigen_boards/ice40_hx1k_blink_evn.py +++ b/nmigen_boards/ice40_hx1k_blink_evn.py @@ -44,5 +44,5 @@ class ICE40HX1KBlinkEVNPlatform(LatticeICE40Platform): if __name__ == "__main__": - from ._blinky import Blinky + from .test.blinky import * 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 e27218a..ce55e81 100644 --- a/nmigen_boards/ice40_hx8k_b_evn.py +++ b/nmigen_boards/ice40_hx8k_b_evn.py @@ -63,5 +63,5 @@ class ICE40HX8KBEVNPlatform(LatticeICE40Platform): if __name__ == "__main__": - from ._blinky import Blinky + from .test.blinky import * ICE40HX8KBEVNPlatform().build(Blinky(), do_program=True) diff --git a/nmigen_boards/icebreaker.py b/nmigen_boards/icebreaker.py index 9971ee0..2f3034c 100644 --- a/nmigen_boards/icebreaker.py +++ b/nmigen_boards/icebreaker.py @@ -82,7 +82,7 @@ class ICEBreakerPlatform(LatticeICE40Platform): if __name__ == "__main__": - from ._blinky import Blinky + from .test.blinky import * p = ICEBreakerPlatform() p.add_resources(p.break_off_pmod) p.build(Blinky(), do_program=True) diff --git a/nmigen_boards/icestick.py b/nmigen_boards/icestick.py index 99302e7..763eaee 100644 --- a/nmigen_boards/icestick.py +++ b/nmigen_boards/icestick.py @@ -49,5 +49,5 @@ class ICEStickPlatform(LatticeICE40Platform): if __name__ == "__main__": - from ._blinky import Blinky + from .test.blinky import * ICEStickPlatform().build(Blinky(), do_program=True) diff --git a/nmigen_boards/kc705.py b/nmigen_boards/kc705.py index f179d10..bc889de 100644 --- a/nmigen_boards/kc705.py +++ b/nmigen_boards/kc705.py @@ -38,5 +38,5 @@ class KC705Platform(Xilinx7SeriesPlatform): if __name__ == "__main__": - from ._blinky import Blinky + from .test.blinky import * KC705Platform().build(Blinky(), do_program=True) diff --git a/nmigen_boards/mercury.py b/nmigen_boards/mercury.py index 5ad6254..c14e85c 100644 --- a/nmigen_boards/mercury.py +++ b/nmigen_boards/mercury.py @@ -218,7 +218,7 @@ class MercuryPlatform(XilinxSpartan3APlatform): if __name__ == "__main__": - from ._blinky import Blinky + from .test.blinky import * plat = MercuryPlatform() plat.add_resources(plat.leds) plat.build(Blinky(), do_program=True) diff --git a/nmigen_boards/numato_mimas.py b/nmigen_boards/numato_mimas.py index d484fa2..c094528 100644 --- a/nmigen_boards/numato_mimas.py +++ b/nmigen_boards/numato_mimas.py @@ -47,5 +47,5 @@ class NumatoMimasPlatform(XilinxSpartan6Platform): if __name__ == "__main__": - from ._blinky import Blinky + from .test.blinky import * NumatoMimasPlatform().build(Blinky()) diff --git a/nmigen_boards/_blinky.py b/nmigen_boards/test/blinky.py similarity index 96% rename from nmigen_boards/_blinky.py rename to nmigen_boards/test/blinky.py index 4a173d4..5e20191 100644 --- a/nmigen_boards/_blinky.py +++ b/nmigen_boards/test/blinky.py @@ -4,6 +4,9 @@ from nmigen import * from nmigen.build import ResourceError +__all__ = ["Blinky"] + + class Blinky(Elaboratable): def elaborate(self, platform): m = Module() diff --git a/nmigen_boards/tinyfpga_bx.py b/nmigen_boards/tinyfpga_bx.py index c563565..537d0fe 100644 --- a/nmigen_boards/tinyfpga_bx.py +++ b/nmigen_boards/tinyfpga_bx.py @@ -52,5 +52,5 @@ class TinyFPGABXPlatform(LatticeICE40Platform): if __name__ == "__main__": - from ._blinky import Blinky + from .test.blinky import * TinyFPGABXPlatform().build(Blinky(), do_program=True) diff --git a/nmigen_boards/versa_ecp5.py b/nmigen_boards/versa_ecp5.py index 6b26d4f..a3890ac 100644 --- a/nmigen_boards/versa_ecp5.py +++ b/nmigen_boards/versa_ecp5.py @@ -172,5 +172,5 @@ class VersaECP5Platform(LatticeECP5Platform): if __name__ == "__main__": - from ._blinky import Blinky + from .test.blinky import * VersaECP5Platform().build(Blinky(), do_program=True) diff --git a/nmigen_boards/versa_ecp5_5g.py b/nmigen_boards/versa_ecp5_5g.py index 02fa8b1..36e6997 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 Blinky + from .test.blinky import * VersaECP55GPlatform().build(Blinky(), do_program=True) -- 2.30.2