1 ------------------------------------------------------------------------------- 2 -- File : AxiStreamDma.vhd 3 -- Company : SLAC National Accelerator Laboratory 4 -- Created : 2014-04-25 5 -- Last update: 2017-05-03 6 ------------------------------------------------------------------------------- 8 -- Generic AXI Stream DMA block for frame at a time transfers. 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;
21 use ieee.std_logic_arith.
all;
22 use ieee.std_logic_unsigned.
all;
50 -- Register Access & Interrupt 58 -- AXI Stream Interface 205 -- attribute dont_touch : string; 206 -- attribute dont_touch of ob : signal is "true"; 207 -- attribute dont_touch of obAck : signal is "true"; 208 -- attribute dont_touch of obReq : signal is "true"; 209 -- attribute dont_touch of ib : signal is "true"; 210 -- attribute dont_touch of ibAck : signal is "true"; 211 -- attribute dont_touch of ibReq : signal is "true"; 217 if rising_edge(axiClk) then 296 U_ClkRstGen : for i in 0 to 1 generate 303 ------------------------------------- 304 -- Local Register Space 305 ------------------------------------- 386 -- Next register assignment 398 ------------------------------------- 399 -- Inbound Controller 400 ------------------------------------- 481 -- Next register assignment 492 ------------------------------------- 493 -- Outbound Controller 494 ------------------------------------- 594 -- Next register assignment POP_BRAM_EN_Gboolean := true
slv( POP_FIFO_COUNT_C- 1 downto 0) popFifoRst
AXI_READY_EN_Gboolean := false
BYP_SHIFT_Gboolean := false
in dmaReqAxiWriteDmaReqType
in popFifoDinSlv32Array( POP_FIFO_COUNT_G- 1 downto 0)
out dmaAckAxiWriteDmaAckType
slv( 63 downto 0) address
in mAxiWriteSlavesAxiLiteWriteSlaveArray( NUM_MASTER_SLOTS_G- 1 downto 0)
LOOP_ADDR_WIDTH_Ginteger range 4 to 48:= 4
in axilWriteMasterAxiLiteWriteMasterArray( AXIL_COUNT_G- 1 downto 0)
ALTERA_SYN_Gboolean := false
array(natural range <> ) of slv( 31 downto 0) Slv32Array
integer := FREE_ADDR_WIDTH_G POP_ADDR_WIDTH_C
AxiLiteReadSlaveType axiReadSlave
slv( 15 downto 0) connectivity
AXIS_CONFIG_GAxiStreamConfigType := AXI_STREAM_CONFIG_INIT_C
out axiWriteMasterAxiWriteMasterType
out axiReadMasterAxiReadMasterType
array(natural range <> ) of AxiLiteWriteSlaveType AxiLiteWriteSlaveArray
slv( 15 downto 0) := x"FFFF" CROSSBAR_CONN_C
AXI_CACHE_Gslv( 3 downto 0) := "1111"
in mAxiReadSlavesAxiLiteReadSlaveArray( NUM_MASTER_SLOTS_G- 1 downto 0)
out pushFifoDoutSlv36Array( PUSH_FIFO_COUNT_G- 1 downto 0)
in axiReadSlaveAxiReadSlaveType
slv( 7 downto 0) firstUser
integer := 2 POP_FIFO_COUNT_C
out axiWriteSlaveAxiLiteWriteSlaveType
slv( POP_FIFO_COUNT_C- 1 downto 0) pushFifoClk
IbType :=(state => IDLE_S,intPending => '0',ibReq => AXI_WRITE_DMA_REQ_INIT_C,popFifoWrite => '0',popFifoDin =>( others => '0'),pushFifoRead => '0') IB_INIT_C
NUM_SLAVE_SLOTS_Gnatural range 1 to 16:= 4
PUSH_BRAM_EN_Gboolean := false
out popFifoPFullslv( POP_FIFO_COUNT_G- 1 downto 0)
in axiWriteCtrlAxiCtrlType := AXI_CTRL_UNUSED_C
in dmaReqAxiReadDmaReqType
out pushFifoValidslv( PUSH_FIFO_COUNT_G- 1 downto 0)
POP_SYNC_FIFO_Gboolean := false
out popFifoAFullslv( POP_FIFO_COUNT_G- 1 downto 0)
PEND_THRESH_Gnatural := 0
POP_ADDR_WIDTH_Ginteger range 4 to 48:= 4
in sAxiWriteMastersAxiLiteWriteMasterArray( NUM_SLAVE_SLOTS_G- 1 downto 0)
PUSH_ADDR_WIDTH_Ginteger range 4 to 48:= 4
in popFifoRstslv( POP_FIFO_COUNT_G- 1 downto 0)
array(natural range <> ) of AxiLiteReadMasterType AxiLiteReadMasterArray
VALID_POLARITY_Gsl := '0'
AxiLiteWriteSlaveType axiWriteSlave
slv( 31 downto 0) baseAddr
AxiLiteWriteSlaveArray( 1 downto 0) intWriteSlaves
in swCacheslv( 3 downto 0) := "0000"
RegType :=(maxRxSize =>( others => '0'),interrupt => '0',intEnable => '0',intAck => '0',acknowledge => '0',online => '0',rxEnable => '0',txEnable => '0',fifoClear => '1',swCache => AXI_CACHE_G,axiReadSlave => AXI_LITE_READ_SLAVE_INIT_C,axiWriteSlave => AXI_LITE_WRITE_SLAVE_INIT_C) REG_INIT_C
out axiReadMasterAxiReadMasterType
in sAxisMasterAxiStreamMasterType
in sAxiReadMastersAxiLiteReadMasterArray( NUM_SLAVE_SLOTS_G- 1 downto 0)
AxiLiteStatusType axiStatus
natural := 10 FIFO_NUM_BITS_C
AXI_CONFIG_GAxiConfigType := AXI_CONFIG_INIT_C
in axiReadSlaveAxiReadSlaveType
AxiLiteReadSlaveArray( 1 downto 0) intReadSlaves
SW_CACHE_EN_Gboolean := false
slv( 7 downto 0) lastUser
LOOP_BRAM_EN_Gboolean := true
array(natural range <> ) of AxiLiteCrossbarMasterConfigType AxiLiteCrossbarMasterConfigArray
AXI_BURST_Gslv( 1 downto 0) := "01"
in mAxisCtrlAxiStreamCtrlType
out dmaAckAxiReadDmaAckType
slv( POP_FIFO_COUNT_C- 1 downto 0) popFifoValid
AXIS_READY_EN_Gboolean := false
MASTERS_CONFIG_GAxiLiteCrossbarMasterConfigArray := AXIL_XBAR_CFG_DEFAULT_C
slv( POP_FIFO_COUNT_C- 1 downto 0) popFifoPFull
DEC_ERROR_RESP_Gslv( 1 downto 0) := AXI_RESP_DECERR_C
out axiReadSlaveAxiLiteReadSlaveType
out sAxisSlaveAxiStreamSlaveType
XIL_DEVICE_Gstring := "7SERIES"
in axisCtrlAxiStreamCtrlType
in mAxisSlaveAxiStreamSlaveType
PUSH_FIFO_COUNT_Gpositive := 1
RANGE_LSB_Ginteger range 0 to 31:= 8
USE_BUILT_IN_Gboolean := false
Slv36Array( PUSH_FIFO_COUNT_C- 1 downto 0) pushFifoDout
LOOP_FIFO_COUNT_Gpositive := 1
BYP_SHIFT_Gboolean := false
integer :=( 2** POP_ADDR_WIDTH_C)- 10 POP_FIFO_PFULL_C
slv( POP_FIFO_COUNT_C- 1 downto 0) pushFifoRst
AXIL_COUNT_Ginteger range 1 to 2:= 1
AXI_CACHE_Gslv( 3 downto 0) := "1111"
slv( 23 downto 0) maxRxSize
SW_CACHE_EN_Gboolean := false
PUSH_SYNC_FIFO_Gboolean := false
FREE_ADDR_WIDTH_Ginteger := 9
in axiWriteCtrlAxiCtrlType
in popFifoWriteslv( POP_FIFO_COUNT_G- 1 downto 0)
out axiWriteMasterAxiWriteMasterType
PEND_THRESH_Gnatural := 0
out mAxiReadMastersAxiLiteReadMasterArray( NUM_MASTER_SLOTS_G- 1 downto 0)
AxiReadDmaReqType :=(request => '0',address =>( others => '0'),size =>( others => '0'),firstUser =>( others => '0'),lastUser =>( others => '0'),dest =>( others => '0'),id =>( others => '0')) AXI_READ_DMA_REQ_INIT_C
AXIS_READY_EN_Gboolean := false
AxiLiteReadSlaveType :=(arready => '0',rdata =>( others => '0'),rresp =>( others => '0'),rvalid => '0') AXI_LITE_READ_SLAVE_INIT_C
in axiWriteMasterAxiLiteWriteMasterType
in axiWriteSlaveAxiWriteSlaveType
natural := 1 FIFO_INDEX_C
AXI_BURST_Gslv( 1 downto 0) := "01"
NUM_MASTER_SLOTS_Gnatural range 1 to 64:= 4
integer := FREE_ADDR_WIDTH_G PUSH_ADDR_WIDTH_C
in axisMasterAxiStreamMasterType
VALID_POSITION_Ginteger range 0 to 31:= 0
in axisSlaveAxiStreamSlaveType
AxiStreamConfigType :=(TSTRB_EN_C => false,TDATA_BYTES_C => 16,TDEST_BITS_C => 4,TID_BITS_C => 0,TKEEP_MODE_C => TKEEP_NORMAL_C,TUSER_BITS_C => 4,TUSER_MODE_C => TUSER_NORMAL_C) AXI_STREAM_CONFIG_INIT_C
in pushFifoClkslv( PUSH_FIFO_COUNT_G- 1 downto 0)
AXI_CACHE_Gslv( 3 downto 0) := "1111"
ObType :=(state => IDLE_S,intPending => '0',obReq => AXI_READ_DMA_REQ_INIT_C,popFifoWrite => '0',popFifoDin =>( others => '0'),pushFifoRead => '0') OB_INIT_C
(IDLE_S,WAIT_S,FIFO_0_S,FIFO_1_S) StateType
array(natural range <> ) of slv( 35 downto 0) Slv36Array
array(natural range <> ) of AxiLiteWriteMasterType AxiLiteWriteMasterArray
out mAxisMasterAxiStreamMasterType
out popFifoValidslv( POP_FIFO_COUNT_G- 1 downto 0)
in popFifoClkslv( POP_FIFO_COUNT_G- 1 downto 0)
out sAxiReadSlavesAxiLiteReadSlaveArray( NUM_SLAVE_SLOTS_G- 1 downto 0)
slv( 31 downto 0) maxSize
in pushFifoRstslv( PUSH_FIFO_COUNT_G- 1 downto 0)
in swCacheslv( 3 downto 0) := "0000"
AxiLiteWriteMasterArray( 1 downto 0) intWriteMasters
slv( 1 downto 0) := "00" AXI_RESP_OK_C
slv( POP_FIFO_COUNT_C- 1 downto 0) popFifoClk
in pushFifoReadslv( PUSH_FIFO_COUNT_G- 1 downto 0)
AXIL_BASE_ADDR_Gslv( 31 downto 0) := x"00000000"
BYP_SHIFT_Gboolean := false
natural := 10 LOC_NUM_BITS_C
POP_FULL_THRES_Ginteger range 1 to ( 2** 24):= 1
AxiLiteCrossbarMasterConfigArray( 1 downto 0) :=(LOC_INDEX_C =>(baseAddr => LOC_BASE_ADDR_C,addrBits => LOC_NUM_BITS_C,connectivity => CROSSBAR_CONN_C),FIFO_INDEX_C =>(baseAddr => FIFO_BASE_ADDR_C,addrBits => FIFO_NUM_BITS_C,connectivity => CROSSBAR_CONN_C)) AXI_CROSSBAR_MASTERS_CONFIG_C
LOOP_FIFO_EN_Gboolean := false
AXIS_CONFIG_GAxiStreamConfigType := AXI_STREAM_CONFIG_INIT_C
array(natural range <> ) of AxiLiteReadSlaveType AxiLiteReadSlaveArray
out mAxiWriteMastersAxiLiteWriteMasterArray( NUM_MASTER_SLOTS_G- 1 downto 0)
in axiWriteSlaveAxiWriteSlaveType
POP_FIFO_COUNT_Gpositive := 1
AXI_BURST_Gslv( 1 downto 0) := "01"
out axilWriteSlaveAxiLiteWriteSlaveArray( AXIL_COUNT_G- 1 downto 0)
ALTERA_RAM_Gstring := "M9K"
out axilReadSlaveAxiLiteReadSlaveArray( AXIL_COUNT_G- 1 downto 0)
AXIS_CONFIG_GAxiStreamConfigType := AXI_STREAM_CONFIG_INIT_C
AxiConfigType :=axiConfig(ADDR_WIDTH_C => 32,DATA_BYTES_C => 4,ID_BITS_C => 12,LEN_BITS_C => 4) AXI_CONFIG_INIT_C
slv( 31 downto 0) := AXIL_BASE_ADDR_G( 31 downto 12)& x"400" FIFO_BASE_ADDR_C
AXI_CONFIG_GAxiConfigType := AXI_CONFIG_INIT_C
AxiLiteWriteSlaveType :=(awready => '0',wready => '0',bresp =>( others => '0'),bvalid => '0') AXI_LITE_WRITE_SLAVE_INIT_C
slv( 31 downto 0) := AXIL_BASE_ADDR_G( 31 downto 12)& x"000" LOC_BASE_ADDR_C
out sAxiWriteSlavesAxiLiteWriteSlaveArray( NUM_SLAVE_SLOTS_G- 1 downto 0)
integer := 2 PUSH_FIFO_COUNT_C
slv( 31 downto 0) popFifoDin
in axiReadMasterAxiLiteReadMasterType
in axilReadMasterAxiLiteReadMasterArray( AXIL_COUNT_G- 1 downto 0)
out axisSlaveAxiStreamSlaveType
AXI_READY_EN_Gboolean := false
out axisMasterAxiStreamMasterType
slv( PUSH_FIFO_COUNT_C- 1 downto 0) pushFifoValid
out popFifoFullslv( POP_FIFO_COUNT_G- 1 downto 0)
AxiLiteReadMasterArray( 1 downto 0) intReadMasters
AXI_CONFIG_GAxiConfigType := AXI_CONFIG_INIT_C
AxiWriteDmaReqType :=(request => '0',drop => '0',address =>( others => '0'),maxSize =>( others => '0')) AXI_WRITE_DMA_REQ_INIT_C