1 ------------------------------------------------------------------------------- 2 -- File : AxiLiteAsync.vhd 3 -- Company : SLAC National Accelerator Laboratory 4 -- Created : 2013-04-02 5 -- Last update: 2016-04-26 6 ------------------------------------------------------------------------------- 8 -- Asynchronous bridge for AXI Lite bus. Allows AXI transactions to cross 10 ------------------------------------------------------------------------------- 11 -- This file is part of 'SLAC Firmware Standard Library'. 12 -- It is subject to the license terms in the LICENSE.txt file found in the 13 -- top-level directory of this distribution and at: 14 -- https://confluence.slac.stanford.edu/display/ppareg/LICENSE.html. 15 -- No part of 'SLAC Firmware Standard Library', including this file, 16 -- may be copied, modified, propagated, or distributed except according to 17 -- the terms contained in the LICENSE.txt file. 18 ------------------------------------------------------------------------------- 21 use ieee.std_logic_1164.
all;
22 use ieee.std_logic_arith.
all;
23 use ieee.std_logic_unsigned.
all;
56 signal s2mRst : sl;
-- Slave rst sync'd to master clk 57 signal m2sRst : sl;
-- Master rst sync'd to slave clk 107 -- Synchronize each reset across to the other clock domain 108 LOC_S2M_RstSync :
entity work.
RstSync 117 LOC_M2S_RstSync :
entity work.
RstSync 128 ------------------------------------ 129 -- Read: Slave to Master 130 ------------------------------------ 132 -- Read Slave To Master FIFO 133 U_ReadSlaveToMastFifo :
entity work.FifoASync
136 RST_POLARITY_G => '1',
137 BRAM_EN_G => false,
-- Use Dist Ram 140 ALTERA_SYN_G => false,
141 ALTERA_RAM_G =>
"M9K",
144 DATA_WIDTH_G => NUM_ADDR_BITS_G+3,
153 din => readSlaveTomastDin,
154 wr_data_count =>
open,
163 dout => readSlaveTomastDout,
164 rd_data_count =>
open,
168 almost_empty =>
open,
176 -- Write control and ready generation 189 -- Read control and valid 194 ------------------------------------ 195 -- Read: Master To Slave 196 ------------------------------------ 198 -- Read Master To Slave FIFO 199 U_ReadMastToSlaveFifo :
entity work.FifoASync
202 RST_POLARITY_G => '1',
203 BRAM_EN_G => false,
-- Use Dist Ram 206 ALTERA_SYN_G => false,
207 ALTERA_RAM_G =>
"M9K",
220 wr_data_count =>
open,
230 rd_data_count =>
open,
234 almost_empty =>
open,
242 -- Write control and ready generation 250 -- Read control and valid 255 ------------------------------------ 256 -- Write Addr : Slave To Master 257 ------------------------------------ 259 -- Write Addr Master To Slave FIFO 260 U_WriteAddrSlaveToMastFifo :
entity work.FifoASync
263 RST_POLARITY_G => '1',
264 BRAM_EN_G => false,
-- Use Dist Ram 267 ALTERA_SYN_G => false,
268 ALTERA_RAM_G =>
"M9K",
271 DATA_WIDTH_G => NUM_ADDR_BITS_G+3,
281 wr_data_count =>
open,
291 rd_data_count =>
open,
295 almost_empty =>
open,
303 -- Write control and ready generation 316 -- Read control and valid 321 ------------------------------------ 322 -- Write Data : Slave to Master 323 ------------------------------------ 325 -- Write Data Slave To Master FIFO 326 U_WriteDataSlaveToMastFifo :
entity work.FifoASync
329 RST_POLARITY_G => '1',
330 BRAM_EN_G => false,
-- Use Dist Ram 333 ALTERA_SYN_G => false,
334 ALTERA_RAM_G =>
"M9K",
346 din => writeDataSlaveTomastDin,
347 wr_data_count =>
open,
356 dout => writeDataSlaveTomastDout,
357 rd_data_count =>
open,
361 almost_empty =>
open,
369 -- Write control and ready generation 377 -- Read control and valid 382 ------------------------------------ 383 -- Write: Status Master To Slave 384 ------------------------------------ 386 -- Write Status Master To Slave FIFO 387 U_WriteMastToSlaveFifo :
entity work.FifoASync
390 RST_POLARITY_G => '1',
391 BRAM_EN_G => false,
-- Use Dist Ram 394 ALTERA_SYN_G => false,
395 ALTERA_RAM_G =>
"M9K",
408 wr_data_count =>
open,
418 rd_data_count =>
open,
422 almost_empty =>
open,
429 -- Write control and ready generation 436 -- Read control and valid 442 end architecture STRUCTURE;
COMMON_CLK_Gboolean := false
AXI_ERROR_RESP_Gslv( 1 downto 0) := AXI_RESP_SLVERR_C
out mAxiReadMasterAxiLiteReadMasterType
slv( NUM_ADDR_BITS_G+ 2 downto 0) writeAddrSlaveToMastDout
PIPE_STAGES_Ginteger range 0 to 16:= 0
slv( NUM_ADDR_BITS_G+ 2 downto 0) writeAddrSlaveToMastDin
in mAxiWriteSlaveAxiLiteWriteSlaveType
slv( 1 downto 0) writeMastToSlaveDin
out sAxiWriteSlaveAxiLiteWriteSlaveType
sl writeDataSlaveToMastRead
slv( 1 downto 0) writeMastToSlaveDout
in sAxiReadMasterAxiLiteReadMasterType
slv( NUM_ADDR_BITS_G+ 2 downto 0) readSlaveToMastDout
slv( 1 downto 0) := "10" AXI_RESP_SLVERR_C
in sAxiWriteMasterAxiLiteWriteMasterType
sl writeDataSlaveToMastFull
slv( NUM_ADDR_BITS_G+ 2 downto 0) readSlaveToMastDin
slv( 35 downto 0) writeDataSlaveToMastDout
sl writeAddrSlaveToMastValid
sl writeDataSlaveToMastValid
out sAxiReadSlaveAxiLiteReadSlaveType
slv( 35 downto 0) writeDataSlaveToMastDin
sl writeAddrSlaveToMastFull
sl writeDataSlaveToMastWrite
OUT_REG_RST_Gboolean := true
sl writeAddrSlaveToMastRead
in mAxiReadSlaveAxiLiteReadSlaveType
slv( 33 downto 0) readMastToSlaveDout
sl writeAddrSlaveToMastWrite
slv( 33 downto 0) readMastToSlaveDin
out mAxiWriteMasterAxiLiteWriteMasterType
NUM_ADDR_BITS_Gnatural := 32