1 ------------------------------------------------------------------------------- 2 -- File : EthMacRxFifo.vhd 3 -- Company : SLAC National Accelerator Laboratory 4 -- Created : 2016-09-21 5 -- Last update: 2016-10-21 6 ------------------------------------------------------------------------------- 7 -- Description: Outbound FIFO buffers 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;
26 --! @ingroup ethernet_EthMacCore 50 -- Status (sClk domain) 80 type RegType is record 83 constant REG_INIT_C : RegType := ( 85 signal r : RegType := REG_INIT_C;
88 signal primDrop : sl := '0';
89 signal bypDrop : sl := '0';
92 -- attribute dont_touch : string; 93 -- attribute dont_touch of r : signal is "TRUE"; 100 -- General Configurations 108 -- FIFO configurations 115 -- AXI Stream Port Configurations 129 BYP_DISABLED : if (BYP_EN_G = false) generate 134 BYP_ENABLED : if (BYP_EN_G = true) generate 137 -- General Configurations 145 -- FIFO configurations 152 -- AXI Stream Port Configurations 167 VLAN_DISABLED : if (VLAN_EN_G = false) generate 172 VLAN_ENABLED : if (VLAN_EN_G = true) generate 173 GEN_VEC : for i in (VLAN_SIZE_G-1) downto 0 generate 176 -- General Configurations 184 -- FIFO configurations 191 -- AXI Stream Port Configurations 204 end generate GEN_VEC;
207 comb :
process (bypDrop,
phyReady, primDrop, r,
sRst, vlanDrops)
is 208 variable v : RegType;
211 -- Latch the current value 214 -- OR-ing drop flags together 215 v.rxFifoDrop := primDrop or bypDrop or uOr(vlanDrops);
222 -- Register the variable for next clock cycle 230 seq :
process (
sClk)
is 232 if rising_edge(sClk) then 233 r <= rin after TPD_G;
array(natural range <> ) of AxiStreamSlaveType AxiStreamSlaveArray
SLAVE_READY_EN_Gboolean := true
PIPE_STAGES_Gnatural := 1
BYP_COMMON_CLK_Gboolean := false
PRIM_CONFIG_GAxiStreamConfigType := EMAC_AXIS_CONFIG_C
in mVlanSlavesAxiStreamSlaveArray( VLAN_SIZE_G- 1 downto 0)
out mAxisMasterAxiStreamMasterType
FIFO_PAUSE_THRESH_Gpositive := 1
FIFO_ADDR_WIDTH_Gpositive := 10
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
FIFO_ADDR_WIDTH_Ginteger range 4 to 48:= 9
out mVlanMastersAxiStreamMasterArray( VLAN_SIZE_G- 1 downto 0)
VLAN_COMMON_CLK_Gboolean := false
in sBypMasterAxiStreamMasterType
out sBypCtrlAxiStreamCtrlType
INT_PIPE_STAGES_Gnatural := 0
in mPrimSlaveAxiStreamSlaveType
in mBypSlaveAxiStreamSlaveType
GEN_SYNC_FIFO_Gboolean := false
VALID_THOLD_Gnatural := 1
PRIM_COMMON_CLK_Gboolean := false
out mPrimMasterAxiStreamMasterType
out sPrimCtrlAxiStreamCtrlType
FIFO_PAUSE_THRESH_Gpositive := 1000
out mBypMasterAxiStreamMasterType
array(natural range <> ) of AxiStreamCtrlType AxiStreamCtrlArray
array(natural range <> ) of AxiStreamMasterType AxiStreamMasterArray
CASCADE_PAUSE_SEL_Gnatural := 0
VLAN_EN_Gboolean := false
in mAxisSlaveAxiStreamSlaveType
DROP_ERR_PKT_Gboolean := true
AxiStreamCtrlType :=(pause => '0',overflow => '0',idle => '1') AXI_STREAM_CTRL_UNUSED_C
VLAN_CONFIG_GAxiStreamConfigType := EMAC_AXIS_CONFIG_C
EN_FRAME_FILTER_Gboolean := true
SLAVE_AXI_CONFIG_GAxiStreamConfigType := SSI_CONFIG_INIT_C
CASCADE_SIZE_Gpositive := 1
in sPrimMasterAxiStreamMasterType
out sAxisCtrlAxiStreamCtrlType
BYP_CONFIG_GAxiStreamConfigType := EMAC_AXIS_CONFIG_C
in sVlanMastersAxiStreamMasterArray( VLAN_SIZE_G- 1 downto 0)
CASCADE_PAUSE_SEL_Gnatural := 0
PIPE_STAGES_Gnatural := 1
MASTER_AXI_CONFIG_GAxiStreamConfigType := SSI_CONFIG_INIT_C
INT_PIPE_STAGES_Gnatural := 1
CASCADE_SIZE_Gpositive := 2
AxiStreamConfigType :=(TSTRB_EN_C => false,TDATA_BYTES_C => 16,TDEST_BITS_C => 8,TID_BITS_C => 0,TKEEP_MODE_C => TKEEP_COMP_C,TUSER_BITS_C => 4,TUSER_MODE_C => TUSER_FIRST_LAST_C) EMAC_AXIS_CONFIG_C
out sVlanCtrlAxiStreamCtrlArray( VLAN_SIZE_G- 1 downto 0)
OR_DROP_FLAGS_Gboolean := false
in sAxisMasterAxiStreamMasterType