Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: amaranth-lang/amaranth-boards
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: bd7fdd379d8b
Choose a base ref
...
head repository: amaranth-lang/amaranth-boards
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: b968cfade961
Choose a head ref
  • 1 commit
  • 136 files changed
  • 1 contributor

Commits on Dec 10, 2021

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    b968cfa View commit details
Showing with 6,603 additions and 6,148 deletions.
  1. +2 −2 CONTRIBUTING.txt
  2. +1 −2 LICENSE.txt
  3. +4 −6 README.md
  4. +11 −0 amaranth_boards/__init__.py
  5. +76 −0 amaranth_boards/alchitry_au.py
  6. +88 −0 amaranth_boards/arrow_deca.py
  7. +230 −0 amaranth_boards/arty_a7.py
  8. +235 −0 amaranth_boards/arty_s7.py
  9. +175 −0 amaranth_boards/arty_z7.py
  10. +224 −0 amaranth_boards/atlys.py
  11. +61 −0 amaranth_boards/blackice.py
  12. +63 −0 amaranth_boards/blackice_ii.py
  13. +105 −0 amaranth_boards/chameleon96.py
  14. +114 −0 amaranth_boards/colorlight_5a75b_r7_0.py
  15. +111 −0 amaranth_boards/de0.py
  16. +99 −0 amaranth_boards/de0_cv.py
  17. +89 −0 amaranth_boards/de10_lite.py
  18. +95 −0 amaranth_boards/de10_nano.py
  19. +87 −0 amaranth_boards/de1_soc.py
  20. +40 −0 amaranth_boards/ebaz4205.py
  21. +154 −0 amaranth_boards/ecp5_5g_evn.py
  22. +232 −0 amaranth_boards/ecpix5.py
  23. 0 amaranth_boards/extensions/__init__.py
  24. +94 −0 amaranth_boards/extensions/pmod.py
  25. +51 −0 amaranth_boards/fomu_hacker.py
  26. +51 −0 amaranth_boards/fomu_pvt.py
  27. +363 −0 amaranth_boards/genesys2.py
  28. +48 −0 amaranth_boards/ice40_hx1k_blink_evn.py
  29. +68 −0 amaranth_boards/ice40_hx8k_b_evn.py
  30. +66 −0 amaranth_boards/ice40_up5k_b_evn.py
  31. +75 −0 amaranth_boards/icebreaker.py
  32. +51 −0 amaranth_boards/icebreaker_bitsy.py
  33. +53 −0 amaranth_boards/icestick.py
  34. +64 −0 amaranth_boards/icesugar.py
  35. +48 −0 amaranth_boards/icesugar_nano.py
  36. +42 −0 amaranth_boards/kc705.py
  37. +37 −0 amaranth_boards/kcu105.py
  38. +74 −0 amaranth_boards/machxo3_sk.py
  39. +214 −0 amaranth_boards/mercury.py
  40. +116 −0 amaranth_boards/microzed_z010.py
  41. +116 −0 amaranth_boards/microzed_z020.py
  42. +134 −0 amaranth_boards/mister.py
  43. +50 −0 amaranth_boards/nandland_go.py
  44. +183 −0 amaranth_boards/nexys4ddr.py
  45. +51 −0 amaranth_boards/numato_mimas.py
  46. +122 −0 amaranth_boards/orangecrab_r0_1.py
  47. +132 −0 amaranth_boards/orangecrab_r0_2.py
  48. +82 −0 amaranth_boards/quickfeather.py
  49. +4 −0 amaranth_boards/resources/__init__.py
  50. +36 −0 amaranth_boards/resources/display.py
  51. +144 −0 amaranth_boards/resources/interface.py
  52. +190 −0 amaranth_boards/resources/memory.py
  53. +43 −0 amaranth_boards/resources/user.py
  54. +126 −0 amaranth_boards/rz_easyfpga_a2_2.py
  55. +55 −0 amaranth_boards/sk_xc6slx9.py
  56. +167 −0 amaranth_boards/supercon19badge.py
  57. +132 −0 amaranth_boards/te0714_03_50_2I.py
  58. 0 amaranth_boards/test/__init__.py
  59. +48 −0 amaranth_boards/test/blinky.py
  60. +24 −0 amaranth_boards/tinyfpga_ax1.py
  61. +24 −0 amaranth_boards/tinyfpga_ax2.py
  62. +53 −0 amaranth_boards/tinyfpga_bx.py
  63. +197 −0 amaranth_boards/ulx3s.py
  64. +36 −0 amaranth_boards/upduino_v1.py
  65. +30 −0 amaranth_boards/upduino_v2.py
  66. +176 −0 amaranth_boards/versa_ecp5.py
  67. +14 −0 amaranth_boards/versa_ecp5_5g.py
  68. +76 −0 amaranth_boards/zturn_lite_z007s.py
  69. +8 −0 amaranth_boards/zturn_lite_z010.py
  70. +6 −11 nmigen_boards/__init__.py
  71. +5 −74 nmigen_boards/alchitry_au.py
  72. +5 −86 nmigen_boards/arrow_deca.py
  73. +5 −228 nmigen_boards/arty_a7.py
  74. +5 −233 nmigen_boards/arty_s7.py
  75. +5 −173 nmigen_boards/arty_z7.py
  76. +5 −222 nmigen_boards/atlys.py
  77. +5 −59 nmigen_boards/blackice.py
  78. +5 −61 nmigen_boards/blackice_ii.py
  79. +5 −103 nmigen_boards/chameleon96.py
  80. +5 −112 nmigen_boards/colorlight_5a75b_r7_0.py
  81. +5 −109 nmigen_boards/de0.py
  82. +5 −97 nmigen_boards/de0_cv.py
  83. +5 −87 nmigen_boards/de10_lite.py
  84. +5 −93 nmigen_boards/de10_nano.py
  85. +5 −85 nmigen_boards/de1_soc.py
  86. +5 −38 nmigen_boards/ebaz4205.py
  87. +5 −152 nmigen_boards/ecp5_5g_evn.py
  88. +5 −230 nmigen_boards/ecpix5.py
  89. +6 −0 nmigen_boards/extensions/__init__.py
  90. +5 −92 nmigen_boards/extensions/pmod.py
  91. +5 −49 nmigen_boards/fomu_hacker.py
  92. +5 −49 nmigen_boards/fomu_pvt.py
  93. +5 −361 nmigen_boards/genesys2.py
  94. +5 −46 nmigen_boards/ice40_hx1k_blink_evn.py
  95. +5 −66 nmigen_boards/ice40_hx8k_b_evn.py
  96. +5 −64 nmigen_boards/ice40_up5k_b_evn.py
  97. +5 −73 nmigen_boards/icebreaker.py
  98. +5 −49 nmigen_boards/icebreaker_bitsy.py
  99. +5 −51 nmigen_boards/icestick.py
  100. +5 −62 nmigen_boards/icesugar.py
  101. +5 −46 nmigen_boards/icesugar_nano.py
  102. +5 −40 nmigen_boards/kc705.py
  103. +5 −35 nmigen_boards/kcu105.py
  104. +5 −72 nmigen_boards/machxo3_sk.py
  105. +5 −212 nmigen_boards/mercury.py
  106. +5 −114 nmigen_boards/microzed_z010.py
  107. +5 −114 nmigen_boards/microzed_z020.py
  108. +5 −132 nmigen_boards/mister.py
  109. +5 −48 nmigen_boards/nandland_go.py
  110. +5 −181 nmigen_boards/nexys4ddr.py
  111. +5 −49 nmigen_boards/numato_mimas.py
  112. +5 −120 nmigen_boards/orangecrab_r0_1.py
  113. +5 −130 nmigen_boards/orangecrab_r0_2.py
  114. +5 −80 nmigen_boards/quickfeather.py
  115. +6 −4 nmigen_boards/resources/__init__.py
  116. +5 −34 nmigen_boards/resources/display.py
  117. +5 −142 nmigen_boards/resources/interface.py
  118. +5 −188 nmigen_boards/resources/memory.py
  119. +5 −41 nmigen_boards/resources/user.py
  120. +5 −124 nmigen_boards/rz_easyfpga_a2_2.py
  121. +5 −53 nmigen_boards/sk_xc6slx9.py
  122. +5 −165 nmigen_boards/supercon19badge.py
  123. +5 −130 nmigen_boards/te0714_03_50_2I.py
  124. +6 −0 nmigen_boards/test/__init__.py
  125. +5 −46 nmigen_boards/test/blinky.py
  126. +5 −22 nmigen_boards/tinyfpga_ax1.py
  127. +5 −22 nmigen_boards/tinyfpga_ax2.py
  128. +5 −51 nmigen_boards/tinyfpga_bx.py
  129. +5 −195 nmigen_boards/ulx3s.py
  130. +5 −34 nmigen_boards/upduino_v1.py
  131. +5 −28 nmigen_boards/upduino_v2.py
  132. +5 −174 nmigen_boards/versa_ecp5.py
  133. +5 −12 nmigen_boards/versa_ecp5_5g.py
  134. +5 −74 nmigen_boards/zturn_lite_z007s.py
  135. +5 −6 nmigen_boards/zturn_lite_z010.py
  136. +5 −5 setup.py
