1 ------------------------------------------------------------------------------- 2 -- File : AxiStreamDmaV2.vhd 3 -- Company : SLAC National Accelerator Laboratory 4 -- Created : 2017-02-02 5 -- Last update: 2017-02-02 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;
51 -- Register Access & Interrupt 59 -- AXI Stream Interface 65 -- AXI Interfaces, 0 = Desc, 1-CHAN_COUNT_G = DMA 123 -- Read channel 0 unused. 146 -- Streaming Interface in axiWriteCtrlAxiCtrlType := AXI_CTRL_UNUSED_C
out dmaRdDescRetAxiReadDmaDescRetType
out dmaRdDescReqAxiReadDmaDescReqArray( CHAN_COUNT_G- 1 downto 0)
array(natural range <> ) of AxiStreamSlaveType AxiStreamSlaveArray
AxiReadMasterType :=(arvalid => '0',araddr =>( others => '0'),arid =>( others => '0'),arlen =>( others => '0'),arsize =>( others => '0'),arburst =>( others => '0'),arlock =>( others => '0'),arprot =>( others => '0'),arcache =>( others => '0'),arqos =>( others => '0'),arregion =>( others => '0'),rready => '0') AXI_READ_MASTER_INIT_C
out dmaRdDescRetAckslv( CHAN_COUNT_G- 1 downto 0)
array(natural range <> ) of AxiReadSlaveType AxiReadSlaveArray
AxiReadDmaDescRetArray( CHAN_COUNT_G- 1 downto 0) dmaRdDescRet
AXI_CONFIG_GAxiConfigType := AXI_CONFIG_INIT_C
out dmaWrDescRetAckslv( CHAN_COUNT_G- 1 downto 0)
AXI_READY_EN_Gboolean := false
array(natural range <> ) of AxiWriteDmaDescReqType AxiWriteDmaDescReqArray
in axiWriteCtrlAxiCtrlArray( CHAN_COUNT_G downto 0)
PEND_THRESH_Gnatural := 0
array(natural range <> ) of AxiReadDmaDescRetType AxiReadDmaDescRetArray
out axiReadMasterAxiReadMasterArray( CHAN_COUNT_G downto 0)
AXI_DESC_CONFIG_GAxiConfigType := AXI_CONFIG_INIT_C
in dmaRdDescReqAxiReadDmaDescReqType
in axisSlaveAxiStreamSlaveType
array(natural range <> ) of AxiReadDmaDescReqType AxiReadDmaDescReqArray
out axiWriteMasterAxiWriteMasterArray( CHAN_COUNT_G downto 0)
array(natural range <> ) of AxiWriteDmaDescAckType AxiWriteDmaDescAckArray
AXIS_READY_EN_Gboolean := false
in axisMasterAxiStreamMasterType
AxiWriteDmaDescReqArray( CHAN_COUNT_G- 1 downto 0) dmaWrDescReq
PIPE_STAGES_Gnatural := 1
out onlineslv( CHAN_COUNT_G- 1 downto 0)
in mAxisSlaveAxiStreamSlaveArray( CHAN_COUNT_G- 1 downto 0)
in axilWriteMasterAxiLiteWriteMasterType
out dmaWrDescRetAxiWriteDmaDescRetType
out dmaWrDescAckAxiWriteDmaDescAckArray( CHAN_COUNT_G- 1 downto 0)
RD_PEND_THRESH_Gnatural := 0
in axiWriteSlaveAxiWriteSlaveType
CHAN_COUNT_Ginteger range 1 to 16:= 1
ACK_WAIT_BVALID_Gboolean := true
out acknowledgeslv( CHAN_COUNT_G- 1 downto 0)
in axiWriteSlaveAxiWriteSlaveType
AxiReadDmaDescReqArray( CHAN_COUNT_G- 1 downto 0) dmaRdDescReq
slv( CHAN_COUNT_G- 1 downto 0) dmaWrDescRetAck
BURST_BYTES_Ginteger range 1 to 4096:= 4096
AXI_CONFIG_GAxiConfigType := AXI_CONFIG_INIT_C
in axilReadMasterAxiLiteReadMasterType
BURST_BYTES_Ginteger range 1 to 4096:= 4096
slv( 3 downto 0) axiCache
in dmaWrDescRetAxiWriteDmaDescRetArray( CHAN_COUNT_G- 1 downto 0)
AxiWriteDmaDescRetArray( CHAN_COUNT_G- 1 downto 0) dmaWrDescRet
AXI_CONFIG_GAxiConfigType := AXI_CONFIG_INIT_C
in dmaRdDescRetAxiReadDmaDescRetArray( CHAN_COUNT_G- 1 downto 0)
array(natural range <> ) of AxiWriteDmaDescRetType AxiWriteDmaDescRetArray
AXIS_CONFIG_GAxiStreamConfigType := AXI_STREAM_CONFIG_INIT_C
in sAxisMasterAxiStreamMasterArray( CHAN_COUNT_G- 1 downto 0)
in axiWriteSlaveAxiWriteSlaveArray( CHAN_COUNT_G downto 0)
AXI_READY_EN_Gboolean := false
out mAxisMasterAxiStreamMasterArray( CHAN_COUNT_G- 1 downto 0)
out axiWriteMasterAxiWriteMasterType
out dmaWrDescReqAxiWriteDmaDescReqType
in axilReadMasterAxiLiteReadMasterType
CHAN_COUNT_Ginteger range 1 to 16:= 1
in dmaWrDescAckAxiWriteDmaDescAckType
slv( CHAN_COUNT_G- 1 downto 0) dmaRdDescRetAck
out axilReadSlaveAxiLiteReadSlaveType
out axisSlaveAxiStreamSlaveType
array(natural range <> ) of AxiStreamCtrlType AxiStreamCtrlArray
RD_PIPE_STAGES_Gnatural := 1
DESC_AWIDTH_Ginteger range 4 to 12:= 12
out axiReadMasterAxiReadMasterType
in dmaRdDescAckslv( CHAN_COUNT_G- 1 downto 0)
array(natural range <> ) of AxiStreamMasterType AxiStreamMasterArray
in axiCacheslv( 3 downto 0)
in axiCacheslv( 3 downto 0)
out axiCacheslv( 3 downto 0)
AXI_ERROR_RESP_Gslv( 1 downto 0) := AXI_RESP_OK_C
in dmaWrDescReqAxiWriteDmaDescReqArray( CHAN_COUNT_G- 1 downto 0)
out axilWriteSlaveAxiLiteWriteSlaveType
array(natural range <> ) of AxiReadMasterType AxiReadMasterArray
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
array(natural range <> ) of AxiWriteMasterType AxiWriteMasterArray
in axiWriteCtrlAxiCtrlType := AXI_CTRL_UNUSED_C
AXIL_BASE_ADDR_Gslv( 31 downto 0) := x"00000000"
in mAxisCtrlAxiStreamCtrlArray( CHAN_COUNT_G- 1 downto 0)
AXIS_READY_EN_Gboolean := false
out axilReadSlaveAxiLiteReadSlaveType
in axisCtrlAxiStreamCtrlType
in axiReadSlaveAxiReadSlaveType
out axisMasterAxiStreamMasterType
slv( 1 downto 0) := "00" AXI_RESP_OK_C
AXI_READY_EN_Gboolean := false
slv( CHAN_COUNT_G- 1 downto 0) dmaRdDescAck
AxiWriteDmaDescAckArray( CHAN_COUNT_G- 1 downto 0) dmaWrDescAck
AXIS_CONFIG_GAxiStreamConfigType := AXI_STREAM_CONFIG_INIT_C
out sAxisSlaveAxiStreamSlaveArray( CHAN_COUNT_G- 1 downto 0)
AXI_ERROR_RESP_Gslv( 1 downto 0) := AXI_RESP_OK_C
array(natural range <> ) of AxiWriteSlaveType AxiWriteSlaveArray
AXIL_BASE_ADDR_Gslv( 31 downto 0) := x"00000000"
out acknowledgeslv( CHAN_COUNT_G- 1 downto 0)
AxiConfigType :=axiConfig(ADDR_WIDTH_C => 32,DATA_BYTES_C => 4,ID_BITS_C => 12,LEN_BITS_C => 4) AXI_CONFIG_INIT_C
in axilWriteMasterAxiLiteWriteMasterType
ACK_WAIT_BVALID_Gboolean := true
array(natural range <> ) of AxiCtrlType AxiCtrlArray
AXIS_CONFIG_GAxiStreamConfigType := AXI_STREAM_CONFIG_INIT_C
DESC_AWIDTH_Ginteger range 4 to 12:= 12
in axiReadSlaveAxiReadSlaveArray( CHAN_COUNT_G downto 0)
out onlineslv( CHAN_COUNT_G- 1 downto 0)
BURST_BYTES_Ginteger range 1 to 4096:= 4096
out axilWriteSlaveAxiLiteWriteSlaveType
out axiWriteMasterAxiWriteMasterType
AXI_DMA_CONFIG_GAxiConfigType := AXI_CONFIG_INIT_C