##################################################################
#FPGA Pins when FMC-RF-2X245 is mounted on WARP v3 rev 1.1
# These contraints will likely need to be renamed, depending on
# the user project (i.e. FMC RFA/RFB -> WARPLab RFC/RFD)
##################################################################

#FMC bidirectional clock direction indicator
# WARP v3 always drives CLK2_BIDIR and CLK3_BIDIR (CLK_DIR = 1, per FMC spec)
# FMC-RF-2X245 ties this to VDD or floats, depending on build)
NET "CLK_DIR" LOC = M23 | IOSTANDARD = LVCMOS25;

#MGTs IO (FMC module only connects DP[4:7])
NET "FMC_DP4_C2M_N" LOC = H2 | IOSTANDARD = LVCMOS25;
NET "FMC_DP4_C2M_P" LOC = H1 | IOSTANDARD = LVCMOS25;
NET "FMC_DP4_M2C_N" LOC = K6 | IOSTANDARD = LVCMOS25;
NET "FMC_DP4_M2C_P" LOC = K5 | IOSTANDARD = LVCMOS25;
NET "FMC_DP5_C2M_N" LOC = M2 | IOSTANDARD = LVCMOS25;
NET "FMC_DP5_C2M_P" LOC = M1 | IOSTANDARD = LVCMOS25;
NET "FMC_DP5_M2C_N" LOC = N4 | IOSTANDARD = LVCMOS25;
NET "FMC_DP5_M2C_P" LOC = N3 | IOSTANDARD = LVCMOS25;
NET "FMC_DP6_C2M_N" LOC = K2 | IOSTANDARD = LVCMOS25;
NET "FMC_DP6_C2M_P" LOC = K1 | IOSTANDARD = LVCMOS25;
NET "FMC_DP6_M2C_N" LOC = L4 | IOSTANDARD = LVCMOS25;
NET "FMC_DP6_M2C_P" LOC = L3 | IOSTANDARD = LVCMOS25;
NET "FMC_DP7_C2M_N" LOC = F2 | IOSTANDARD = LVCMOS25;
NET "FMC_DP7_C2M_P" LOC = F1 | IOSTANDARD = LVCMOS25;
NET "FMC_DP7_M2C_N" LOC = J4 | IOSTANDARD = LVCMOS25;
NET "FMC_DP7_M2C_P" LOC = J3 | IOSTANDARD = LVCMOS25;

#MGT reference clocks (1 LVDS oscillator, 1 coax connector pair)
NET "MGTCLK_OSC_N" LOC = P5 | IOSTANDARD = LVCMOS25;
NET "MGTCLK_OSC_P" LOC = P6 | IOSTANDARD = LVCMOS25;
NET "MGTCLK_COAX_N" LOC = H5 | IOSTANDARD = LVCMOS25;
NET "MGTCLK_COAX_P" LOC = H6 | IOSTANDARD = LVCMOS25;

#I2C for MGT ref oscillator, when configured for 2.5v I2C (typically unused)
NET "MGT_OSC_I2C_SCL_VADJ" LOC = G11 | IOSTANDARD = LVCMOS25;
NET "MGT_OSC_I2C_SDA_VADJ" LOC = F13 | IOSTANDARD = LVCMOS25;

#FMC module I2C EEPROM
NET "FMC_I2C_SCL" LOC = F23 | IOSTANDARD = LVCMOS25;
NET "FMC_I2C_SDA" LOC = F24 | IOSTANDARD = LVCMOS25;
#Copy of sampling clock from FMC module (only used when module is built with oscillator)
NET "FMC_M2C_SAMPCLK_N" LOC = K23 | IOSTANDARD = LVCMOS25;
NET "FMC_M2C_SAMPCLK_P" LOC = K24 | IOSTANDARD = LVCMOS25;

###################
#RF Interface Pins

#RSSI ADC
NET "RFA_RSSI_D0" LOC = D21 | IOSTANDARD = LVCMOS25;
NET "RFA_RSSI_D1" LOC = E19 | IOSTANDARD = LVCMOS25;
NET "RFA_RSSI_D2" LOC = G20 | IOSTANDARD = LVCMOS25;
NET "RFA_RSSI_D3" LOC = E22 | IOSTANDARD = LVCMOS25;
NET "RFA_RSSI_D4" LOC = E23 | IOSTANDARD = LVCMOS25;
NET "RFA_RSSI_D5" LOC = F21 | IOSTANDARD = LVCMOS25;
NET "RFA_RSSI_D6" LOC = B20 | IOSTANDARD = LVCMOS25;
NET "RFA_RSSI_D7" LOC = B23 | IOSTANDARD = LVCMOS25;
NET "RFA_RSSI_D8" LOC = C19 | IOSTANDARD = LVCMOS25;
NET "RFA_RSSI_D9" LOC = C23 | IOSTANDARD = LVCMOS25;