4 changes: 2 additions & 2 deletions CONTRIBUTING.txt
Original file line number Diff line number Diff line change
@@ -7,8 +7,8 @@ this purpose.

COPYRIGHTS and LICENSE

nMigen is licensed under the 2-clause BSD license, which is contained in the
LICENSE.txt file.
Amaranth HDL is licensed under the 2-clause BSD license, which is contained in
the LICENSE.txt file.

All authors retain copyright ownership of their contributions.

3 changes: 1 addition & 2 deletions LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
Copyright (C) 2019-2020 whitequark
Copyright (C) 2011-2019 M-Labs Limited
Copyright (C) 2019-2021 Amaranth HDL contributors

Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
10 changes: 4 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
# nMigen boards and connectors
# Amaranth HDL board definitions

## Ready to use board and connector pinouts, and programming scripts
TODO

TBD
## License

### License

nMigen is released under the very permissive two-clause BSD license. Under the terms of this license, you are authorized to use nMigen for closed-source proprietary designs.
Amaranth is released under the very permissive two-clause BSD license. Under the terms of this license, you are authorized to use Amaranth for closed-source proprietary designs.

See LICENSE file for full copyright and license info.
11 changes: 11 additions & 0 deletions amaranth_boards/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
try:
try:
from importlib import metadata as importlib_metadata # py3.8+ stdlib
except ImportError:
import importlib_metadata # py3.7- shim
__version__ = importlib_metadata.version(__package__)
except ImportError:
# No importlib_metadata. This shouldn't normally happen, but some people prefer not installing
# packages via pip at all, instead using PYTHONPATH directly or copying the package files into
# `lib/pythonX.Y/site-packages`. Although not a recommended way, we still try to support it.
__version__ = "unknown" # :nocov:
76 changes: 76 additions & 0 deletions amaranth_boards/alchitry_au.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
import os
import subprocess
import shutil

