1 ------------------------------------------------------------------------------- 2 -- File : Pgp2bGtp7MultiLane.vhd 3 -- Company : SLAC National Accelerator Laboratory 4 -- Created : 2013-06-29 5 -- Last update: 2016-08-24 6 ------------------------------------------------------------------------------- 7 -- Description: Gtp7 Variable Latency, multi-lane Module 8 ------------------------------------------------------------------------------- 9 -- This file is part of 'SLAC Firmware Standard Library'. 10 -- It is subject to the license terms in the LICENSE.txt file found in the 11 -- top-level directory of this distribution and at: 12 -- https://confluence.slac.stanford.edu/display/ppareg/LICENSE.html. 13 -- No part of 'SLAC Firmware Standard Library', including this file, 14 -- may be copied, modified, propagated, or distributed except according to 15 -- the terms contained in the LICENSE.txt file. 16 ------------------------------------------------------------------------------- 19 use ieee.std_logic_1164.
all;
28 use UNISIM.VCOMPONENTS.
all;
31 --! @ingroup protocols_pgp_pgp2b_gtp7 35 ---------------------------------------------------------------------------------------------- 37 ---------------------------------------------------------------------------------------------- 54 -- Configure Buffer usage 60 -- Configure Number of Lanes 62 ---------------------------------------------------------------------------------------------- 64 ---------------------------------------------------------------------------------------------- 102 -- Frame Transmit Interface - 1 Lane, Array of 4 VCs 105 -- Frame Receive Interface - 1 Lane, Array of 4 VCs 114 -- AXI-Lite Interface 122 end Pgp2bGtp7MultiLane;
124 -- Define architecture 126 -------------------------------------------------------------------------------------------------- 128 -------------------------------------------------------------------------------------------------- 129 type QPllResetsVector is array ( range<>) of slv(1 downto 0);
131 -------------------------------------------------------------------------------------------------- 133 -------------------------------------------------------------------------------------------------- 134 signal gtQPllResets : QPllResetsVector((LANE_CNT_G-1) downto 0);
140 signal gtRxUserReset : sl;
141 signal gtRxUserResetIn : sl;
145 signal phyRxInit : sl;
147 -- Rx Channel Bonding 148 signal rxChBondLevel : slv(2 downto 0);
156 signal gtTxUserResetIn : sl;
160 signal stableRst : sl;
180 gtRxUserResetIn <= gtRxUserReset or pgpRxReset;
214 -------------------------------------------------------------------------------------------------- 215 -- Generate the GTP channels 216 -------------------------------------------------------------------------------------------------- 217 GTP7_CORE_GEN : for i in (LANE_CNT_G-1) downto 0 generate 219 -- gtp(i).rxChBondLevel <= conv_std_logic_vector((LANE_CNT_G-1-i), 3); 220 Bond_Master : if (i = 0) generate 221 rxChBondIn(i) <= "0000";
222 end generate Bond_Master;
223 Bond_Slaves : if (i /= 0) generate 224 rxChBondIn(i) <= rxChBondOut(i-1);
225 end generate Bond_Slaves;
227 Gtp7Core_Inst :
entity work.
Gtp7Core 396 end generate GTP7_CORE_GEN;
398 U_RstSync :
entity work.
RstSync CHAN_BOND_SEQ_2_1_Gbit_vector := "0000000000"
ALIGN_MCOMMA_DET_Gstring := "FALSE"
DEC_PCOMMA_DETECT_Gstring := "TRUE"
SIM_VERSION_Gstring := "1.0"
ADDR_WIDTH_Gpositive range 1 to 32:= 16
NUM_VC_EN_Ginteger range 1 to 4:= 4
in gtRxNslv(( LANE_CNT_G- 1) downto 0)
array(natural range <> ) of AxiStreamSlaveType AxiStreamSlaveArray
TX_EXT_DATA_WIDTH_Ginteger := 16
CLK_COR_MIN_LAT_Ginteger := 7
TX_ENABLE_Gboolean := true
CHAN_BOND_SEQ_1_3_Gbit_vector := "0000000000"
RX_EXT_DATA_WIDTH_Ginteger := 16
TX_INT_DATA_WIDTH_Ginteger := 20
out pgpRxMastersAxiStreamMasterArray( 3 downto 0)
in txPreCursorslv( 4 downto 0) :=( others => '0')
TX_BUF_ADDR_MODE_Gstring := "FAST"
in qPllLockInslv( 1 downto 0)
RX_OS_CFG_Gbit_vector := "0001111110000"
FTS_LANE_DESKEW_EN_Gstring := "FALSE"
RXCDR_CFG_Gbit_vector := x"0000107FE206001041010"
array(natural range <> ) of AxiLiteWriteSlaveType AxiLiteWriteSlaveArray
out drpAddrslv( ADDR_WIDTH_G- 1 downto 0)
in qPllRefClkLostInslv( 1 downto 0)
TX_ENABLE_Gboolean := true
PMA_RSV_Gbit_vector := x"00000333"
ALIGN_COMMA_WORD_Ginteger := 2
out drpDoslv( 15 downto 0)
RX_BUF_ADDR_MODE_Gstring := "FAST"
CLK_CORRECT_USE_Gstring := "FALSE"
CHAN_BOND_SEQ_2_ENABLE_Gbit_vector := "0000"
out pgpTxSlavesAxiStreamSlaveArray( 3 downto 0)
ALIGN_COMMA_ENABLE_Gbit_vector := "1111111111"
in pgpTxMastersAxiStreamMasterArray( 3 downto 0) :=( others => AXI_STREAM_MASTER_INIT_C)
EN_ARBITRATION_Gboolean := false
STABLE_CLOCK_PERIOD_Greal := 4.0E-9
DATA_WIDTH_Gpositive range 1 to 32:= 16
AxiStreamMasterType :=(tValid => '0',tData =>( others => '0'),tStrb =>( others => '1'),tKeep =>( others => '1'),tLast => '0',tDest =>( others => '0'),tId =>( others => '0'),tUser =>( others => '0')) AXI_STREAM_MASTER_INIT_C
out axilReadSlaveAxiLiteReadSlaveType
in drpDislv( 15 downto 0) := X"0000"
out rxCharIsKOutslv(( RX_EXT_DATA_WIDTH_G/ 8)- 1 downto 0)
in rxChBondInslv( 3 downto 0) := "0000"
in drpDoslv( DATA_WIDTH_G- 1 downto 0)
COMMON_CLK_Gboolean := false
in txPostCursorslv( 4 downto 0) :=( others => '0')
CLK_COR_SEQ_1_2_Gbit_vector := "0000000000"
array(natural range <> ) of AxiLiteReadMasterType AxiLiteReadMasterArray
TX_PHASE_ALIGN_Gstring := "AUTO"
in pgpRxInPgp2bRxInType := PGP2B_RX_IN_INIT_C
in txDiffCtrlslv( 3 downto 0) := "1000"
in txCharIsKInslv(( TX_EXT_DATA_WIDTH_G/ 8)- 1 downto 0)
out txBufStatusOutslv( 1 downto 0)
FTS_DESKEW_SEQ_ENABLE_Gbit_vector := "1111"
TX_CLK25_DIV_Ginteger := 5
RXLPM_IPCM_CFG_Gbit := '0'
VC_INTERLEAVE_Ginteger := 1
CHAN_BOND_SEQ_1_1_Gbit_vector := "0000000000"
RX_OS_CFG_Gbit_vector := "0001111110000"
out qPllResetOutslv( 1 downto 0)
CLK_COR_SEQ_2_4_Gbit_vector := "0000000000"
ALIGN_MCOMMA_EN_Gsl := '0'
RX_ENABLE_Gboolean := true
SIM_GTRESET_SPEEDUP_Gstring := "FALSE"
in axilReadMastersAxiLiteReadMasterArray(( LANE_CNT_G- 1) downto 0) :=( others => AXI_LITE_READ_MASTER_INIT_C)
TX_BUF_EN_Gboolean := true
in txMmcmLockedInsl := '1'
CLK_COR_SEQ_LEN_Ginteger := 1
CHAN_BOND_SEQ_2_3_Gbit_vector := "0000000000"
in txPostCursorslv( 4 downto 0) :=( others => '0')
array(natural range <> ) of Pgp2bTxPhyLaneOutType Pgp2bTxPhyLaneOutArray
out pgpRxOutPgp2bRxOutType
CBCC_DATA_SOURCE_SEL_Gstring := "DECODED"
out axilWriteSlaveAxiLiteWriteSlaveType
out rxBufStatusOutslv( 2 downto 0)
RX_CHAN_BOND_EN_Gboolean := false
in pgpTxMastersAxiStreamMasterArray( 3 downto 0) :=( others => AXI_STREAM_MASTER_INIT_C)
SIM_GTRESET_SPEEDUP_Gstring := "FALSE"
TX_PHASE_ALIGN_Gstring := "NONE"
LANE_CNT_Ginteger range 1 to 2:= 1
DEC_VALID_COMMA_ONLY_Gstring := "FALSE"
RX_DISPERR_SEQ_MATCH_Gstring := "TRUE"
in rxDataValidInsl := '1'
NUM_VC_EN_Ginteger range 1 to 4:= 4
RX_ENABLE_Gboolean := true
ALIGN_COMMA_DOUBLE_Gstring := "FALSE"
CLK_COR_SEQ_2_USE_Gstring := "FALSE"
CHAN_BOND_SEQ_LEN_Ginteger := 1
slv( 1 downto 0) := "11" AXI_RESP_DECERR_C
CLK_COR_SEQ_2_1_Gbit_vector := "0100000000"
PAYLOAD_CNT_TOP_Ginteger := 7
out rxDataOutslv( RX_EXT_DATA_WIDTH_G- 1 downto 0)
out gtQPllResetslv( 1 downto 0)
TX_BUF_EN_Gboolean := true
in axilReadMasterAxiLiteReadMasterType
in txDataInslv( TX_EXT_DATA_WIDTH_G- 1 downto 0)
RXCDR_CFG_Gbit_vector := x"0000107FE206001041010"
in rxMmcmLockedInsl := '1'
TX_OUTCLK_SRC_Gstring := "OUTCLKPMA"
in qPllRefClkInslv( 1 downto 0)
out gtTxNslv(( LANE_CNT_G- 1) downto 0)
in gtQPllOutClkslv( 1 downto 0)
in axilWriteMastersAxiLiteWriteMasterArray(( LANE_CNT_G- 1) downto 0) :=( others => AXI_LITE_WRITE_MASTER_INIT_C)
out phyRxLanesOutPgp2bRxPhyLaneOutArray( 0 to LANE_CNT_G- 1)
ALIGN_PCOMMA_DET_Gstring := "FALSE"
in pgpRxCtrlAxiStreamCtrlArray( 3 downto 0) :=( others => AXI_STREAM_CTRL_UNUSED_C)
RX_OUTCLK_SRC_Gstring := "PLLREFCLK"
CLK_COR_MAX_LAT_Ginteger := 9
VC_INTERLEAVE_Ginteger := 0
RX_ALIGN_MODE_Gstring := "GT"
in txDiffCtrlslv( 3 downto 0) := "1000"
SIM_VERSION_Gstring := "1.0"
CLK_COR_SEQ_1_1_Gbit_vector := "0100000000"
array(natural range <> ) of AxiStreamCtrlType AxiStreamCtrlArray
TIMEOUT_Gpositive := 4096
RX_CHAN_BOND_MASTER_Gboolean := false
in drpAddrslv( 8 downto 0) := "000000000"
out axilReadSlavesAxiLiteReadSlaveArray(( LANE_CNT_G- 1) downto 0)
CLK_COR_SEQ_1_ENABLE_Gbit_vector := "1111"
array(natural range <> ) of Pgp2bRxPhyLaneOutType Pgp2bRxPhyLaneOutArray
RXSLIDE_MODE_Gstring := "PCS"
CLK_COR_PRECEDENCE_Gstring := "TRUE"
CLK_COR_SEQ_1_4_Gbit_vector := "0000000000"
in rxChBondLevelInslv( 2 downto 0) := "000"
out pgpTxOutPgp2bTxOutType
out pgpTxOutPgp2bTxOutType
array(natural range <> ) of AxiStreamMasterType AxiStreamMasterArray
CHAN_BOND_SEQ_2_4_Gbit_vector := "0000000000"
out pgpRxMasterMuxedAxiStreamMasterType
in phyRxLanesInPgp2bRxPhyLaneInArray( 0 to LANE_CNT_G- 1) :=( others => PGP2B_RX_PHY_LANE_IN_INIT_C)
FTS_LANE_DESKEW_CFG_Gbit_vector := "1111"
in qPllClkInslv( 1 downto 0)
out phyTxLanesOutPgp2bTxPhyLaneOutArray( 0 to LANE_CNT_G- 1)
array(natural range <> ) of slv( 15 downto 0) Slv16Array
CLK_COR_KEEP_IDLE_Gstring := "FALSE"
RX_CLK25_DIV_Ginteger := 7
LANE_CNT_Ginteger range 1 to 2:= 1
ALIGN_PCOMMA_VALUE_Gbit_vector := "0101111100"
RXLPM_INCM_CFG_Gbit := '1'
AxiLiteReadMasterType :=(araddr =>( others => '0'),arprot =>( others => '0'),arvalid => '0',rready => '1') AXI_LITE_READ_MASTER_INIT_C
array(natural range <> ) of slv( 8 downto 0) Slv9Array
CHAN_BOND_KEEP_ALIGN_Gstring := "FALSE"
in gtQPllLockslv( 1 downto 0)
out rxDecErrOutslv(( RX_EXT_DATA_WIDTH_G/ 8)- 1 downto 0)
out rxDispErrOutslv(( RX_EXT_DATA_WIDTH_G/ 8)- 1 downto 0)
CLK_COR_SEQ_2_3_Gbit_vector := "0000000000"
in gtRxPslv(( LANE_CNT_G- 1) downto 0)
array(natural range <> ) of AxiLiteWriteMasterType AxiLiteWriteMasterArray
in axilWriteMasterAxiLiteWriteMasterType
in loopbackInslv( 2 downto 0) := "000"
in pgpTxInPgp2bTxInType := PGP2B_TX_IN_INIT_C
DEC_MCOMMA_DETECT_Gstring := "TRUE"
CHAN_BOND_SEQ_2_2_Gbit_vector := "0000000000"
in pgpRxCtrlAxiStreamCtrlArray( 3 downto 0)
AxiLiteWriteMasterType :=(awaddr =>( others => '0'),awprot =>( others => '0'),awvalid => '0',wdata =>( others => '0'),wstrb =>( others => '1'),wvalid => '0',bready => '1') AXI_LITE_WRITE_MASTER_INIT_C
AXI_ERROR_RESP_Gslv( 1 downto 0) := AXI_RESP_DECERR_C
RX_USRCLK_SRC_Gstring := "RXOUTCLK"
TX_BUF_ADDR_MODE_Gstring := "FULL"
CHAN_BOND_MAX_SKEW_Ginteger := 1
out pgpRxMastersAxiStreamMasterArray( 3 downto 0)
out pgpRxOutPgp2bRxOutType
ALIGN_MCOMMA_VALUE_Gbit_vector := "1010000011"
CLK_COR_REPEAT_WAIT_Ginteger := 0
TX_OUTCLK_SRC_Gstring := "PLLREFCLK"
out rxChBondOutslv( 3 downto 0)
PAYLOAD_CNT_TOP_Ginteger := 7
CHAN_BOND_SEQ_1_ENABLE_Gbit_vector := "1111"
out axilWriteSlavesAxiLiteWriteSlaveArray(( LANE_CNT_G- 1) downto 0)
TX_CLK25_DIV_Ginteger := 7
CLK_COR_SEQ_2_ENABLE_Gbit_vector := "0000"
in gtQPllRefClkLostslv( 1 downto 0)
array(natural range <> ) of AxiLiteReadSlaveType AxiLiteReadSlaveArray
RXLPM_IPCM_CFG_Gbit := '0'
CHAN_BOND_SEQ_1_4_Gbit_vector := "0000000000"
CLK_COR_SEQ_1_3_Gbit_vector := "0000000000"
RX_BUF_EN_Gboolean := true
STABLE_CLOCK_PERIOD_Greal := 4.0E-9
CHAN_BOND_SEQ_1_2_Gbit_vector := "0000000000"
RXLPM_INCM_CFG_Gbit := '1'
CHAN_BOND_SEQ_2_USE_Gstring := "FALSE"
AXI_ERROR_RESP_Gslv( 1 downto 0) := AXI_RESP_DECERR_C
PMA_RSV_Gbit_vector := x"00000333"
in txPreCursorslv( 4 downto 0) :=( others => '0')
TX_8B10B_EN_Gboolean := true
RX_INT_DATA_WIDTH_Ginteger := 20
array(natural range <> ) of Pgp2bRxPhyLaneInType Pgp2bRxPhyLaneInArray
out gtTxPslv(( LANE_CNT_G- 1) downto 0)
out pgpTxSlavesAxiStreamSlaveArray( 3 downto 0)
CLK_COR_SEQ_2_2_Gbit_vector := "0000000000"
array(natural range <> ) of slv( 3 downto 0) Slv4Array
RX_CLK25_DIV_Ginteger := 5
out drpDislv( DATA_WIDTH_G- 1 downto 0)
SHOW_REALIGN_COMMA_Gstring := "FALSE"
out pgpRxMasterMuxedAxiStreamMasterType
RX_8B10B_EN_Gboolean := true
ALIGN_PCOMMA_EN_Gsl := '0'
in gtQPllOutRefClkslv( 1 downto 0)