NET "RFB_RSSI_D0" LOC = D19 | IOSTANDARD = LVCMOS25;
NET "RFB_RSSI_D1" LOC = E21 | IOSTANDARD = LVCMOS25;
NET "RFB_RSSI_D2" LOC = A23 | IOSTANDARD = LVCMOS25;
NET "RFB_RSSI_D3" LOC = A24 | IOSTANDARD = LVCMOS25;
NET "RFB_RSSI_D4" LOC = F19 | IOSTANDARD = LVCMOS25;
NET "RFB_RSSI_D5" LOC = H19 | IOSTANDARD = LVCMOS25;
NET "RFB_RSSI_D6" LOC = F20 | IOSTANDARD = LVCMOS25;
NET "RFB_RSSI_D7" LOC = H20 | IOSTANDARD = LVCMOS25;
NET "RFB_RSSI_D8" LOC = C20 | IOSTANDARD = LVCMOS25;
NET "RFB_RSSI_D9" LOC = J20 | IOSTANDARD = LVCMOS25;

NET "RSSI_ADC_CLK" LOC = G13 | IOSTANDARD = LVCMOS25;
NET "RSSI_ADC_PD" LOC = A21 | IOSTANDARD = LVCMOS25;

#User LEDs
NET "RFA_LEDG" LOC = L19 | IOSTANDARD = LVCMOS25;
NET "RFA_LEDR" LOC = L18 | IOSTANDARD = LVCMOS25;

NET "RFB_LEDG" LOC = D16 | IOSTANDARD = LVCMOS25;
NET "RFB_LEDR" LOC = A15 | IOSTANDARD = LVCMOS25;

##########
#FMC module RF A pins (probably renamed RF C in user project)

#ADC/DAC
NET "RFA_AD_SPI_SCLK" LOC = B25 | IOSTANDARD = LVCMOS25;
NET "RFA_AD_SPI_SDIO" LOC = D26 | IOSTANDARD = LVCMOS25;
NET "RFA_AD_SPI_CS" LOC = D27 | IOSTANDARD = LVCMOS25;
NET "RFA_AD_RESET" LOC = B27 | IOSTANDARD = LVCMOS25;

NET "RFA_AD_TRXCLK" LOC = C28 | IOSTANDARD = LVCMOS25;
NET "RFA_AD_TRXIQ" LOC = D29 | IOSTANDARD = LVCMOS25;

NET "RFA_AD_TRXD0" LOC = C29 | IOSTANDARD = LVCMOS25;
NET "RFA_AD_TRXD1" LOC = C24 | IOSTANDARD = LVCMOS25;
NET "RFA_AD_TRXD2" LOC = C22 | IOSTANDARD = LVCMOS25;
NET "RFA_AD_TRXD3" LOC = G27 | IOSTANDARD = LVCMOS25;
NET "RFA_AD_TRXD4" LOC = G28 | IOSTANDARD = LVCMOS25;
NET "RFA_AD_TRXD5" LOC = D22 | IOSTANDARD = LVCMOS25;
NET "RFA_AD_TRXD6" LOC = G26 | IOSTANDARD = LVCMOS25;
NET "RFA_AD_TRXD7" LOC = A25 | IOSTANDARD = LVCMOS25;
NET "RFA_AD_TRXD8" LOC = A26 | IOSTANDARD = LVCMOS25;
NET "RFA_AD_TRXD9" LOC = H27 | IOSTANDARD = LVCMOS25;
NET "RFA_AD_TRXD10" LOC = E27 | IOSTANDARD = LVCMOS25;
NET "RFA_AD_TRXD11" LOC = B26 | IOSTANDARD = LVCMOS25;

NET "RFA_AD_TXCLK" LOC = C27 | IOSTANDARD = LVCMOS25;
NET "RFA_AD_TXIQ" LOC = C30 | IOSTANDARD = LVCMOS25;

