1 ------------------------------------------------------------------------------- 2 -- File : AxiLiteMaster.vhd 3 -- Company : SLAC National Accelerator Laboratory 4 -- Created : 2014-04-09 5 -- Last update: 2016-03-09 6 ------------------------------------------------------------------------------- 7 -- Description: AXI-Lite Master module controlled via REQ/ACK interface 8 ------------------------------------------------------------------------------- 9 -- This file is part of 'SLAC Firmware Standard Library'. 10 -- It is subject to the license terms in the LICENSE.txt file found in the 11 -- top-level directory of this distribution and at: 12 -- https://confluence.slac.stanford.edu/display/ppareg/LICENSE.html. 13 -- No part of 'SLAC Firmware Standard Library', including this file, 14 -- may be copied, modified, propagated, or distributed except according to 15 -- the terms contained in the LICENSE.txt file. 16 ------------------------------------------------------------------------------- 19 use ieee.std_logic_1164.
all;
20 use ieee.std_logic_arith.
all;
21 use ieee.std_logic_unsigned.
all;
48 type StateType is (S_IDLE_C, S_WRITE_C, S_WRITE_AXI_C, S_READ_C, S_READ_AXI_C);
50 type RegType is record 57 constant REG_INIT_C : RegType := ( 63 signal r : RegType := REG_INIT_C;
69 ------------------------------------- 70 -- Master State Machine 71 ------------------------------------- 99 -- Prepare Write Transaction 109 v.state := S_WRITE_AXI_C;
111 -- Write Transaction, AXI 112 when S_WRITE_AXI_C => 113 -- Clear control signals on ack 132 -- Start AXI transaction 135 v.state := S_READ_AXI_C;
139 -- Clear control signals on ack 149 -- Transaction is done 173 r <= rin after TPD_G;
out axilWriteMasterAxiLiteWriteMasterType
out axilReadMasterAxiLiteReadMasterType
in axilWriteSlaveAxiLiteWriteSlaveType
in reqAxiLiteMasterReqType
out ackAxiLiteMasterAckType
AxiLiteMasterAckType :=(done => '0',resp =>( others => '0'),rdData =>( others => '0')) AXI_LITE_MASTER_ACK_INIT_C
AxiLiteReadMasterType :=(araddr =>( others => '0'),arprot =>( others => '0'),arvalid => '0',rready => '1') AXI_LITE_READ_MASTER_INIT_C
in axilReadSlaveAxiLiteReadSlaveType
slv( 31 downto 0) address
AxiLiteWriteMasterType :=(awaddr =>( others => '0'),awprot =>( others => '0'),awvalid => '0',wdata =>( others => '0'),wstrb =>( others => '1'),wvalid => '0',bready => '1') AXI_LITE_WRITE_MASTER_INIT_C