1 -------------------------------------------------------------------------------     2 -- File       : SsiIbFrameFilter.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    45       -- Master Port (AXIS FIFO Write 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 "SsiIbFrameFilter:  AXIS_CONFIG_G.TUSER_BITS_C must be >= 2" severity failure;
   101          variable v   : RegType;
   104          -- Latch the current value   107          -- Reset strobe Signals   108          v.wordDropped  := '0';
   109          v.frameDropped := '0';
   115          -- Get the SOF status   120             ----------------------------------------------------------------------   122                -- Wait for FIFO to initialize   127             ----------------------------------------------------------------------   129                -- Check if ready to move data   133                   -- Check for SOF and no overflow   145                      -- Strobe the error flags   146                      v.wordDropped  := '1';
   151                         v.state := BLOWOFF_S;
   155             ----------------------------------------------------------------------   159                -- Strobe the error flags   160                v.wordDropped  := '1';
   167             ----------------------------------------------------------------------   169                -- Check if ready to move data   180                   -- Check for SSI framing errors (repeated SOF or interleaved frame)   183                      v.master.tLast := '1';
   186                      -- Strobe the error flags   187                      v.wordDropped  := '1';
   192                         v.state := BLOWOFF_S;
   196          ----------------------------------------------------------------------   204          -- Register the variable for next clock cycle   218             r <= rin after TPD_G;
 
SLAVE_READY_EN_Gboolean  :=   true
 
AXIS_CONFIG_GAxiStreamConfigType  :=   ssiAxiStreamConfig( 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 sAxisCtrlAxiStreamCtrlType  
 
out mAxisMasterAxiStreamMasterType  
 
EN_FRAME_FILTER_Gboolean  :=   true
 
AxiStreamSlaveType  :=(tReady  => '0') AXI_STREAM_SLAVE_INIT_C
 
in mAxisCtrlAxiStreamCtrlType  
 
natural   range  0 to  8 TUSER_BITS_C
 
out sAxisSlaveAxiStreamSlaveType  
 
in sAxisMasterAxiStreamMasterType  
 
in mAxisSlaveAxiStreamSlaveType