|
14 | 14 |
|
15 | 15 | # IOs ---------------------------------------------------------------------------------------------- |
16 | 16 |
|
| 17 | + |
| 18 | +# Documented by @cleverfox |
| 19 | +_io_v8_2 = [ |
| 20 | + # Clk |
| 21 | + ("clk25", 0, Pins("P6"), IOStandard("LVCMOS33")), |
| 22 | + |
| 23 | + # Led |
| 24 | + ("user_led_n", 0, Pins("T6"), IOStandard("LVCMOS33")), |
| 25 | + |
| 26 | + # Button |
| 27 | + ("user_btn_n", 0, Pins("R7"), IOStandard("LVCMOS33")), |
| 28 | + |
| 29 | + # Serial |
| 30 | + ("serial", 0, |
| 31 | + Subsignal("tx", Pins("T6")), #(out) |
| 32 | + Subsignal("rx", Pins("R7")), #(in) |
| 33 | + IOStandard("LVCMOS33") |
| 34 | + ), |
| 35 | + |
| 36 | + # SPIFlash (W25Q32JV) |
| 37 | + ("spiflash", 0, |
| 38 | + Subsignal("cs_n", Pins("N8")), |
| 39 | + # Subsignal("clk", Pins("")), driven through USRMCLK |
| 40 | + Subsignal("mosi", Pins("T8")), |
| 41 | + Subsignal("miso", Pins("T7")), |
| 42 | + IOStandard("LVCMOS33"), |
| 43 | + ), |
| 44 | + |
| 45 | + # SDR SDRAM (M12L64322A-5T) |
| 46 | + ("sdram_clock", 0, Pins("C8"), IOStandard("LVCMOS33")), |
| 47 | + ("sdram", 0, |
| 48 | + Subsignal("a", Pins("A9 B9 B10 C10 D9 C9 E9 D8 E8 C7 B8")), |
| 49 | + Subsignal("dq", Pins( |
| 50 | + "D5 C5 E5 C6 D6 E6 D7 E7", |
| 51 | + "D10 C11 D11 C12 E10 C13 D13 E11", |
| 52 | + "A5 B4 A4 B3 A3 C3 A2 B2", |
| 53 | + "D14 B14 A14 B13 A13 B12 B11 A11")), |
| 54 | + Subsignal("we_n", Pins("B5")), |
| 55 | + Subsignal("ras_n", Pins("B6")), |
| 56 | + Subsignal("cas_n", Pins("A6")), |
| 57 | + # Subsignal("cs_n", Pins("")), # gnd |
| 58 | + # Subsignal("cke", Pins("")), # 3v3 |
| 59 | + Subsignal("ba", Pins("B7 A8")), |
| 60 | + # Subsignal("dm", Pins("")), # gnd |
| 61 | + |
| 62 | + |
| 63 | + IOStandard("LVCMOS33"), |
| 64 | + Misc("SLEWRATE=FAST") |
| 65 | + ), |
| 66 | + |
| 67 | + # RGMII Ethernet (B50612D) |
| 68 | + ("eth_clocks", 0, |
| 69 | + Subsignal("tx", Pins("L1")), |
| 70 | + Subsignal("rx", Pins("J1")), |
| 71 | + IOStandard("LVCMOS33") |
| 72 | + ), |
| 73 | + ("eth", 0, |
| 74 | + # Subsignal("rst_n", Pins("R6")), |
| 75 | + Subsignal("mdio", Pins("T4")), |
| 76 | + Subsignal("mdc", Pins("R5")), |
| 77 | + Subsignal("rx_ctl", Pins("J2")), |
| 78 | + Subsignal("rx_data", Pins("K2 J3 K1 K3")), |
| 79 | + Subsignal("tx_ctl", Pins("L2")), |
| 80 | + Subsignal("tx_data", Pins("M2 M1 P1 R1")), |
| 81 | + IOStandard("LVCMOS33") |
| 82 | + ), |
| 83 | + ("eth_clocks", 1, |
| 84 | + Subsignal("tx", Pins("J16")), |
| 85 | + Subsignal("rx", Pins("M16")), |
| 86 | + IOStandard("LVCMOS33") |
| 87 | + ), |
| 88 | + ("eth", 1, |
| 89 | + # Subsignal("rst_n", Pins("R6")), |
| 90 | + Subsignal("mdio", Pins("T4")), |
| 91 | + Subsignal("mdc", Pins("R5")), |
| 92 | + Subsignal("rx_ctl", Pins("P16")), |
| 93 | + Subsignal("rx_data", Pins("M15 R16 L15 L16")), |
| 94 | + Subsignal("tx_ctl", Pins("K14")), |
| 95 | + Subsignal("tx_data", Pins("K16 J15 J14 K15")), |
| 96 | + IOStandard("LVCMOS33") |
| 97 | + ) |
| 98 | +] |
| 99 | + |
17 | 100 | # Documented by @derekmulcahy |
18 | 101 | _io_v7_1 = [ |
19 | 102 | # Clk |
|
176 | 259 | ), |
177 | 260 | ] |
178 | 261 |
|
| 262 | +# From https://github.com/cleverfox/chubby75/blob/master/5a-75e/hardware_V8.2.md |
| 263 | +_connectors_v8_2 = [ |
| 264 | + ("j1", "C4 D4 E4 - D3 E3 F4 N4 N5 N3 P3 P4 M3 N1 M4 -"), |
| 265 | + ("j2", "F3 F5 G3 - G4 H3 H4 N4 N5 N3 P3 P4 M3 N1 M4 -"), |
| 266 | + ("j3", "G5 H5 J5 - J4 B1 C2 N4 N5 N3 P3 P4 M3 N1 M4 -"), |
| 267 | + ("j4", "C1 D1 E2 - E1 F2 F1 N4 N5 N3 P3 P4 M3 N1 M4 -"), |
| 268 | + ("j5", "G2 G1 H2 - K5 K4 L3 N4 N5 N3 P3 P4 M3 N1 M4 -"), |
| 269 | + ("j6", "L4 L5 P2 - R2 T2 R3 N4 N5 N3 P3 P4 M3 N1 M4 -"), |
| 270 | + ("j7", "T3 R4 M5 - P5 N6 N7 N4 N5 N3 P3 P4 M3 N1 M4 -"), |
| 271 | + ("j8", "P7 M7 P8 - R8 M8 M9 N4 N5 N3 P3 P4 M3 N1 M4 -"), |
| 272 | + ("j9", "P11 N11 M11 - T13 R12 R13 N4 N5 N3 P3 P4 M3 N1 M4 -"), |
| 273 | + ("j10", "R14 T14 D16 - C15 C16 B16 N4 N5 N3 P3 P4 M3 N1 M4 -"), |
| 274 | + ("j11", "B15 C14 T15 - P15 R15 P12 N4 N5 N3 P3 P4 M3 N1 M4 -"), |
| 275 | + ("j12", "P13 N12 N13 - M12 P14 N14 N4 N5 N3 P3 P4 M3 N1 M4 -"), |
| 276 | + ("j13", "H15 H14 G16 - G16 G15 F15 N4 N5 N3 P3 P4 M3 N1 M4 -"), |
| 277 | + ("j14", "E15 E16 L12 - L13 M14 L14 N4 N5 N3 P3 P4 M3 N1 M4 -"), |
| 278 | + ("j15", "J13 K13 J12 - H13 H12 G12 N4 N5 N3 P3 P4 M3 N1 M4 -"), |
| 279 | + ("j16", "G14 G13 F12 - F13 F14 E14 N4 N5 N3 P3 P4 M3 N1 M4 -"), |
| 280 | +] |
179 | 281 | # From https://github.com/q3k/chubby75/blob/master/5a-75e/hardware_V7.1.md |
180 | 282 | _connectors_v7_1 = [ |
181 | 283 | ("j1", "F3 F1 G3 - G2 H3 H5 F15 L2 K1 J5 K2 B16 J14 F12 -"), |
@@ -223,11 +325,15 @@ class Platform(LatticeECP5Platform): |
223 | 325 | default_clk_period = 1e9/25e6 |
224 | 326 |
|
225 | 327 | def __init__(self, revision="7.1", toolchain="trellis"): |
226 | | - assert revision in ["6.0", "7.1"] |
| 328 | + assert revision in ["6.0", "7.1", "8.2"] |
227 | 329 | self.revision = revision |
228 | | - device = {"6.0": "LFE5U-25F-6BG256C", "7.1": "LFE5U-25F-6BG256C"}[revision] |
229 | | - io = {"6.0": _io_v6_0, "7.1": _io_v7_1}[revision] |
230 | | - connectors = {"6.0": _connectors_v6_0, "7.1": _connectors_v7_1}[revision] |
| 330 | + device = {"6.0": "LFE5U-25F-6BG256C", |
| 331 | + "7.1": "LFE5U-25F-6BG256C", |
| 332 | + "8.2": "LFE5U-25F-7BG256I" }[revision] |
| 333 | + io = {"6.0": _io_v6_0, "7.1": _io_v7_1, "8.2": _io_v8_2}[revision] |
| 334 | + connectors = {"6.0": _connectors_v6_0, |
| 335 | + "7.1": _connectors_v7_1, |
| 336 | + "8.2": _connectors_v8_2 }[revision] |
231 | 337 | LatticeECP5Platform.__init__(self, device, io, connectors=connectors, toolchain=toolchain) |
232 | 338 |
|
233 | 339 | def create_programmer(self): |
|
0 commit comments