from amaranth.build import *
from amaranth.vendor.xilinx_7series import *
from .resources import *


__all__ = ["AlchitryAuPlatform"]


def find_loader():
loader_prgm = os.environ.get("ALCHITRY_LOADER", shutil.which("loader"))
if loader_prgm is None:
raise EnvironmentError("Could not find Alchrity Loader. Place "
"it directly in PATH or specify path explicitly via the "
"ALCHITRY_LOADER environment variable")
bridge_bin = os.environ.get("ALCHITRY_BRIDGE_BIN", os.path.join(os.path.dirname(loader_prgm), "au_loader.bin"))
return (loader_prgm, bridge_bin)


class AlchitryAuPlatform(Xilinx7SeriesPlatform):
device = "XC7A35T" # Artix 7 33K LEs
package = "FTG256"
speed = "1"
default_clk = "clk100"
resources = [
Resource("clk100", 0, Pins("N14", dir="i"),
Clock(10e7), Attrs(IOSTANDARD="LVCMOS33")),

# On-Board LED Array
*LEDResources(
pins="K13 K12 L14 L13 M16 M14 M12 N16",
attrs=Attrs(IOSTANDARD="LVCMOS33")),

Resource("usb", 0,
Subsignal("usb_tx", Pins("P16", dir="o")),
Subsignal("usb_rx", Pins("P15", dir="i")),
Attrs(IOSTANDARD="LVCMOS33")
),

# TODO: This is untested
DDR3Resource(0,
rst_n="D13", clk_p="G14", clk_n="F14", clk_en="D15", cs_n="D16", we_n="E11", ras_n="D14", cas_n="D14",
a="F12 G16 G15 E16 H11 G12 H16 H12 H16 H13 E12 H14 F13 J15",
ba="E13 F15 E15",
dqs_p="B15 A15", dqs_n="B9 A10",
dq="A13 B16 B14 C11 C13 C16 C12 C14 D8 B11 C8 B10 A12 A8 B12 A9",
dm="A14 C9", odt="G11",
diff_attrs=Attrs(IOSTANDARD="LVDS"),
attrs=Attrs(IOSTANDARD="LVCMOS15")),
]

connectors = [
Connector("bank", 0, "T8 T7 T5 R5 R8 P8 L2 L3 J1 K1 H1 H2 G1 G2 K5 E6 "
"T10 T9 R6 R7 P9 N9 K2 K3 J4 J5 H3 J3 H4 H5 N6 M6 "),
Connector("bank", 1, "D1 E2 A2 B2 E1 F2 F3 F4 A3 B4 A4 A5 B5 B6 A7 B7 "
"B1 C1 C2 C3 D3 E3 C4 D4 G4 G5 E5 F5 D5 D6 C6 C7 "),
Connector("bank", 2, "T13 R13 T12 R12 R11 R10 N2 N3 P3 P4 M4 L4 N4 M5 L5 P5 "
"P11 P10 N12 N11 P13 N13 M1 M2 P1 N1 R1 R2 T2 R3 T3 T4 "),
Connector("bank", 3, "L14 L13 M12 N16 R16 R15 P14 M15 P16 P15 - - - - - - "
"K13 K12 M16 M14 T16 T14 N14 - - - - - - - - - ")
]

