From b30f366645b8544c858289d6755f961fb30ab445 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Szaknis?= Date: Sun, 4 Sep 2022 22:50:00 +0200 Subject: [PATCH 1/3] Add support for Elbert V2 Spartan 3A board --- amaranth_boards/elbert_v2.py | 51 ++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 amaranth_boards/elbert_v2.py diff --git a/amaranth_boards/elbert_v2.py b/amaranth_boards/elbert_v2.py new file mode 100644 index 00000000..0160309c --- /dev/null +++ b/amaranth_boards/elbert_v2.py @@ -0,0 +1,51 @@ +from amaranth.build import * +from amaranth.vendor.xilinx import XilinxPlatform +from .resources import * + +__all__ = ["ElbertV2NumatoPlatform"] + +class ElbertV2NumatoPlatform(XilinxPlatform): + device = "xc3s50an" + package = "tqg144" + speed = "4" + default_clk = "clk12" + + resources = [ + Resource("clk12", 0, Pins("P129", dir="i"), Clock(12e6), Attrs(IOSTANDARD="LVCMOS33")), + + *LEDResources(pins="P55 P54 P51 P50 P49 P48 P47 P46", attrs=Attrs(IOSTANDARD="LVCMOS33")), + Display7SegResource(0, a="P117", b="P116", c="P115", d="P113", e="P112", f="P111", g="P110", dp="P114", + invert=True, attrs=Attrs(IOSTANDARD="LVCMOS33")), + Resource("display_7seg_ctrl", 0, + Subsignal("en", Pins("P120 P121 P124", invert=True, dir="o")) + ), + VGAResource(0, r="P105 P104 P103", g="P102 P101 P99", b="P98 P96", hs="P93", vs="P92", attrs=Attrs(IOSTANDARD="LVCMOS33")), + *SDCardResources(0, dat0="P83", dat1="P82", dat2="P90", dat3="P85", cmd="P84", clk="P57", attrs=Attrs(IOSTANDARD="LVCMOS33")), + Resource("audiojack", 0, + Subsignal("audio", Pins("P88 P87", dir="o")) + ), + *ButtonResources(pins="P80 P79 P78 P77 P76 P75", attrs=Attrs(IOSTANDARD="LVCMOS33")), + *SwitchResources(pins="P70 P69 P68 P64 P63 P60 P59 P58", attrs=Attrs(IOSTANDARD="LVCMOS33")) + ] + + connectors = [ + Connector("p", 1, + "- - - - P25 P24 P29 P27 P30 P28 P32 P31" + ), + Connector("p", 6, + "- - - - P13 P12 P16 P15 P20 P18 P21 P19" + ), + Connector("p", 2, + "- - - - P6 P4 P5 P3 P8 P7 P11 P10" + ), + Connector("p", 4, + "- - - - P132 P130 P135 P134 P139 P138 P143 P141" + ), + Connector("p", 5, + "- - P140 P142 P91 P131 P126 P127 P123 P125" + ) + ] + +if __name__ == "__main__": + from .test.blinky import * + ElbertV2NumatoPlatform().build(Blinky()) From b7451fa077e905aa6f41966b01996d72d4b81c05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Szaknis?= Date: Sat, 28 Jan 2023 19:03:07 +0100 Subject: [PATCH 2/3] Fix pin assigments --- amaranth_boards/elbert_v2.py | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/amaranth_boards/elbert_v2.py b/amaranth_boards/elbert_v2.py index 0160309c..6d4bfad7 100644 --- a/amaranth_boards/elbert_v2.py +++ b/amaranth_boards/elbert_v2.py @@ -13,19 +13,27 @@ class ElbertV2NumatoPlatform(XilinxPlatform): resources = [ Resource("clk12", 0, Pins("P129", dir="i"), Clock(12e6), Attrs(IOSTANDARD="LVCMOS33")), - *LEDResources(pins="P55 P54 P51 P50 P49 P48 P47 P46", attrs=Attrs(IOSTANDARD="LVCMOS33")), - Display7SegResource(0, a="P117", b="P116", c="P115", d="P113", e="P112", f="P111", g="P110", dp="P114", - invert=True, attrs=Attrs(IOSTANDARD="LVCMOS33")), + *LEDResources(pins="P55 P54 P51 P50 P49 P48 P47 P46", + attrs=Attrs(IOSTANDARD="LVCMOS33", SLEW="SLOW", DRIVE="12")), + Display7SegResource(0, a="P114", b="P110", c="P111", d="P112", e="P113", f="P115", g="P116", dp="P117", + invert=True, attrs=Attrs(IOSTANDARD="LVCMOS33", SLEW="SLOW", DRIVE="12")), Resource("display_7seg_ctrl", 0, - Subsignal("en", Pins("P120 P121 P124", invert=True, dir="o")) + Subsignal("en", Pins("P120 P121 P124", invert=True, dir="o"), + Attrs(IOSTANDARD="LVCMOS33", SLEW="SLOW", DRIVE="12")) ), - VGAResource(0, r="P105 P104 P103", g="P102 P101 P99", b="P98 P96", hs="P93", vs="P92", attrs=Attrs(IOSTANDARD="LVCMOS33")), - *SDCardResources(0, dat0="P83", dat1="P82", dat2="P90", dat3="P85", cmd="P84", clk="P57", attrs=Attrs(IOSTANDARD="LVCMOS33")), + VGAResource(0, r="P105 P104 P103", g="P102 P101 P99", b="P98 P96", hs="P93", vs="P92", + attrs=Attrs(IOSTANDARD="LVCMOS33", SLEW="SLOW", DRIVE="12")), + *SDCardResources(0, dat0="P83", dat1="P82", dat2="P90", dat3="P85", cmd="P84", clk="P57", + attrs=Attrs(IOSTANDARD="LVCMOS33", SLEW="SLOW", DRIVE="12")), Resource("audiojack", 0, - Subsignal("audio", Pins("P88 P87", dir="o")) + Subsignal("audio", Pins("P88 P87", dir="o"), Attrs(IOSTANDARD="LVCMOS33", SLEW="SLOW", DRIVE="12")) ), - *ButtonResources(pins="P80 P79 P78 P77 P76 P75", attrs=Attrs(IOSTANDARD="LVCMOS33")), - *SwitchResources(pins="P70 P69 P68 P64 P63 P60 P59 P58", attrs=Attrs(IOSTANDARD="LVCMOS33")) + *ButtonResources(pins="P80 P79 P78 P77 P76 P75", + attrs=Attrs(IOSTANDARD="LVCMOS33", PULLUP="TRUE", DRIVE="12", + SLEW="SLOW")), + *SwitchResources(pins="P70 P69 P68 P64 P63 P60 P59 P58", + attrs=Attrs(IOSTANDARD="LVCMOS33", PULLUP="TRUE", DRIVE="12", + SLEW="SLOW")) ] connectors = [ From c22d770c052d0ea572285bde8027d02ad94d241a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Szaknis?= Date: Sat, 15 Jun 2024 18:54:15 +0200 Subject: [PATCH 3/3] Fix more pin assignement --- amaranth_boards/elbert_v2.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/amaranth_boards/elbert_v2.py b/amaranth_boards/elbert_v2.py index 6d4bfad7..7b26fd7e 100644 --- a/amaranth_boards/elbert_v2.py +++ b/amaranth_boards/elbert_v2.py @@ -38,19 +38,19 @@ class ElbertV2NumatoPlatform(XilinxPlatform): connectors = [ Connector("p", 1, - "- - - - P25 P24 P29 P27 P30 P28 P32 P31" + "P31 P32 P28 P30 P27 P29 P24 P25 - - - -" ), Connector("p", 6, - "- - - - P13 P12 P16 P15 P20 P18 P21 P19" + "P19 P21 P18 P20 P15 P16 P12 P13 - - - -" ), Connector("p", 2, - "- - - - P6 P4 P5 P3 P8 P7 P11 P10" + "P10 P11 P7 P8 P3 P5 P4 P6 - - - -" ), Connector("p", 4, - "- - - - P132 P130 P135 P134 P139 P138 P143 P141" + "P141 P143 P138 P139 P134 P135 P130 P132 - - - -" ), Connector("p", 5, - "- - P140 P142 P91 P131 P126 P127 P123 P125" + "P125 P123 P127 P126 P131 P91 P142 P140 - -" ) ]