ecp5_evn: add SPI Flash, UART, and EXTCLK peripherals
[nmigen-boards.git] / nmigen_boards / numato_mimas.py
1 import os
2 import subprocess
3
4 from nmigen.build import *
5 from nmigen.vendor.xilinx_spartan_3_6 import *
6 from .resources import *
7
8
9 __all__ = ["NumatoMimasPlatform"]
10
11
12 class NumatoMimasPlatform(XilinxSpartan6Platform):
13 device = "xc6slx9"
14 package = "tqg144"
15 speed = "2"
16 default_clk = "clk100"
17 resources = [
18 Resource("clk100", 0, Pins("P126", dir="i"),
19 Clock(100e6), Attrs(IOSTANDARD="LVCMOS33")),
20
21 *LEDResources(pins="P119 P118 P117 P116 P115 P114 P112 P111",
22 attrs=Attrs(IOSTANDARD="LVCMOS33")),
23 *ButtonResources(pins="P124 P123 P121 P120",
24 attrs=Attrs(IOSTANDARD="LVCMOS33", PULLUP="TRUE")),
25
26 *SPIFlashResources(0,
27 cs="P38", clk="P70", mosi="P64", miso="65",
28 attrs=Attrs(IOSTANDARD="LVCMOS33")
29 ),
30 ]
31 connectors = [
32 Connector("p", 1,
33 "- - P35 P34 P33 P32 P30 P29 P27 P26 "
34 "P24 P23 P22 P21 P17 P16 P15 P14 P12 P11 "
35 "P10 P9 P8 P7 P6 P5 P2 P1 P142 P141 "
36 "P140 P139 P138 P137 P134 P133 P132 P131 - - "
37 ),
38 Connector("p", 2,
39 "- - P43 P44 P45 P46 P47 P48 P50 P51 "
40 "P55 P56 P74 P75 P78 P79 P80 P81 - - "
41 "P82 P83 P84 P85 P87 P88 P92 P93 P94 P95 "
42 "P97 P98 P99 P100 P101 P102 P104 P105 - - "
43 )
44 ]
45
46 # Programming this board is not currently supported.
47
48
49 if __name__ == "__main__":
50 from .test.blinky import *
51 NumatoMimasPlatform().build(Blinky())