From c2a8e9adbce74078f0a147e4cce87ff1b7c2fb8e Mon Sep 17 00:00:00 2001 From: whitequark Date: Fri, 28 Jun 2019 03:19:53 +0000 Subject: [PATCH] Formatting. NFC. --- nmigen_boards/blackice.py | 4 ++-- nmigen_boards/blackice_ii.py | 4 ++-- nmigen_boards/icebreaker.py | 43 +++++++++++++++++++++++------------- 3 files changed, 32 insertions(+), 19 deletions(-) diff --git a/nmigen_boards/blackice.py b/nmigen_boards/blackice.py index f8f637b..91c1e01 100644 --- a/nmigen_boards/blackice.py +++ b/nmigen_boards/blackice.py @@ -9,8 +9,8 @@ __all__ = ["BlackIcePlatform"] class BlackIcePlatform(LatticeICE40Platform): - device = "iCE40HX4K" - package = "TQ144" + device = "iCE40HX4K" + package = "TQ144" resources = [ Resource("clk100", 0, Pins("129", dir="i"), Clock(100e6), Attrs(GLOBAL="1", IO_STANDARD="SB_LVCMOS33") diff --git a/nmigen_boards/blackice_ii.py b/nmigen_boards/blackice_ii.py index 8a57296..ad8cf0f 100644 --- a/nmigen_boards/blackice_ii.py +++ b/nmigen_boards/blackice_ii.py @@ -9,8 +9,8 @@ __all__ = ["BlackIceIIPlatform"] class BlackIceIIPlatform(LatticeICE40Platform): - device = "iCE40HX4K" - package = "TQ144" + device = "iCE40HX4K" + package = "TQ144" resources = [ Resource("clk100", 0, Pins("129", dir="i"), Clock(100e6), Attrs(GLOBAL="1", IO_STANDARD="SB_LVCMOS33") diff --git a/nmigen_boards/icebreaker.py b/nmigen_boards/icebreaker.py index 74846a2..b3c594b 100644 --- a/nmigen_boards/icebreaker.py +++ b/nmigen_boards/icebreaker.py @@ -10,8 +10,8 @@ __all__ = ["ICEBreakerPlatform"] class ICEBreakerPlatform(LatticeICE40Platform): - device = "iCE40UP5K" - package = "SG48" + device = "iCE40UP5K" + package = "SG48" resources = [ Resource("clk12", 0, Pins("35", dir="i"), Clock(12e6), Attrs(GLOBAL="1", IO_STANDARD="SB_LVCMOS33")), @@ -45,22 +45,35 @@ class ICEBreakerPlatform(LatticeICE40Platform): # p.add_resources(p.break_off_pmod) # pmod_btn = plat.request("user_btn") break_off_pmod = [ - Resource("user_btn", 1, Pins("9", dir="i", conn=("pmod", 2)), Attrs(IO_STANDARD="SB_LVCMOS33")), - Resource("user_btn", 2, Pins("4", dir="i", conn=("pmod", 2)), Attrs(IO_STANDARD="SB_LVCMOS33")), - Resource("user_btn", 3, Pins("10", dir="i", conn=("pmod", 2)), Attrs(IO_STANDARD="SB_LVCMOS33")), + Resource("user_btn", 1, Pins("9", dir="i", conn=("pmod", 2)), + Attrs(IO_STANDARD="SB_LVCMOS33")), + Resource("user_btn", 2, Pins("4", dir="i", conn=("pmod", 2)), + Attrs(IO_STANDARD="SB_LVCMOS33")), + Resource("user_btn", 3, Pins("10", dir="i", conn=("pmod", 2)), + Attrs(IO_STANDARD="SB_LVCMOS33")), - Resource("user_led", 2, Pins("7", dir="o", conn=("pmod", 2)), Attrs(IO_STANDARD="SB_LVCMOS33")), - Resource("user_led", 3, Pins("1", dir="o", conn=("pmod", 2)), Attrs(IO_STANDARD="SB_LVCMOS33")), - Resource("user_led", 4, Pins("2", dir="o", conn=("pmod", 2)), Attrs(IO_STANDARD="SB_LVCMOS33")), - Resource("user_led", 5, Pins("8", dir="o", conn=("pmod", 2)), Attrs(IO_STANDARD="SB_LVCMOS33")), - Resource("user_led", 6, Pins("3", dir="o", conn=("pmod", 2)), Attrs(IO_STANDARD="SB_LVCMOS33")), + Resource("user_led", 2, Pins("7", dir="o", conn=("pmod", 2)), + Attrs(IO_STANDARD="SB_LVCMOS33")), + Resource("user_led", 3, Pins("1", dir="o", conn=("pmod", 2)), + Attrs(IO_STANDARD="SB_LVCMOS33")), + Resource("user_led", 4, Pins("2", dir="o", conn=("pmod", 2)), + Attrs(IO_STANDARD="SB_LVCMOS33")), + Resource("user_led", 5, Pins("8", dir="o", conn=("pmod", 2)), + Attrs(IO_STANDARD="SB_LVCMOS33")), + Resource("user_led", 6, Pins("3", dir="o", conn=("pmod", 2)), + Attrs(IO_STANDARD="SB_LVCMOS33")), # Color-specific aliases - Resource("user_ledr", 1, Pins("7", dir="o", conn=("pmod", 2)), Attrs(IO_STANDARD="SB_LVCMOS33")), - Resource("user_ledg", 1, Pins("1", dir="o", conn=("pmod", 2)), Attrs(IO_STANDARD="SB_LVCMOS33")), - Resource("user_ledg", 2, Pins("2", dir="o", conn=("pmod", 2)), Attrs(IO_STANDARD="SB_LVCMOS33")), - Resource("user_ledg", 3, Pins("8", dir="o", conn=("pmod", 2)), Attrs(IO_STANDARD="SB_LVCMOS33")), - Resource("user_ledg", 4, Pins("3", dir="o", conn=("pmod", 2)), Attrs(IO_STANDARD="SB_LVCMOS33")) + Resource("user_ledr", 1, Pins("7", dir="o", conn=("pmod", 2)), + Attrs(IO_STANDARD="SB_LVCMOS33")), + Resource("user_ledg", 1, Pins("1", dir="o", conn=("pmod", 2)), + Attrs(IO_STANDARD="SB_LVCMOS33")), + Resource("user_ledg", 2, Pins("2", dir="o", conn=("pmod", 2)), + Attrs(IO_STANDARD="SB_LVCMOS33")), + Resource("user_ledg", 3, Pins("8", dir="o", conn=("pmod", 2)), + Attrs(IO_STANDARD="SB_LVCMOS33")), + Resource("user_ledg", 4, Pins("3", dir="o", conn=("pmod", 2)), + Attrs(IO_STANDARD="SB_LVCMOS33")) ] def toolchain_program(self, products, name): -- 2.30.2