Last active
December 29, 2019 18:17
-
-
Save ret/11fc6c5d231940d77f19f0a6d9bcb69f to your computer and use it in GitHub Desktop.
Layout Signal(16) across icebreaker pmod 1A and 1B (nMigen)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Connect 0:15 of led_panel to PMOD 1A and 1B. | |
# | |
platform.add_resources([ | |
Resource("pmod1A", 0, Pins(" 4 2 47 45 3 48 46 44", dir="o")), | |
Resource("pmod1B", 0, Pins("43 38 34 31 42 36 32 28", dir="o")) | |
]) | |
pmod1A = platform.request("pmod1A", 0) | |
pmod1B = platform.request("pmod1B", 0) | |
m.d.comb += pmod1A.eq(d.led_panel[0: 8]) # LSB | |
m.d.comb += pmod1B.eq(d.led_panel[8:16]) # MSB |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ... | |
set_io pmod1A_0__io[0] 4 | |
set_io pmod1A_0__io[1] 2 | |
set_io pmod1A_0__io[2] 47 | |
set_io pmod1A_0__io[3] 45 | |
set_io pmod1A_0__io[4] 3 | |
set_io pmod1A_0__io[5] 48 | |
set_io pmod1A_0__io[6] 46 | |
set_io pmod1A_0__io[7] 44 | |
set_io pmod1B_0__io[0] 43 | |
set_io pmod1B_0__io[1] 38 | |
set_io pmod1B_0__io[2] 34 | |
set_io pmod1B_0__io[3] 31 | |
set_io pmod1B_0__io[4] 42 | |
set_io pmod1B_0__io[5] 36 | |
set_io pmod1B_0__io[6] 32 | |
set_io pmod1B_0__io[7] 28 | |
# ... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment