1 -------------------------------------------------------------------------------     3 -- Company    : SLAC National Accelerator Laboratory     4 -- Created    : 2015-09-22     5 -- Last update: 2016-10-20     6 -------------------------------------------------------------------------------     7 -- Description: Ethernet MAC TX Wrapper     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;
    20 use ieee.std_logic_arith.
all;
    21 use ieee.std_logic_unsigned.
all;
    28  --! @ingroup ethernet_EthMacCore    31       -- Simulation Generics    39       -- Non-VLAN Configurations    41       -- VLAN Configurations    58       -- XLGMII PHY Interface    61       -- XGMII PHY Interface    68       -- Flow control Interface    73       -- Configuration and status   105          -- Incoming primary traffic   108          -- Incoming bypass traffic   111          -- Outgoing data to MAC   115    ------------------------------   116    -- TX Non-VLAN Checksum Module   117    ------------------------------   133          -- Outbound data to MAC   139    --------------------------            140    -- TX VLAN Checksum Module   141    --------------------------            142    GEN_VLAN : if (VLAN_EN_G = true) generate   160                -- Outbound data to MAC   165       end generate GEN_VEC;
   168    BYPASS_VLAN : if (VLAN_EN_G = false) generate   169       -- Terminate Unused buses   188          -- Incoming data from client   193          -- Outgoing data to MAC   196          -- Flow control input   198          -- Inputs from pause frame RX   201          -- Configuration and status   208    -----------------------   209    -- TX MAC Export Module    210    -----------------------   222          -- XLGMII PHY Interface   225          -- XGMII PHY Interface   228          -- GMII PHY Interface   232          -- Configuration and status 
PAUSE_512BITS_Gnatural   range  1 to  1024:= 8
 
in rxPauseValueslv( 15 downto  0)  
 
out mAxisMasterAxiStreamMasterType  
 
in sBypMasterAxiStreamMasterType  
 
array(natural range <> ) of AxiStreamSlaveType   AxiStreamSlaveArray
 
AxiStreamMasterType   csumMaster
 
out xlgmiiTxdslv( 127 downto  0)  
 
array(natural range <> ) of slv( 11 downto  0)   Slv12Array
 
out mAxisMasterAxiStreamMasterType  
 
VLAN_EN_Gboolean  :=   false
 
in mAxisSlaveAxiStreamSlaveType  
 
out sPrimSlaveAxiStreamSlaveType  
 
VID_Gslv( 11 downto  0)  := x"001"
 
in macAddressslv( 47 downto  0)  
 
in rxPauseValueslv( 15 downto  0)  
 
VLAN_SIZE_Gpositive   range  1 to  8:= 1
 
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
 
VLAN_VID_GSlv12Array  :=( 0=> x"001")
 
AxiStreamSlaveType   csumSlave
 
in sPrimMasterAxiStreamMasterType  
 
in macAddressslv( 47 downto  0)  
 
AxiStreamSlaveType   bypassSlave
 
in sPrimMasterAxiStreamMasterType  
 
in sBypMasterAxiStreamMasterType  
 
in sAxisMastersAxiStreamMasterArray(   VLAN_SIZE_G- 1 downto  0)  
 
out sBypSlaveAxiStreamSlaveType  
 
PAUSE_EN_Gboolean  :=   true
 
out mAxisMasterAxiStreamMasterType  
 
in mAxisSlaveAxiStreamSlaveType  
 
AxiStreamMasterType   bypassMaster
 
AxiStreamMasterType   macObMaster
 
AxiStreamSlaveType   macObSlave
 
PAUSE_EN_Gboolean  :=   true
 
out gmiiTxdslv( 7 downto  0)  
 
in sVlanMastersAxiStreamMasterArray(   VLAN_SIZE_G- 1 downto  0)  
 
in sAxisMasterAxiStreamMasterType  
 
out xlgmiiTxdslv( 127 downto  0)  
 
in ethConfigEthMacConfigType  
 
AxiStreamSlaveArray(   VLAN_SIZE_G- 1 downto  0)   csumSlaves
 
out macObSlaveAxiStreamSlaveType  
 
out gmiiTxdslv( 7 downto  0)  
 
DROP_ERR_PKT_Gboolean  :=   true
 
out xlgmiiTxcslv( 15 downto  0)  
 
in mAxisSlaveAxiStreamSlaveType  
 
out sAxisSlaveAxiStreamSlaveType  
 
in pauseTimeslv( 15 downto  0)  
 
array(natural range <> ) of AxiStreamMasterType   AxiStreamMasterArray
 
out xgmiiTxdslv( 63 downto  0)  
 
out sPrimSlaveAxiStreamSlaveType  
 
out sAxisSlaveAxiStreamSlaveType  
 
VLAN_SIZE_Gpositive   range  1 to  8:= 1
 
VLAN_EN_Gboolean  :=   false
 
AxiStreamMasterArray(   VLAN_SIZE_G- 1 downto  0)   csumMasters
 
out xgmiiTxcslv( 7 downto  0)  
 
AxiStreamSlaveType  :=(tReady  => '1') AXI_STREAM_SLAVE_FORCE_C
 
PHY_TYPE_Gstring  :=   "XGMII"
 
out sAxisSlavesAxiStreamSlaveArray(   VLAN_SIZE_G- 1 downto  0)  
 
out xlgmiiTxcslv( 15 downto  0)  
 
PHY_TYPE_Gstring  :=   "XGMII"
 
out xgmiiTxdslv( 63 downto  0)  
 
out sVlanSlavesAxiStreamSlaveArray(   VLAN_SIZE_G- 1 downto  0)  
 
in sAxisMasterAxiStreamMasterType  
 
DROP_ERR_PKT_Gboolean  :=   true
 
out sBypSlaveAxiStreamSlaveType  
 
in macObMasterAxiStreamMasterType  
 
PAUSE_512BITS_Gpositive   range  1 to  1024:= 8
 
out xgmiiTxcslv( 7 downto  0)