NET "RFA_AD_TXD0" LOC = F26 | IOSTANDARD = LVCMOS25;
NET "RFA_AD_TXD1" LOC = K21 | IOSTANDARD = LVCMOS25;
NET "RFA_AD_TXD2" LOC = E24 | IOSTANDARD = LVCMOS25;
NET "RFA_AD_TXD3" LOC = G25 | IOSTANDARD = LVCMOS25;
NET "RFA_AD_TXD4" LOC = F25 | IOSTANDARD = LVCMOS25;
NET "RFA_AD_TXD5" LOC = E26 | IOSTANDARD = LVCMOS25;
NET "RFA_AD_TXD6" LOC = A19 | IOSTANDARD = LVCMOS25;
NET "RFA_AD_TXD7" LOC = D24 | IOSTANDARD = LVCMOS25;
NET "RFA_AD_TXD8" LOC = A18 | IOSTANDARD = LVCMOS25;
NET "RFA_AD_TXD9" LOC = L21 | IOSTANDARD = LVCMOS25;
NET "RFA_AD_TXD10" LOC = L20 | IOSTANDARD = LVCMOS25;
NET "RFA_AD_TXD11" LOC = D30 | IOSTANDARD = LVCMOS25;

#Front end
NET "RFA_PA2_EN" LOC = D14 | IOSTANDARD = LVCMOS25;
NET "RFA_PA5_EN" LOC = M12 | IOSTANDARD = LVCMOS25;
NET "RFA_SWCTL1" LOC = M11 | IOSTANDARD = LVCMOS25;
NET "RFA_SWCTL2" LOC = A13 | IOSTANDARD = LVCMOS25;

#Transceiver
NET "RFA_XCVR_B1" LOC = B30 | IOSTANDARD = LVCMOS25;
NET "RFA_XCVR_B2" LOC = F28 | IOSTANDARD = LVCMOS25;
NET "RFA_XCVR_B3" LOC = B31 | IOSTANDARD = LVCMOS25;
NET "RFA_XCVR_B4" LOC = E28 | IOSTANDARD = LVCMOS25;
NET "RFA_XCVR_B5" LOC = D25 | IOSTANDARD = LVCMOS25;
NET "RFA_XCVR_B6" LOC = A30 | IOSTANDARD = LVCMOS25;
NET "RFA_XCVR_B7" LOC = A31 | IOSTANDARD = LVCMOS25;

NET "RFA_XCVR_SCLK" LOC = A29 | IOSTANDARD = LVCMOS25;
NET "RFA_XCVR_CS" LOC = B18 | IOSTANDARD = LVCMOS25;
NET "RFA_XCVR_DIN" LOC = J22 | IOSTANDARD = LVCMOS25;
NET "RFA_XCVR_RXENA" LOC = H22 | IOSTANDARD = LVCMOS25;
NET "RFA_XCVR_RXHP" LOC = B28 | IOSTANDARD = LVCMOS25;
NET "RFA_XCVR_SHDN" LOC = K22 | IOSTANDARD = LVCMOS25;
NET "RFA_XCVR_TXENA" LOC = C18 | IOSTANDARD = LVCMOS25;
NET "RFA_XCVR_LD" LOC = A28 | IOSTANDARD = LVCMOS25;

##########
#FMC module RF B pins (probably renamed RF D in user project)

#ADC/DAC
NET "RFB_AD_SPI_SCLK" LOC = K17 | IOSTANDARD = LVCMOS25;
NET "RFB_AD_SPI_SDIO" LOC = B17 | IOSTANDARD = LVCMOS25;
NET "RFB_AD_SPI_CS" LOC = D15 | IOSTANDARD = LVCMOS25;
NET "RFB_AD_RESET" LOC = G15 | IOSTANDARD = LVCMOS25;

NET "RFB_AD_TRXCLK" LOC = L15 | IOSTANDARD = LVCMOS25;
NET "RFB_AD_TRXIQ" LOC = K18 | IOSTANDARD = LVCMOS25;

