1 ------------------------------------------------------------------------------- 2 -- File : AxiStreamPipeline.vhd 3 -- Company : SLAC National Accelerator Laboratory 4 -- Created : 2014-05-01 5 -- Last update: 2016-09-06 6 ------------------------------------------------------------------------------- 7 -- Description: This module is used to sync a AxiStream bus 8 -- either as a pass through or with pipeline register stages. 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;
41 end AxiStreamPipeline;
47 type RegType is record 52 constant REG_INIT_C : RegType := ( 56 signal r : RegType := REG_INIT_C;
74 -- Latch the current value 77 -- Check if we need to shift register 79 -- Shift the data up the pipeline 80 for i in PIPE_STAGES_C downto 2 loop 83 -- Check if the lowest cell is empty 87 -- Check if we were pulling the FIFO last clock cycle 89 -- Shift the FIFO data 92 -- Clear valid in stage 1 96 -- Shift the lowest cell 98 -- Check if we were pulling the FIFO last clock cycle 100 -- Reset the ready bit 102 -- Fill the lowest cell 107 -- Reset the lowest cell tValid 112 -- Reset the ready bit 114 -- Check if we were pulling the FIFO last clock cycle 116 -- Fill the lowest cell 122 -- Check if we need to internally shift the data to remove gaps 123 for i in PIPE_STAGES_C-1 downto 1 loop 124 -- Check for empty cell ahead of a filled cell 126 -- Shift the lowest cell 139 -- Register the variable for next clock cycle 151 r <= rin after TPD_G;
PIPE_STAGES_Gnatural range 0 to 16:= 0
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 sAxisSlaveAxiStreamSlaveType
in mAxisSlaveAxiStreamSlaveType
in sAxisMasterAxiStreamMasterType
AxiStreamSlaveType :=(tReady => '0') AXI_STREAM_SLAVE_INIT_C
array(natural range <> ) of AxiStreamMasterType AxiStreamMasterArray
out mAxisMasterAxiStreamMasterType