1 ------------------------------------------------------------------------------- 3 -- Company : SLAC National Accelerator Laboratory 4 -- Created : 2016-04-14 5 -- Last update: 2016-05-04 6 ------------------------------------------------------------------------------- 7 -- Description: SLAC Register Protocol Version 3, AXI Interface 9 -- Documentation: https://confluence.slac.stanford.edu/x/cRmVD 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;
34 --! @ingroup protocols_srp 56 -- AXIS Slave Interface (sAxisClk domain) 62 -- AXIS Master Interface (mAxisClk domain) 67 -- Master AXI Interface (mAxiClk domain) 87 type RegType is record 93 constant REG_INIT_C : RegType := ( 98 signal r : RegType := REG_INIT_C;
109 -- attribute dont_touch : string; 110 -- attribute dont_touch of r : signal is "TRUE"; 142 srpReq => srpReq,
-- [out] 143 srpAck => r.srpAck,
-- [in] 161 dmaReq => r.wrDmaReq,
-- [in] 162 dmaAck => wrDmaAck,
-- [out] 180 dmaReq => r.rdDmaReq,
-- [in] 181 dmaAck => rdDmaAck,
-- [out] 189 comb :
process (r,
axiRst, rdDmaAck, srpReq, wrDmaAck)
is 190 variable v : RegType;
191 variable addrError : sl;
193 -- Latch the current value 196 -- Check that requested address is within range of attached AXI bus 204 -- This helps the DMA engines trim their unaligned access logic 206 v.wrDmaReq.address(1 downto 0) := (others => '0');
213 v.rdDmaReq.address(1 downto 0) := (others => '0');
218 v.srpAck.done := '0';
221 v.srpAck.done := wrDmaAck.done or addrError;
226 v.srpAck.done := rdDmaAck.done or addrError;
238 -- Register the variable for next clock cycle 246 if (rising_edge(axiClk)) then 247 r <= rin after TPD_G;
in mAxisSlaveAxiStreamSlaveType
in dmaReqAxiWriteDmaReqType
TX_VALID_THOLD_Gpositive := 1
out dmaAckAxiWriteDmaAckType
natural range 0 to 8 TDEST_BITS_C
slv( 63 downto 0) address
out axiReadMasterAxiReadMasterType
BYTE_ACCESS_Gboolean := false
ALTERA_SYN_Gboolean := false
AXIS_CONFIG_GAxiStreamConfigType := AXI_STREAM_CONFIG_INIT_C
out axiWriteMasterAxiWriteMasterType
ALTERA_RAM_Gstring := "M9K"
AXI_CACHE_Gslv( 3 downto 0) := "1111"
out sAxisSlaveAxiStreamSlaveType
slv( 31 downto 0) reqSize
out mAxisMasterAxiStreamMasterType
GEN_SYNC_FIFO_Gboolean := false
in axiWriteCtrlAxiCtrlType := AXI_CTRL_UNUSED_C
BYTE_ACCESS_Gboolean := false
in dmaReqAxiReadDmaReqType
TX_VALID_THOLD_Gpositive := 1
SLAVE_READY_EN_Gboolean := false
ACK_WAIT_BVALID_Gboolean := true
AXI_STREAM_CONFIG_GAxiStreamConfigType := ssiAxiStreamConfig( 2)
out sAxisCtrlAxiStreamCtrlType
in srpRdMasterAxiStreamMasterType
slv( 1 downto 0) := "00" SRP_READ_C
AxiCtrlType :=(pause => '0',overflow => '0') AXI_CTRL_UNUSED_C
natural range 1 to 16 TDATA_BYTES_C
FIFO_PAUSE_THRESH_Gpositive range 1 to 511:= 256
ALTERA_SYN_Gboolean := false
PIPE_STAGES_Gnatural range 0 to 16:= 1
in mAxisSlaveAxiStreamSlaveType
out axiReadMasterAxiReadMasterType
UNALIGNED_ACCESS_Gboolean := false
TkeepModeType TKEEP_MODE_C
positive range 12 to 64 ADDR_WIDTH_C
SLAVE_READY_EN_Gboolean := true
AXI_CONFIG_GAxiConfigType := AXI_CONFIG_INIT_C
in axiReadSlaveAxiReadSlaveType
natural range 0 to 8 TID_BITS_C
UNALIGNED_ACCESS_Gboolean := false
out srpRdSlaveAxiStreamSlaveType
AXI_BURST_Gslv( 1 downto 0) := "01"
out dmaAckAxiReadDmaAckType
in axisCtrlAxiStreamCtrlType
in axiReadSlaveAxiReadSlaveType
AXI_CACHE_Gslv( 3 downto 0) := "1111"
slv( 7 downto 0) respCode
in sAxisMasterAxiStreamMasterType
in srpWrSlaveAxiStreamSlaveType
out sAxisCtrlAxiStreamCtrlType
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
TUserModeType TUSER_MODE_C
AXIS_READY_EN_Gboolean := false
in axiWriteSlaveAxiWriteSlaveType
natural range 0 to 8 TUSER_BITS_C
AXI_BURST_Gslv( 1 downto 0) := "01"
in axisMasterAxiStreamMasterType
in axisSlaveAxiStreamSlaveType
AxiStreamCtrlType :=(pause => '0',overflow => '0',idle => '1') AXI_STREAM_CTRL_UNUSED_C
AXI_STREAM_CONFIG_GAxiStreamConfigType := ssiAxiStreamConfig( 2)
FIFO_PAUSE_THRESH_Gpositive range 1 to 511:= 256
ACK_WAIT_BVALID_Gboolean := true
slv( 1 downto 0) errorValue
slv( 31 downto 0) maxSize
ALTERA_RAM_Gstring := "M9K"
WRITE_EN_Gboolean := true
AXI_BURST_Gslv( 1 downto 0) := "01"
out srpWrMasterAxiStreamMasterType
GEN_SYNC_FIFO_Gboolean := false
AXI_CACHE_Gslv( 3 downto 0) := "1111"
slv( 1 downto 0) := "01" SRP_WRITE_C
in sAxisMasterAxiStreamMasterType
out sAxisSlaveAxiStreamSlaveType
AXIS_CONFIG_GAxiStreamConfigType := AXI_STREAM_CONFIG_INIT_C
AXI_CONFIG_GAxiConfigType :=( 33, 4, 1, 8)
out mAxisMasterAxiStreamMasterType
PIPE_STAGES_Gnatural range 0 to 16:= 0
in axiWriteSlaveAxiWriteSlaveType
AXI_CONFIG_GAxiConfigType := AXI_CONFIG_INIT_C
AXI_CLK_FREQ_Greal := 156.25E+6
SrpV3AckType :=(done => '0',respCode =>( others => '0')) SRPV3_ACK_INIT_C
WRITE_EN_Gboolean := true
SRP_CLK_FREQ_Greal := 156.25E+6
slv( 1 downto 0) := "10" SRP_POSTED_WRITE_C
out axiWriteMasterAxiWriteMasterType
out axisSlaveAxiStreamSlaveType
AXI_READY_EN_Gboolean := false
out axisMasterAxiStreamMasterType
AxiWriteDmaReqType :=(request => '0',drop => '0',address =>( others => '0'),maxSize =>( others => '0')) AXI_WRITE_DMA_REQ_INIT_C