Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: m-labs/migen
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 452c60e0c37b
Choose a base ref
...
head repository: m-labs/migen
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 5bb1c789aa37
Choose a head ref
  • 2 commits
  • 2 files changed
  • 1 contributor

Commits on Feb 18, 2015

  1. Copy the full SHA
    cea1551 View commit details
  2. mibuild/kc705: add FMC connectors

    fallen authored and sbourdeauducq committed Feb 18, 2015
    Copy the full SHA
    5bb1c78 View commit details
Showing with 206 additions and 6 deletions.
  1. +12 −5 mibuild/generic_platform.py
  2. +194 −1 mibuild/platforms/kc705.py
17 changes: 12 additions & 5 deletions mibuild/generic_platform.py
Original file line number Diff line number Diff line change
@@ -68,10 +68,16 @@ def __init__(self, connectors):
for connector in connectors:
cit = iter(connector)
conn_name = next(cit)
pin_list = []
for pins in cit:
pin_list += pins.split()
pin_list = [None if pin == "None" else pin for pin in pin_list]
if isinstance(connector[1], str):
pin_list = []
for pins in cit:
pin_list += pins.split()
pin_list = [None if pin == "None" else pin for pin in pin_list]
elif isinstance(connector[1], dict):
pin_list = connector[1]
else:
raise ValueError("Unsupported pin list type {} for connector"
" {}".format(type(connector[1]), conn_name))
if conn_name in self.connector_table:
raise ValueError("Connector specified more than once: "+conn_name)
self.connector_table[conn_name] = pin_list
@@ -81,7 +87,8 @@ def resolve_identifiers(self, identifiers):
for identifier in identifiers:
if ":" in identifier:
conn, pn = identifier.split(":")
pn = int(pn)
if pn.isdigit():
pn = int(pn)
r.append(self.connector_table[conn][pn])
else:
r.append(identifier)
195 changes: 194 additions & 1 deletion mibuild/platforms/kc705.py
Original file line number Diff line number Diff line change
@@ -146,6 +146,199 @@
),
]

