1 ------------------------------------------------------------------------------- 2 -- Title : AXI Lite Empty End Point 3 -- File : AxiLiteEmpty.vhd 4 -- Author : Ryan Herbst, rherbst@slac.stanford.edu 5 -- Created : 03/10/2014 6 ------------------------------------------------------------------------------- 8 -- Empty slave endpoint for AXI Lite bus. 9 -- Absorbs writes and returns zeros on reads. 10 -- Supports a configurable number of write and read vectors. 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 ------------------------------------------------------------------------------- 20 -- Modification history: 21 -- 03/10/2014: created. 22 ------------------------------------------------------------------------------- 25 use ieee.std_logic_1164.
all;
26 use ieee.std_logic_arith.
all;
27 use ieee.std_logic_unsigned.
all;
48 -- User Read/Write registers 55 type RegType is record 61 constant REG_INIT_C : RegType := ( 66 signal r : RegType := REG_INIT_C;
73 variable regCon : AxiLiteEndPointType;
76 -- Latch the current value 79 -- Determine the transaction type 82 -- Map the read registers = [0x000:0x0FF] 84 axiSlaveRegisterR(regCon, toSlv((i*4)+0, 9), 0, readRegister(i));
87 -- Map the write registers = [0x100:0x1FF] 89 axiSlaveRegister(regCon, toSlv((i*4)+256, 9), 0, v.writeRegister(i));
92 -- Closeout the transaction 100 -- Register the variable for next clock cycle 112 if (rising_edge(axiClk)) then 113 r <= rin after TPD_G;
117 end architecture rtl;
array(natural range <> ) of slv( 31 downto 0) Slv32Array
out axiWriteSlaveAxiLiteWriteSlaveType
NUM_READ_REG_Ginteger range 1 to 32:= 1
AXI_ERROR_RESP_Gslv( 1 downto 0) := AXI_RESP_OK_C
in readRegisterSlv32Array( NUM_READ_REG_G- 1 downto 0) :=( others =>( others => '0'))
out writeRegisterSlv32Array( NUM_WRITE_REG_G- 1 downto 0)
out axiReadSlaveAxiLiteReadSlaveType
in axiReadMasterAxiLiteReadMasterType
AxiLiteReadSlaveType :=(arready => '0',rdata =>( others => '0'),rresp =>( others => '0'),rvalid => '0') AXI_LITE_READ_SLAVE_INIT_C
NUM_WRITE_REG_Ginteger range 1 to 32:= 1
in axiWriteMasterAxiLiteWriteMasterType
slv( 1 downto 0) := "00" AXI_RESP_OK_C
AxiLiteWriteSlaveType :=(awready => '0',wready => '0',bresp =>( others => '0'),bvalid => '0') AXI_LITE_WRITE_SLAVE_INIT_C