1 ------------------------------------------------------------------------------- 2 -- File : SsiObFrameFilter.vhd 3 -- Company : SLAC National Accelerator Laboratory 4 -- Created : 2014-05-02 5 -- Last update: 2017-06-01 6 ------------------------------------------------------------------------------- 7 -- Description: This module is used to filter out bad SSI frames. 9 -- Note: If EN_FRAME_FILTER_G = true, then this module DOES NOT support 10 -- interleaving of channels during the middle of a frame transfer. 11 ------------------------------------------------------------------------------- 12 -- This file is part of 'SLAC Firmware Standard Library'. 13 -- It is subject to the license terms in the LICENSE.txt file found in the 14 -- top-level directory of this distribution and at: 15 -- https://confluence.slac.stanford.edu/display/ppareg/LICENSE.html. 16 -- No part of 'SLAC Firmware Standard Library', including this file, 17 -- may be copied, modified, propagated, or distributed except according to 18 -- the terms contained in the LICENSE.txt file. 19 ------------------------------------------------------------------------------- 22 use ieee.std_logic_1164.
all;
23 use ieee.std_logic_arith.
all;
24 use ieee.std_logic_unsigned.
all;
31 --! @ingroup protocols_ssi 39 -- Slave Port (AXIS FIFO Read Interface) 62 type RegType is record 71 constant REG_INIT_C : RegType := ( 79 signal r : RegType := REG_INIT_C;
84 assert (AXIS_CONFIG_G.TUSER_BITS_C >= 2) report "SsiObFrameFilter: AXIS_CONFIG_G.TUSER_BITS_C must be >= 2" severity failure;
104 -- Latch the current value 107 -- Reset strobe Signals 108 v.wordDropped := '0';
109 v.frameDropped := '0';
115 -- Get the SOF status 118 -- Check for FIFO caching 120 -- Get the EOFE status 129 ---------------------------------------------------------------------- 131 -- Check for FIFO caching and a frame larger than the FIFO depth 136 v.state := BLOWOFF_S;
137 -- Check for non-EOF or tValid not set 140 v.state := BLOWOFF_S;
142 -- Check if ready to move data 158 -- Strobe the error flags 159 v.wordDropped := '1';
164 v.state := BLOWOFF_S;
168 ---------------------------------------------------------------------- 172 -- Strobe the error flags 173 v.wordDropped := '1';
180 ---------------------------------------------------------------------- 182 -- Check if ready to move data 193 -- Check for SSI framing errors (repeated SOF or interleaved frame) 196 v.master.tLast := '1';
199 -- Strobe the error flags 200 v.wordDropped := '1';
206 -- Check for overflow event 208 -- Check if moving data 209 if (v.master.tValid = '1') then 211 v.master.tLast := '1';
214 -- Strobe the error flags 215 v.wordDropped := '1';
224 ---------------------------------------------------------------------- 226 -- Check if ready to move data 227 if (v.master.tValid = '0') then 230 v.master.tLast := '1';
236 ---------------------------------------------------------------------- 244 -- Register the variable for next clock cycle 258 r <= rin after TPD_G;
VALID_THOLD_Gnatural := 1
in mAxisSlaveAxiStreamSlaveType
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
AxiStreamSlaveType :=(tReady => '0') AXI_STREAM_SLAVE_INIT_C
natural range 0 to 8 TUSER_BITS_C
in sAxisMasterAxiStreamMasterType
in sTLastTUserslv( 7 downto 0)
AXIS_CONFIG_GAxiStreamConfigType := ssiAxiStreamConfig( 16)
out sAxisSlaveAxiStreamSlaveType
out mAxisMasterAxiStreamMasterType
EN_FRAME_FILTER_Gboolean := true