litex-boards/litex_boards/platforms/kx2.py

76 lines
3.0 KiB
Python
Raw Normal View History

2020-01-13 11:22:33 -05:00
# This file is Copyright (c) 2020 Mark Standke <mstandke@cern.ch>
2020-01-13 08:21:54 -05:00
# License: BSD
from litex.build.generic_platform import *
from litex.build.xilinx import XilinxPlatform, VivadoProgrammer
# IOs ----------------------------------------------------------------------------------------------
_io = [
2020-04-09 14:02:02 -04:00
("user_led", 0, Pins("U9"), IOStandard("LVCMOS15")),
2020-01-13 08:21:54 -05:00
("user_led", 1, Pins("V12"), IOStandard("LVCMOS15")),
("user_led", 2, Pins("V13"), IOStandard("LVCMOS15")),
("user_led", 3, Pins("W13"), IOStandard("LVCMOS15")),
("cpu_reset_n", 0, Pins("G9"), IOStandard("LVCMOS25")),
("clk200", 0,
2020-01-13 11:22:33 -05:00
Subsignal("p", Pins("AB11"), IOStandard("LVDS")),
Subsignal("n", Pins("AC11"), IOStandard("LVDS"))
),
2020-01-13 08:21:54 -05:00
("serial", 0,
2020-01-13 11:22:33 -05:00
Subsignal("tx", Pins("W11")),
Subsignal("rx", Pins("AB16")),
IOStandard("LVCMOS15") # FIXME: LVCMOS15 or LVCMOS33?
2020-01-13 08:21:54 -05:00
),
("ddram", 0,
2020-01-13 11:22:33 -05:00
Subsignal("a", Pins(
2020-04-09 14:02:02 -04:00
"AE11 AF9 AD10 AB10 AA9 AB9 AA8 AC8",
"AA7 AE8 AF10 AD8 AE10 AF8 AC7"),
2020-01-13 11:22:33 -05:00
IOStandard("SSTL15")),
2020-04-09 14:02:02 -04:00
Subsignal("ba", Pins("AD11 AA10 AF12"), IOStandard("SSTL15")),
2020-01-13 11:22:33 -05:00
Subsignal("ras_n", Pins("AE13"), IOStandard("SSTL15")),
Subsignal("cas_n", Pins("AE12"), IOStandard("SSTL15")),
2020-04-09 14:02:02 -04:00
Subsignal("we_n", Pins("AA12"), IOStandard("SSTL15")),
Subsignal("cs_n", Pins("Y12"), IOStandard("SSTL15")),
Subsignal("dm", Pins(
"Y3 U5 AD4 AC4 AF19 AC16 AB19 V14"),
2020-01-13 11:22:33 -05:00
IOStandard("SSTL15")),
Subsignal("dq", Pins(
2020-04-09 14:02:02 -04:00
"AA2 Y2 AB2 V1 Y1 W1 AC2 V2",
"W3 V3 U1 U7 U6 V4 V6 U2",
"AE3 AE6 AF3 AD1 AE1 AE2 AF2 AE5",
"AD5 Y5 AC6 Y6 AB4 AD6 AB6 AC3",
2020-01-13 11:22:33 -05:00
"AD16 AE17 AF15 AF20 AD15 AF14 AE15 AF17",
"AA14 AA15 AC14 AD14 AB14 AB15 AA17 AA18",
"AB20 AD19 AC19 AA20 AA19 AC17 AD18 AB17",
2020-04-09 14:02:02 -04:00
"W15 W16 W14 V16 V19 V17 V18 Y17"),
2020-01-13 11:22:33 -05:00
IOStandard("SSTL15_T_DCI")),
Subsignal("dqs_p", Pins("AB1 W6 AF5 AA5 AE18 Y15 AD20 W18"),
IOStandard("DIFF_SSTL15")),
Subsignal("dqs_n", Pins("AC1 W5 AF4 AB5 AF18 Y16 AE20 W19"),
IOStandard("DIFF_SSTL15")),
Subsignal("clk_p", Pins("AB12"), IOStandard("DIFF_SSTL15")),
Subsignal("clk_n", Pins("AC12"), IOStandard("DIFF_SSTL15")),
2020-04-09 14:02:02 -04:00
Subsignal("cke", Pins("AA13"), IOStandard("SSTL15")),
Subsignal("odt", Pins("AD13"), IOStandard("SSTL15")),
2020-01-13 11:22:33 -05:00
Subsignal("reset_n", Pins("AB7"), IOStandard("LVCMOS15")),
Misc("SLEW=FAST"),
Misc("VCCAUX_IO=HIGH")
),
2020-01-13 08:21:54 -05:00
]
# Platform -----------------------------------------------------------------------------------------
class Platform(XilinxPlatform):
2020-01-13 11:22:33 -05:00
default_clk_name = "clk200"
default_clk_period = 1e9/200e6
2020-01-13 08:21:54 -05:00
def __init__(self):
XilinxPlatform.__init__(self, " xc7k160tffg676-2", _io, toolchain="vivado")
def create_programmer(self):
return VivadoProgrammer()