1 # This file is Copyright (c) 2013 Florent Kermarrec <florent@enjoy-digital.fr>
4 from litex
.build
.generic_platform
import *
5 from litex
.build
.altera
import AlteraPlatform
6 from litex
.build
.altera
.programmer
import USBBlaster
8 # IOs ----------------------------------------------------------------------------------------------
11 ("clk50", 0, Pins("R8"), IOStandard("3.3-V LVTTL")),
13 ("user_led", 0, Pins("A15"), IOStandard("3.3-V LVTTL")),
14 ("user_led", 1, Pins("A13"), IOStandard("3.3-V LVTTL")),
15 ("user_led", 2, Pins("B13"), IOStandard("3.3-V LVTTL")),
16 ("user_led", 3, Pins("A11"), IOStandard("3.3-V LVTTL")),
17 ("user_led", 4, Pins("D1"), IOStandard("3.3-V LVTTL")),
18 ("user_led", 5, Pins("F3"), IOStandard("3.3-V LVTTL")),
19 ("user_led", 6, Pins("B1"), IOStandard("3.3-V LVTTL")),
20 ("user_led", 7, Pins("L3"), IOStandard("3.3-V LVTTL")),
22 ("key", 0, Pins("J15"), IOStandard("3.3-V LVTTL")),
23 ("key", 1, Pins("E1"), IOStandard("3.3-V LVTTL")),
25 ("sw", 0, Pins("M1"), IOStandard("3.3-V LVTTL")),
26 ("sw", 1, Pins("T8"), IOStandard("3.3-V LVTTL")),
27 ("sw", 2, Pins("B9"), IOStandard("3.3-V LVTTL")),
28 ("sw", 3, Pins("M15"), IOStandard("3.3-V LVTTL")),
31 Subsignal("tx", Pins("B4"), IOStandard("3.3-V LVTTL")),
32 Subsignal("rx", Pins("B5"), IOStandard("3.3-V LVTTL"))
35 ("sdram_clock", 0, Pins("R4"), IOStandard("3.3-V LVTTL")),
37 Subsignal("a", Pins("P2 N5 N6 M8 P8 T7 N8 T6 R1 P1 N2 N1 L4")),
38 Subsignal("ba", Pins("M7 M6")),
39 Subsignal("cs_n", Pins("P6")),
40 Subsignal("cke", Pins("L7")),
41 Subsignal("ras_n", Pins("L2")),
42 Subsignal("cas_n", Pins("L1")),
43 Subsignal("we_n", Pins("C2")),
44 Subsignal("dq", Pins("G2 G1 L8 K5 K2 J2 J1 R7 T4 T2 T3 R3 R5 P3 N3 K1")),
45 Subsignal("dm", Pins("R6 T5")),
46 IOStandard("3.3-V LVTTL")
50 Subsignal("data0", Pins("H2")),
51 Subsignal("dclk", Pins("H1")),
52 Subsignal("ncs0", Pins("D2")),
53 Subsignal("asd0", Pins("C1")),
54 IOStandard("3.3-V LVTTL")
58 Subsignal("sclk", Pins("F2")),
59 Subsignal("sdat", Pins("F1")),
60 IOStandard("3.3-V LVTTL")
64 Subsignal("cs_n", Pins("G5")),
65 Subsignal("int", Pins("M2")),
66 IOStandard("3.3-V LVTTL")
70 Subsignal("cs_n", Pins("A10")),
71 Subsignal("saddr", Pins("B10")),
72 Subsignal("sclk", Pins("B14")),
73 Subsignal("sdat", Pins("A9")),
74 IOStandard("3.3-V LVTTL")
78 Pins("D3 C3 A2 A3 B3 B4 A4 B5 A5 D5 B6 A6 B7 D6 A7 C6",
79 "C8 E6 E7 D8 E8 F8 F9 E9 C9 D9 E11 E10 C11 B11 A12 D11",
81 IOStandard("3.3-V LVTTL")
84 Pins("F13 T15 T14 T13 R13 T12 R12 T11 T10 R11 P11 R10 N12 P9 N9 N11",
85 "L16 K16 R16 L15 P15 P16 R14 N16 N15 P14 L14 N14 M10 L13 J16 K15",
87 IOStandard("3.3-V LVTTL")
90 Pins("A14 B16 C14 C16 C15 D16 D15 D14 F15 F16 F14 G16 G15"),
91 IOStandard("3.3-V LVTTL")
95 # Platform -----------------------------------------------------------------------------------------
97 class Platform(AlteraPlatform
):
98 default_clk_name
= "clk50"
99 default_clk_period
= 20
102 AlteraPlatform
.__init
__(self
, "EP4CE22F17C6", _io
)
104 def create_programmer(self
):