NET "RFB_AD_TRXD0" LOC = J16 | IOSTANDARD = LVCMOS25;
NET "RFB_AD_TRXD1" LOC = H17 | IOSTANDARD = LVCMOS25;
NET "RFB_AD_TRXD2" LOC = J17 | IOSTANDARD = LVCMOS25;
NET "RFB_AD_TRXD3" LOC = L16 | IOSTANDARD = LVCMOS25;
NET "RFB_AD_TRXD4" LOC = G18 | IOSTANDARD = LVCMOS25;
NET "RFB_AD_TRXD5" LOC = M18 | IOSTANDARD = LVCMOS25;
NET "RFB_AD_TRXD6" LOC = H18 | IOSTANDARD = LVCMOS25;
NET "RFB_AD_TRXD7" LOC = M17 | IOSTANDARD = LVCMOS25;
NET "RFB_AD_TRXD8" LOC = D17 | IOSTANDARD = LVCMOS25;
NET "RFB_AD_TRXD9" LOC = J19 | IOSTANDARD = LVCMOS25;
NET "RFB_AD_TRXD10" LOC = K19 | IOSTANDARD = LVCMOS25;
NET "RFB_AD_TRXD11" LOC = E18 | IOSTANDARD = LVCMOS25;

NET "RFB_AD_TXCLK" LOC = C17 | IOSTANDARD = LVCMOS25;
NET "RFB_AD_TXIQ" LOC = E17 | IOSTANDARD = LVCMOS25;

NET "RFB_AD_TXD0" LOC = B16 | IOSTANDARD = LVCMOS25;
NET "RFB_AD_TXD1" LOC = J15 | IOSTANDARD = LVCMOS25;
NET "RFB_AD_TXD2" LOC = A16 | IOSTANDARD = LVCMOS25;
NET "RFB_AD_TXD3" LOC = H15 | IOSTANDARD = LVCMOS25;
NET "RFB_AD_TXD4" LOC = M15 | IOSTANDARD = LVCMOS25;
NET "RFB_AD_TXD5" LOC = F15 | IOSTANDARD = LVCMOS25;
NET "RFB_AD_TXD6" LOC = C15 | IOSTANDARD = LVCMOS25;
NET "RFB_AD_TXD7" LOC = M16 | IOSTANDARD = LVCMOS25;
NET "RFB_AD_TXD8" LOC = B15 | IOSTANDARD = LVCMOS25;
NET "RFB_AD_TXD9" LOC = G16 | IOSTANDARD = LVCMOS25;
NET "RFB_AD_TXD10" LOC = F18 | IOSTANDARD = LVCMOS25;
NET "RFB_AD_TXD11" LOC = F16 | IOSTANDARD = LVCMOS25;

#Front end
NET "RFB_PA2_EN" LOC = A14 | IOSTANDARD = LVCMOS25;
NET "RFB_PA5_EN" LOC = B13 | IOSTANDARD = LVCMOS25;
NET "RFB_SWCTL1" LOC = C14 | IOSTANDARD = LVCMOS25;
NET "RFB_SWCTL2" LOC = B12 | IOSTANDARD = LVCMOS25;

#Transceiver
NET "RFB_XCVR_B1" LOC = H12 | IOSTANDARD = LVCMOS25;
NET "RFB_XCVR_B2" LOC = H13 | IOSTANDARD = LVCMOS25;
NET "RFB_XCVR_B3" LOC = M13 | IOSTANDARD = LVCMOS25;
NET "RFB_XCVR_B4" LOC = G12 | IOSTANDARD = LVCMOS25;
NET "RFB_XCVR_B5" LOC = F14 | IOSTANDARD = LVCMOS25;
NET "RFB_XCVR_B6" LOC = H14 | IOSTANDARD = LVCMOS25;
NET "RFB_XCVR_B7" LOC = J12 | IOSTANDARD = LVCMOS25;
NET "RFB_XCVR_SCLK" LOC = G10 | IOSTANDARD = LVCMOS25;
NET "RFB_XCVR_CS" LOC = K13 | IOSTANDARD = LVCMOS25;
NET "RFB_XCVR_DIN" LOC = F11 | IOSTANDARD = LVCMOS25;
NET "RFB_XCVR_RXENA" LOC = K12 | IOSTANDARD = LVCMOS25;
NET "RFB_XCVR_RXHP" LOC = L13 | IOSTANDARD = LVCMOS25;
NET "RFB_XCVR_SHDN" LOC = K11 | IOSTANDARD = LVCMOS25;
NET "RFB_XCVR_TXENA" LOC = H10 | IOSTANDARD = LVCMOS25;
NET "RFB_XCVR_LD" LOC = L11 | IOSTANDARD = LVCMOS25;
