aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDhiru Kholia <dhiru.kholia@gmail.com>2021-08-13 09:07:01 +0530
committerwhitequark <whitequark@whitequark.org>2021-08-13 07:46:28 +0000
commitabf3230cbacd73f30843b1b19c42bfd2374ac66d (patch)
treea414db51d08795a51ac62b10244627559a7dbf58
parent306890f884815835f90bf7099242b450a92d3600 (diff)
Add support for EBAZ4205 'Development' Board
References: - https://github.com/fusesoc/blinky/pull/68/files (EBAZ4205 blinky) - https://github.com/fusesoc/blinky#ebaz4205-development-board - https://github.com/olofk/serv/pull/59/files (EBAZ4205 'serv' support) - Existing 'arty_z7.py' example Usage: ``` $ pwd nmigen-boards/nmigen_boards $ pip3 install --editable "." $ python3 -m nmigen_boards.ebaz4205 ``` At this point, both the LEDs should start blinking.
-rw-r--r--nmigen_boards/ebaz4205.py40
1 files changed, 40 insertions, 0 deletions
diff --git a/nmigen_boards/ebaz4205.py b/nmigen_boards/ebaz4205.py
new file mode 100644
index 0000000..062c7c7
--- /dev/null
+++ b/nmigen_boards/ebaz4205.py
@@ -0,0 +1,40 @@
+import os
+import subprocess
+
+from nmigen.build import *
+from nmigen.vendor.xilinx_7series import *
+from .resources import *
+
+
+__all__ = ["EBAZ4205Platform"]
+
+
+class EBAZ4205Platform(Xilinx7SeriesPlatform):
+ device = "xc7z010"
+ package = "clg400"
+ speed = "1"
+ default_clk = "clk33_333"
+ resources = [
+ Resource("clk33_333", 0,
+ Pins("N18", dir="i"), Clock(33.333e6), Attrs(IOSTANDARD="LVCMOS33")),
+
+ *LEDResources(
+ pins="W14 W13",
+ attrs=Attrs(IOSTANDARD="LVCMOS33")),
+
+ UARTResource(0,
+ rx="B19", tx="B20",
+ attrs=Attrs(IOSTANDARD="LVCMOS33")),
+ ]
+ connectors = [
+ ]
+
+ def toolchain_program(self, products, name, **kwargs):
+ xc3sprog = os.environ.get("XC3SPROG", "xc3sprog")
+ with products.extract("{}.bit".format(name)) as bitstream_filename:
+ subprocess.run([xc3sprog, "-c", "jtaghs1_fast", "-p", "1", bitstream_filename], check=True)
+
+
+if __name__ == "__main__":
+ from .test.blinky import *
+ EBAZ4205Platform().build(Blinky(), do_program=True)