1 ------------------------------------------------------------------------------- 2 -- File : GigEthGtp7Wrapper.vhd 3 -- Company : SLAC National Accelerator Laboratory 4 -- Created : 2015-03-30 5 -- Last update: 2016-09-29 6 ------------------------------------------------------------------------------- 7 -- Description: Gtp7 Wrapper for 1000BASE-X Ethernet 8 -- Note: This module supports up to a MGT QUAD of 1GigE interfaces 9 ------------------------------------------------------------------------------- 10 -- This file is part of 'SLAC Firmware Standard Library'. 11 -- It is subject to the license terms in the LICENSE.txt file found in the 12 -- top-level directory of this distribution and at: 13 -- https://confluence.slac.stanford.edu/display/ppareg/LICENSE.html. 14 -- No part of 'SLAC Firmware Standard Library', including this file, 15 -- may be copied, modified, propagated, or distributed except according to 16 -- the terms contained in the LICENSE.txt file. 17 ------------------------------------------------------------------------------- 20 use ieee.std_logic_1164.
all;
28 use unisim.vcomponents.
all;
31 --! @ingroup ethernet_GigEthCore_gtp7 36 -- Clocking Configurations 42 -- AXI-Lite Configurations 45 -- AXI Streaming Configurations 48 -- Local Configurations 49 localMac :
in Slv48Array(NUM_LANE_G-1
downto 0) := (
others => MAC_ADDR_INIT_C);
50 -- Streaming DMA Interface 57 -- Slave AXI-Lite Interface 70 -- MGT Clock Port (156.25 MHz or 312.5 MHz) 79 end GigEthGtp7Wrapper;
104 ----------------------------- 105 -- Select the Reference Clock 106 ----------------------------- 108 IBUFDS_GTE2_Inst : IBUFDS_GTE2
126 PwrUpRst_Inst :
entity work.
PwrUpRst 184 -- Once the QPLL is locked, prevent the 185 -- IP cores from accidently reseting each other 197 -- AXI-Lite Configurations 200 -- AXI Streaming Configurations 203 -- Local Configurations 205 -- Streaming DMA Interface 212 -- Slave AXI-Lite Interface 226 -- Quad PLL Interface 239 end generate GEN_LANE;
out qPllRefClkLostslv( 1 downto 0)
in qPllRefClkslv( 1 downto 0)
in axiLiteWriteMasterAxiLiteWriteMasterType := AXI_LITE_WRITE_MASTER_INIT_C
USE_GTREFCLK_Gboolean := false
array(natural range <> ) of AxiStreamSlaveType AxiStreamSlaveArray
out dmaIbMasterAxiStreamMasterType
in qPllOutClkslv( 1 downto 0)
out axiLiteReadSlavesAxiLiteReadSlaveArray( NUM_LANE_G- 1 downto 0)
PLL0_FBDIV_45_IN_Ginteger range 4 to 5:= 5
out axiLiteReadSlaveAxiLiteReadSlaveType
array(natural range <> ) of AxiLiteWriteSlaveType AxiLiteWriteSlaveArray
in qPllOutRefClkslv( 1 downto 0)
out qPllOutClkslv( 1 downto 0)
in localMacSlv48Array( NUM_LANE_G- 1 downto 0) :=( others => MAC_ADDR_INIT_C)
in sigDetslv( NUM_LANE_G- 1 downto 0) :=( others => '1')
AXIS_CONFIG_GAxiStreamConfigArray( 3 downto 0) :=( others => AXI_STREAM_CONFIG_INIT_C)
CLKIN_PERIOD_Greal := 10.0
out dmaObSlavesAxiStreamSlaveArray( NUM_LANE_G- 1 downto 0)
array(natural range <> ) of AxiLiteReadMasterType AxiLiteReadMasterArray
PLL0_REFCLK_SEL_Gbit_vector := "001"
in axiLiteReadMasterAxiLiteReadMasterType := AXI_LITE_READ_MASTER_INIT_C
RST_IN_POLARITY_Gsl := '1'
in qPllPowerDownslv( 1 downto 0) :=( others => '0')
in dmaObMasterAxiStreamMasterType
DIVCLK_DIVIDE_Gpositive := 1
PLL0_FBDIV_IN_Ginteger range 1 to 5:= 4
in axiLiteRstslv( NUM_LANE_G- 1 downto 0) :=( others => '0')
PLL0_REFCLK_DIV_IN_Ginteger range 1 to 2:= 1
out axiLiteWriteSlaveAxiLiteWriteSlaveType
CLKIN_PERIOD_Greal := 8.0
out dmaObSlaveAxiStreamSlaveType
in axiLiteWriteMastersAxiLiteWriteMasterArray( NUM_LANE_G- 1 downto 0) :=( others => AXI_LITE_WRITE_MASTER_INIT_C)
in axiLiteClkslv( NUM_LANE_G- 1 downto 0) :=( others => '0')
in gtRxNslv( NUM_LANE_G- 1 downto 0)
PLL1_REFCLK_SEL_Gbit_vector := "001"
in dmaObMastersAxiStreamMasterArray( NUM_LANE_G- 1 downto 0)
INPUT_BUFG_Gboolean := true
out axiLiteWriteSlavesAxiLiteWriteSlaveArray( NUM_LANE_G- 1 downto 0)
in arstsl :=not IN_POLARITY_G
NUM_LANE_Gnatural range 1 to 4:= 1
out gtTxPslv( NUM_LANE_G- 1 downto 0)
array(natural range <> ) of AxiStreamConfigType AxiStreamConfigArray
CLKFBOUT_MULT_F_Greal := 8.0
slv( 1 downto 0) := "10" AXI_RESP_SLVERR_C
out dmaIbMastersAxiStreamMasterArray( NUM_LANE_G- 1 downto 0)
PLL1_REFCLK_DIV_IN_Ginteger range 1 to 2:= 1
in axiLiteReadMastersAxiLiteReadMasterArray( NUM_LANE_G- 1 downto 0) :=( others => AXI_LITE_READ_MASTER_INIT_C)
in dmaIbSlavesAxiStreamSlaveArray( NUM_LANE_G- 1 downto 0)
BANDWIDTH_Gstring := "OPTIMIZED"
out phyReadyslv( NUM_LANE_G- 1 downto 0)
in dmaIbSlaveAxiStreamSlaveType
CLKOUT1_DIVIDE_Ginteger range 1 to 128:= 1
slv( 1 downto 0) qpllReset
CLKFBOUT_MULT_F_Greal range 1.0 to 64.0:= 1.0
slv( 1 downto 0) qPllOutClk
DIVCLK_DIVIDE_Ginteger range 1 to 106:= 1
out gtTxNslv( NUM_LANE_G- 1 downto 0)
in dmaClkslv( NUM_LANE_G- 1 downto 0)
AXI_ERROR_RESP_Gslv( 1 downto 0) := AXI_RESP_SLVERR_C
EN_AXI_REG_Gboolean := false
array(natural range <> ) of AxiStreamMasterType AxiStreamMasterArray
in gtRxPslv( NUM_LANE_G- 1 downto 0)
CLKOUT0_DIVIDE_F_Greal := 8.0
AxiLiteReadMasterType :=(araddr =>( others => '0'),arprot =>( others => '0'),arvalid => '0',rready => '1') AXI_LITE_READ_MASTER_INIT_C
in qPllResetslv( 1 downto 0)
AxiStreamConfigType :=(TSTRB_EN_C => false,TDATA_BYTES_C => 16,TDEST_BITS_C => 4,TID_BITS_C => 0,TKEEP_MODE_C => TKEEP_NORMAL_C,TUSER_BITS_C => 4,TUSER_MODE_C => TUSER_NORMAL_C) AXI_STREAM_CONFIG_INIT_C
array(natural range <> ) of AxiLiteWriteMasterType AxiLiteWriteMasterArray
CLKOUT0_DIVIDE_F_Greal range 1.0 to 128.0:= 1.0
in qPllLockDetClkslv( 1 downto 0)
slv( 1 downto 0) qPllOutRefClk
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
in localMacslv( 47 downto 0) := MAC_ADDR_INIT_C
AXI_ERROR_RESP_Gslv( 1 downto 0) := AXI_RESP_SLVERR_C
out qPllOutRefClkslv( 1 downto 0)
in qPllRefClkLostslv( 1 downto 0)
slv( 1 downto 0) qPllRefClkLost
array(natural range <> ) of AxiLiteReadSlaveType AxiLiteReadSlaveArray
PLL1_FBDIV_45_IN_Ginteger range 4 to 5:= 5
slv( NUM_LANE_G- 1 downto 0) qpllRst
out qPllLockslv( 1 downto 0)
AXIS_CONFIG_GAxiStreamConfigType := AXI_STREAM_CONFIG_INIT_C
in qPllLockslv( 1 downto 0)
in dmaRstslv( NUM_LANE_G- 1 downto 0)
NUM_CLOCKS_Ginteger range 1 to 7
PLL1_FBDIV_IN_Ginteger range 1 to 5:= 4
EN_AXI_REG_Gboolean := false
slv( 1 downto 0) qPllLock