Skip to content

Commit abf3230

Browse files
kholiawhitequark
authored andcommitted
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.
1 parent 306890f commit abf3230

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

nmigen_boards/ebaz4205.py

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
import os
2+
import subprocess
3+
4+
from nmigen.build import *
5+
from nmigen.vendor.xilinx_7series import *
6+
from .resources import *
7+
8+
9+
__all__ = ["EBAZ4205Platform"]
10+
11+
12+
class EBAZ4205Platform(Xilinx7SeriesPlatform):
13+
device = "xc7z010"
14+
package = "clg400"
15+
speed = "1"
16+
default_clk = "clk33_333"
17+
resources = [
18+
Resource("clk33_333", 0,
19+
Pins("N18", dir="i"), Clock(33.333e6), Attrs(IOSTANDARD="LVCMOS33")),
20+
21+
*LEDResources(
22+
pins="W14 W13",
23+
attrs=Attrs(IOSTANDARD="LVCMOS33")),
24+
25+
UARTResource(0,
26+
rx="B19", tx="B20",
27+
attrs=Attrs(IOSTANDARD="LVCMOS33")),
28+
]
29+
connectors = [
30+
]
31+
32+
def toolchain_program(self, products, name, **kwargs):
33+
xc3sprog = os.environ.get("XC3SPROG", "xc3sprog")
34+
with products.extract("{}.bit".format(name)) as bitstream_filename:
35+
subprocess.run([xc3sprog, "-c", "jtaghs1_fast", "-p", "1", bitstream_filename], check=True)
36+
37+
38+
if __name__ == "__main__":
39+
from .test.blinky import *
40+
EBAZ4205Platform().build(Blinky(), do_program=True)

0 commit comments

Comments
 (0)