1 ------------------------------------------------------------------------------- 2 -- File : AxiWritePathMux.vhd 3 -- Company : SLAC National Accelerator Laboratory 4 -- Created : 2014-04-25 5 -- Last update: 2014-04-29 6 ------------------------------------------------------------------------------- 8 -- Block to connect multiple incoming AXI write path interfaces. 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;
56 -------------------------- 58 -------------------------- 60 type StateType is (S_IDLE_C, S_MOVE_C, S_LAST_C, S_WAIT_C);
101 ---------------------------- 103 ---------------------------- 110 -- Select address source 112 selAddr.awid := (others => '0');
117 addrRequests := (others=>'0');
122 -- Addr State machine 130 -- Aribrate between requesters 175 ---------------------------- 177 ---------------------------- 184 -- Select data source 186 selData.wid := (others => '0');
190 -- Data State machine 204 -- Move a frame until tLast 219 -- wlast to be presented 220 if selData.wlast = '1' and selData.wvalid = '1' then 238 ---------------------------- 240 ---------------------------- 242 -- Clear existing valids 249 -- Pass response to destination 267 -- Bypass if single slave 277 -- Readies are direct 289 if (rising_edge(axiClk)) then AxiWriteSlaveType :=(awready => '0',wready => '0',bresp =>( others => '0'),bvalid => '0',bid =>( others => '0')) AXI_WRITE_SLAVE_INIT_C
integer := 2** DEST_SIZE_C ARB_BITS_C
out sAxiWriteSlavesAxiWriteSlaveArray( NUM_SLAVES_G- 1 downto 0)
RegType :=(addrState => S_IDLE_C,addrAcks =>( others => '0'),addrAckNum =>( others => '0'),addrValid => '0',dataReq => '0',dataAck => '0',dataState => S_IDLE_C,dataAckNum =>( others => '0'),slaves =>( others => AXI_WRITE_SLAVE_INIT_C),master => AXI_WRITE_MASTER_INIT_C) REG_INIT_C
slv( 1023 downto 0) wdata
AxiWriteMasterType master
in mAxiWriteSlaveAxiWriteSlaveType
in sAxiWriteMastersAxiWriteMasterArray( NUM_SLAVES_G- 1 downto 0)
slv( ARB_BITS_C- 1 downto 0) addrAcks
(S_IDLE_C,S_MOVE_C,S_LAST_C,S_WAIT_C) StateType
slv( DEST_SIZE_C- 1 downto 0) dataAckNum
NUM_SLAVES_Ginteger range 1 to 32:= 4
integer := bitSize( NUM_SLAVES_G- 1) DEST_SIZE_C
AxiWriteSlaveArray( NUM_SLAVES_G- 1 downto 0) slaves
array(natural range <> ) of AxiWriteMasterType AxiWriteMasterArray
out mAxiWriteMasterAxiWriteMasterType
slv( DEST_SIZE_C- 1 downto 0) addrAckNum
array(natural range <> ) of AxiWriteSlaveType AxiWriteSlaveArray
AxiWriteMasterType :=(awvalid => '0',awaddr =>( others => '0'),awid =>( others => '0'),awlen =>( others => '0'),awsize =>( others => '0'),awburst =>( others => '0'),awlock =>( others => '0'),awprot =>( others => '0'),awcache =>( others => '0'),awqos =>( others => '0'),awregion =>( others => '0'),wdata =>( others => '0'),wlast => '0',wvalid => '0',wid =>( others => '0'),wstrb =>( others => '0'),bready => '0') AXI_WRITE_MASTER_INIT_C