_connectors = [
("HPC",
{
"DP1_M2C_P": "D6",
"DP1_M2C_N": "D5",
"DP2_M2C_P": "B6",
"DP2_M2C_N": "B5",
"DP3_M2C_P": "A8",
"DP3_M2C_N": "A7",
"DP1_C2M_P": "C4",
"DP1_C2M_N": "C3",
"DP2_C2M_P": "B2",
"DP2_C2M_N": "B1",
"DP3_C2M_P": "A4",
"DP3_C2M_N": "A3",
"DP0_C2M_P": "D2",
"DP0_C2M_N": "D1",
"DP0_M2C_P": "E4",
"DP0_M2C_N": "E3",
"LA06_P": "H30",
"LA06_N": "G30",
"LA10_P": "D29",
"LA10_N": "C30",
"LA14_P": "B28",
"LA14_N": "A28",
"LA18_CC_P": "F21",
"LA18_CC_N": "E21",
"LA27_P": "C19",
"LA27_N": "B19",
"HA01_CC_P": "H14",
"HA01_CC_N": "G14",
"HA05_P": "F15",
"HA05_N": "E16",
"HA09_P": "F12",
"HA09_N": "E13",
"HA13_P": "L16",
"HA13_N": "K16",
"HA16_P": "L15",
"HA16_N": "K15",
"HA20_P": "K13",
"HA20_N": "J13",
"CLK1_M2C_P": "D17",
"CLK1_M2C_N": "D18",
"LA00_CC_P": "C25",
"LA00_CC_N": "B25",
"LA03_P": "H26",
"LA03_N": "H27",
"LA08_P": "E29",
"LA08_N": "E30",
"LA12_P": "C29",
"LA12_N": "B29",
"LA16_P": "B27",
"LA16_N": "A27",
"LA20_P": "E19",
"LA20_N": "D19",
"LA22_P": "C20",
"LA22_N": "B20",
"LA25_P": "G17",
"LA25_N": "F17",
"LA29_P": "C17",
"LA29_N": "B17",
"LA31_P": "G22",
"LA31_N": "F22",
"LA33_P": "H21",
"LA33_N": "H22",
"HA03_P": "C12",
"HA03_N": "B12",
"HA07_P": "B14",
"HA07_N": "A15",
"HA11_P": "B13",
"HA11_N": "A13",
"HA14_P": "J16",
"HA14_N": "H16",
"HA18_P": "K14",
"HA18_N": "J14",
"HA22_P": "L11",
"HA22_N": "K11",
"GBTCLK1_M2C_P": "E8",
"GBTCLK1_M2C_N": "E7",
"GBTCLK0_M2C_P": "C8",
"GBTCLK0_M2C_N": "C7",
"LA01_CC_P": "D26",
"LA01_CC_N": "C26",
"LA05_P": "G29",
"LA05_N": "F30",
"LA09_P": "B30",
"LA09_N": "A30",
"LA13_P": "A25",
"LA13_N": "A26",
"LA17_CC_P": "F20",
"LA17_CC_N": "E20",
"LA23_P": "B22",
"LA23_N": "A22",
"LA26_P": "B18",
"LA26_N": "A18",
"PG_M2C": "J29",
"HA00_CC_P": "D12",
"HA00_CC_N": "D13",
"HA04_P": "F11",
"HA04_N": "E11",
"HA08_P": "E14",
"HA08_N": "E15",
"HA12_P": "C15",
"HA12_N": "B15",
"HA15_P": "H15",
"HA15_N": "G15",
"HA19_P": "H11",
"HA19_N": "H12",
"PRSNT_M2C_B": "M20",
"CLK0_M2C_P": "D27",
"CLK0_M2C_N": "C27",
"LA02_P": "H24",
"LA02_N": "H25",
"LA04_P": "G28",
"LA04_N": "F28",
"LA07_P": "E28",
"LA07_N": "D28",
"LA11_P": "G27",
"LA11_N": "F27",
"LA15_P": "C24",
"LA15_N": "B24",
"LA19_P": "G18",
"LA19_N": "F18",
"LA21_P": "A20",
"LA21_N": "A21",
"LA24_P": "A16",
"LA24_N": "A17",
"LA28_P": "D16",
"LA28_N": "C16",
"LA30_P": "D22",
"LA30_N": "C22",
"LA32_P": "D21",
"LA32_N": "C21",
"HA02_P": "D11",
"HA02_N": "C11",
"HA06_P": "D14",
"HA06_N": "C14",
"HA10_P": "A11",
"HA10_N": "A12",
"HA17_CC_P": "G13",
"HA17_CC_N": "F13",
"HA21_P": "J11",
"HA21_N": "J12",
"HA23_P": "L12",
"HA23_N": "L13",
}
),
("LPC",
{
"GBTCLK0_M2C_P": "N8",
"GBTCLK0_M2C_N": "N7",
"LA01_CC_P": "AE23",
"LA01_CC_N": "AF23",
"LA05_P": "AG22",
"LA05_N": "AH22",
"LA09_P": "AK23",
"LA09_N": "AK24",
"LA13_P": "AB24",
"LA13_N": "AC25",
"LA17_CC_P": "AB27",
"LA17_CC_N": "AC27",
"LA23_P": "AH26",
"LA23_N": "AH27",
"LA26_P": "AK29",
"LA26_N": "AK30",
"CLK0_M2C_P": "AF22",
"CLK0_M2C_N": "AG23",
"LA02_P": "AF20",
"LA02_N": "AF21",
"LA04_P": "AH21",
"LA04_N": "AJ21",
"LA07_P": "AG25",
"LA07_N": "AH25",
"LA11_P": "AE25",
"LA11_N": "AF25",
"LA15_P": "AC24",
"LA15_N": "AD24",
"LA19_P": "AJ26",
"LA19_N": "AK26",
"LA21_P": "AG27",
"LA21_N": "AG28",
"LA24_P": "AG30",
"LA24_N": "AH30",
"LA28_P": "AE30",
"LA28_N": "AF30",
"LA30_P": "AB29",
"LA30_N": "AB30",
"LA32_P": "Y30",
"LA32_N": "AA30",
}
)
]

def Platform(*args, toolchain="vivado", **kwargs):
if toolchain == "ise":
xilinx_platform = XilinxISEPlatform
@@ -158,7 +351,7 @@ class RealPlatform(xilinx_platform):
bitgen_opt = "-g LCK_cycle:6 -g Binary:Yes -w -g ConfigRate:12 -g SPI_buswidth:4"

def __init__(self, crg_factory=lambda p: CRG_DS(p, "clk156", "cpu_reset")):
xilinx_platform.__init__(self, "xc7k325t-ffg900-2", _io, crg_factory)
xilinx_platform.__init__(self, "xc7k325t-ffg900-2", _io, crg_factory, _connectors)

def create_programmer(self):
return XC3SProg("jtaghs1_fast", "bscan_spi_kc705.bit")