From 4134e6a8e106a1c954661ce9163ec1c439e260d2 Mon Sep 17 00:00:00 2001 From: morgan Date: Mon, 3 Jun 2024 15:58:13 +0800 Subject: [PATCH] fmc: add cxp_4r_fmc adepter io --- src/gateware/cxp_4r_fmc.py | 87 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 87 insertions(+) create mode 100644 src/gateware/cxp_4r_fmc.py diff --git a/src/gateware/cxp_4r_fmc.py b/src/gateware/cxp_4r_fmc.py new file mode 100644 index 0000000..a6620b5 --- /dev/null +++ b/src/gateware/cxp_4r_fmc.py @@ -0,0 +1,87 @@ +from migen.build.generic_platform import * + +fmc_adapter_io = [ + + # CoaXPress high speed link + ("CXP_HS", 0, + Subsignal("txp", Pins("HPC:DP0_C2M_P")), + Subsignal("txn", Pins("HPC:DP0_C2M_N")), + Subsignal("rxp", Pins("HPC:DP0_M2C_P")), + Subsignal("rxn", Pins("HPC:DP0_M2C_N")), + ), + ("CXP_HS", 1, + Subsignal("txp", Pins("HPC:DP1_C2M_P")), + Subsignal("txn", Pins("HPC:DP1_C2M_N")), + Subsignal("rxp", Pins("HPC:DP1_M2C_P")), + Subsignal("rxn", Pins("HPC:DP1_M2C_N")), + ), + ("CXP_HS", 2, + Subsignal("txp", Pins("HPC:DP2_C2M_P")), + Subsignal("txn", Pins("HPC:DP2_C2M_N")), + Subsignal("rxp", Pins("HPC:DP2_M2C_P")), + Subsignal("rxn", Pins("HPC:DP2_M2C_N")), + ), + ("CXP_HS", 3, + Subsignal("txp", Pins("HPC:DP3_C2M_P")), + Subsignal("txn", Pins("HPC:DP3_C2M_N")), + Subsignal("rxp", Pins("HPC:DP3_M2C_P")), + Subsignal("rxn", Pins("HPC:DP3_M2C_N")), + ), + + # CoaXPress low speed link + ("CXP_LS", 0, Pins("HPC:LA00_CC_P"), IOStandard("LVCMOS33")), + ("CXP_LS", 1, Pins("HPC:LA01_CC_N"), IOStandard("LVCMOS33")), + ("CXP_LS", 2, Pins("HPC:LA01_CC_P"), IOStandard("LVCMOS33")), + ("CXP_LS", 3, Pins("HPC:LA02_N"), IOStandard("LVCMOS33")), + + # CoaXPress green and red LED + ("CXP_LED", 0, + Subsignal("green", Pins("HPC:LA11_P"), IOStandard("LVCMOS33")), + Subsignal("red", Pins("HPC:LA11_N"), IOStandard("LVCMOS33")), + ), + ("CXP_LED", 1, + Subsignal("green", Pins("HPC:LA12_P"), IOStandard("LVCMOS33")), + Subsignal("red", Pins("HPC:LA12_N"), IOStandard("LVCMOS33")), + ), + ("CXP_LED", 2, + Subsignal("green", Pins("HPC:LA13_P"), IOStandard("LVCMOS33")), + Subsignal("red", Pins("HPC:LA13_N"), IOStandard("LVCMOS33")), + ), + ("CXP_LED", 3, + Subsignal("green", Pins("HPC:LA14_P"), IOStandard("LVCMOS33")), + Subsignal("red", Pins("HPC:LA14_N"), IOStandard("LVCMOS33")), + ), + + # Power over CoaXPress + ("PoCXP", 0, + Subsignal("enable", Pins("HPC:LA21_N"), IOStandard("LVCMOS33")), + Subsignal("alert", Pins("HPC:LA18_CC_P"), IOStandard("LVCMOS33")), + ), + ("PoCXP", 1, + Subsignal("enable", Pins("HPC:LA21_P"), IOStandard("LVCMOS33")), + Subsignal("alert", Pins("HPC:LA19_N"), IOStandard("LVCMOS33")), + ), + ("PoCXP", 2, + Subsignal("enable", Pins("HPC:LA22_N"), IOStandard("LVCMOS33")), + Subsignal("alert", Pins("HPC:LA19_P"), IOStandard("LVCMOS33")), + ), + ("PoCXP", 3, + Subsignal("enable", Pins("HPC:LA22_P"), IOStandard("LVCMOS33")), + Subsignal("alert", Pins("HPC:LA20_N"), IOStandard("LVCMOS33")), + ), + + ("i2c_fmc", 0, + Subsignal("scl", Pins("HPC:IIC_SCL")), + Subsignal("sda", Pins("HPC:IIC_SDA")), + IOStandard("LVCMOS33") + ), + + ("3V3", 0, Pins("HPC:PG_M2C")), + ("GND", 0, Pins("HPC:PRSNT_M2C_L HPC:CLK0_M2C_P")), + ("VADJ", 0, Pins("HPC:GBTCLK1_M2C_N CLK0_M2C_N")), + + ("clk125_fmc", 0, + Subsignal("p", Pins("HPC:GBTCLK0_M2C_P")), + Subsignal("n", Pins("HPC:GBTCLK0_M2C_n")), + ), +]