Skip to content

Commit 56f359d

Browse files
esdensbourdeauducq
authored andcommitted
Added icebreaker platform. (#135)
1 parent 88e72a5 commit 56f359d

File tree

1 file changed

+57
-0
lines changed

1 file changed

+57
-0
lines changed
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
from migen.build.generic_platform import *
2+
from migen.build.lattice import LatticePlatform
3+
from migen.build.lattice.programmer import IceStormProgrammer
4+
5+
6+
_io = [
7+
("user_ledr_n", 0, Pins("11"), IOStandard("LVCMOS33")),
8+
("user_ledg_n", 0, Pins("34"), IOStandard("LVCMOS33")),
9+
("user_button_n", 0, Pins("10"), IOStandard("LVCMOS33")),
10+
11+
("serial", 0,
12+
Subsignal("rx", Pins("6")),
13+
Subsignal("tx", Pins("9"), Misc("PULLUP")),
14+
IOStandard("LVCMOS33")
15+
),
16+
17+
("spiflash", 0,
18+
Subsignal("cs_n", Pins("16"), IOStandard("LVCMOS33")),
19+
Subsignal("clk", Pins("15"), IOStandard("LVCMOS33")),
20+
Subsignal("si", Pins("17"), IOStandard("LVCMOS33")),
21+
Subsignal("so", Pins("14"), IOStandard("LVCMOS33")),
22+
Subsignal("wp_n", Pins("12"), IOStandard("LVCMOS33")),
23+
Subsignal("hld_rst_n", Pins("13"), IOStandard("LVCMOS33")),
24+
),
25+
26+
("spiflash4x", 0,
27+
Subsignal("cs_n", Pins("16"), IOStandard("LVCMOS33")),
28+
Subsignal("clk", Pins("15"), IOStandard("LVCMOS33")),
29+
Subsignal("dq", Pins("14 17 12 13"), IOStandard("LVCMOS33")),
30+
),
31+
32+
("break_off_pmod", 0,
33+
Subsignal("btn", Pins("20 19 18"), IOStandard("LVCMOS33")),
34+
Subsignal("ledr", Pins("26"), IOStandard("LVCMOS33")),
35+
Subsignal("ledg", Pins("27 25 23 21"), IOStandard("LVCMOS33")),
36+
),
37+
38+
("clk12", 0, Pins("35"), IOStandard("LVCMOS33"))
39+
]
40+
41+
_connectors = [
42+
("PMOD1A", "4 2 47 45 3 48 46 44"),
43+
("PMOD1B", "43 38 34 31 42 36 32 28"),
44+
("PMOD2", "27 25 21 19 26 23 20 18")
45+
]
46+
47+
48+
class Platform(LatticePlatform):
49+
default_clk_name = "clk12"
50+
default_clk_period = 83.333
51+
52+
def __init__(self):
53+
LatticePlatform.__init__(self, "ice40-up5k-sg48", _io, _connectors,
54+
toolchain="icestorm")
55+
56+
def create_programmer(self):
57+
return IceStormProgrammer()

0 commit comments

Comments
 (0)