def toolchain_program(self, products, name):
(loader, bridge_bin) = find_loader()
with products.extract("{}.bin".format(name)) as bitstream_filename:
subprocess.check_call([loader, "-e", "-f", bitstream_filename,
"-p", bridge_bin
])


if __name__ == "__main__":
from .test.blinky import Blinky
AlchitryAuPlatform().build(Blinky(), do_program=True)
88 changes: 88 additions & 0 deletions amaranth_boards/arrow_deca.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
import os
import subprocess

from amaranth.build import *
from amaranth.vendor.intel import *
from .resources import *


__all__ = ["ArrowDECAPlatform"]


class ArrowDECAPlatform(IntelPlatform):
device = "10M50DA" # MAX 10
package = "F484"
speed = "C6"
suffix = "GES"
default_clk = "clk50"
resources = [
Resource("clk50", 0, Pins("M8", dir="i"),
Clock(50e6), Attrs(io_standard="2.5 V")),
Resource("clk50", 1, Pins("P11", dir="i"),
Clock(50e6), Attrs(io_standard="3.3 V")),
Resource("clk50", 2, Pins("N15", dir="i"),
Clock(50e6), Attrs(io_standard="1.5 V")),
Resource("clk10", 0, Pins("M9", dir="i"),
Clock(10e6), Attrs(io_standard="2.5 V")),

*LEDResources(
pins="C7 C8 A6 B7 C4 A5 B4 C5",
invert=True,
attrs=Attrs(io_standard="1.2 V")),
*ButtonResources(
pins="H21 H22",
invert=True,
attrs=Attrs(io_standard="1.5 V")),
*SwitchResources(
pins="J21 J22",
attrs=Attrs(io_standard="1.5 V")),
]
connectors = [
Connector("gpio", 0,
"W18 Y18 Y19 AA17 AA20 AA19 AB21 AB20 AB19 Y16 V16 "
"AB18 V15 W17 AB17 AA16 AB16 W16 AB15 W15 Y14 AA15 "
"AB14 AA14 AB13 AA13 AB12 AA12 AB11 AA11 AB10 Y13 Y11 "
"W13 W12 W11 V12 V11 V13 V14 Y17 W14 U15 R13"),
Connector("gpio", 1,
"Y5 Y6 W6 W7 W8 V8 AB8 V7 R11 AB7 AB6 "
"AA7 AA6 Y7 V10 U7 W9 W5 R9 W4 P9 V17 "
"W3"),
]

def toolchain_program(self, products, name):
quartus_pgm = os.environ.get("QUARTUS_PGM", "quartus_pgm")
with products.extract("{}.sof".format(name)) as bitstream_filename:
subprocess.check_call([quartus_pgm, "--haltcc", "--mode", "JTAG",
"--operation", "P;" + bitstream_filename])

@property
def file_templates(self):
# Configure the voltages of the I/O banks by appending the global
# assignments to the template. However, we create our own copy of the
# file templates before modifying them to avoid modifying the original.
return {
**super().file_templates,
"{{name}}.qsf":
super().file_templates.get("{{name}}.qsf") +
r"""
set_global_assignment -name IOBANK_VCCIO 2.5V -section_id 1A
set_global_assignment -name IOBANK_VCCIO 2.5V -section_id 1B
set_global_assignment -name IOBANK_VCCIO 2.5V -section_id 2
set_global_assignment -name IOBANK_VCCIO 3.3V -section_id 3
set_global_assignment -name IOBANK_VCCIO 3.3V -section_id 4
set_global_assignment -name IOBANK_VCCIO 1.5V -section_id 5
set_global_assignment -name IOBANK_VCCIO 1.5V -section_id 6
set_global_assignment -name IOBANK_VCCIO 1.8V -section_id 7
set_global_assignment -name IOBANK_VCCIO 1.2V -section_id 8
set_global_assignment -name FORCE_CONFIGURATION_VCCIO ON
set_global_assignment -name AUTO_RESTART_CONFIGURATION OFF
set_global_assignment -name ENABLE_CONFIGURATION_PINS OFF
set_global_assignment -name ENABLE_BOOT_SEL_PIN OFF
"""
}


if __name__ == "__main__":
from .test.blinky import Blinky
ArrowDECAPlatform().build(Blinky(), do_program=True)
Loading