Entity: util_fifo2axi_bridge

Diagram

SRC_DATA_WIDTH SRC_ADDR_WIDTH DST_DATA_WIDTH DST_ADDR_WIDTH AXI_DATA_WIDTH AXI_ADDR_WIDTH AXI_ADDRESS AXI_ADDRESS_LIMIT REMOVE_NULL_BEAT_EN fifo_src_clk fifo_src_resetn fifo_src_wen [SRC_ADDR_WIDTH-1:0] fifo_src_waddr [SRC_DATA_WIDTH-1:0] fifo_src_wdata fifo_src_wlast fifo_dst_clk fifo_dst_resetn fifo_dst_ren [DST_ADDR_WIDTH-1:0] fifo_dst_raddr axi_clk axi_resetn axi_awready axi_wready axi_bvalid [ 3:0] axi_bid [ 1:0] axi_bresp axi_arready axi_rvalid [ 3:0] axi_rid [ 1:0] axi_rresp axi_rlast [(AXI_DATA_WIDTH-1):0] axi_rdata [DST_DATA_WIDTH-1:0] fifo_dst_rdata fifo_dst_ready fifo_src_full fifo_dst_empty reg axi_awvalid [ 3:0] axi_awid [ 1:0] axi_awburst axi_awlock [ 3:0] axi_awcache [ 2:0] axi_awprot [ 3:0] axi_awqos [ 7:0] axi_awlen [ 2:0] axi_awsize [(AXI_ADDR_WIDTH-1):0] axi_awaddr reg axi_wvalid [(AXI_DATA_WIDTH-1):0] axi_wdata [(AXI_DATA_WIDTH/8-1):0] axi_wstrb axi_wlast reg axi_bready reg axi_arvalid [ 3:0] axi_arid [ 1:0] axi_arburst axi_arlock [ 3:0] axi_arcache [ 2:0] axi_arprot [ 3:0] axi_arqos [ 7:0] axi_arlen [ 2:0] axi_arsize [(AXI_ADDR_WIDTH-1):0] axi_araddr axi_rready

Description



Copyright 2014 - 2017 (c) Analog Devices, Inc. All rights reserved.

In this HDL repository, there are many different and unique modules, consisting of various HDL (Verilog or VHDL) components. The individual modules are developed independently, and may be accompanied by separate and unique license terms.

The user should read each of these license terms, and understand the freedoms and responsibilities that he or she has by using this source/core.

This core is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Redistribution and use of source or resulting binaries, with or without modification of this file, are permitted under one of the following two license terms:

  1. The GNU General Public License version 2 as published by the Free Software Foundation, which can be found in the top level directory of this repository (LICENSE_GPL2), and also online at: https://www.gnu.org/licenses/old-licenses/gpl-2.0.html

OR

  1. An ADI specific BSD license, which can be found in the top level directory of this repository (LICENSE_ADIBSD), and also on-line at: https://github.com/analogdevicesinc/hdl/blob/master/LICENSE_ADIBSD This will allow to generate bit files and not release the source code, as long as it attaches to an ADI device.


Generics

Generic name Type Value Description
SRC_DATA_WIDTH 64
SRC_ADDR_WIDTH 8
DST_DATA_WIDTH 128
DST_ADDR_WIDTH 7
AXI_DATA_WIDTH 512
AXI_ADDR_WIDTH 32
AXI_ADDRESS 32'h00000000
AXI_ADDRESS_LIMIT 32'hffffffff
REMOVE_NULL_BEAT_EN 0

Ports

Port name Direction Type Description
fifo_src_clk input
fifo_src_resetn input
fifo_src_wen input
fifo_src_waddr input [SRC_ADDR_WIDTH-1:0]
fifo_src_wdata input [SRC_DATA_WIDTH-1:0]
fifo_src_wlast input
fifo_dst_clk input
fifo_dst_resetn input
fifo_dst_ren input
fifo_dst_raddr input [DST_ADDR_WIDTH-1:0]
fifo_dst_rdata output [DST_DATA_WIDTH-1:0]
fifo_dst_ready output Signal to the controller, that the bridge is ready to push data to the destination
fifo_src_full output FULL asserts when SOURCE data rate (e.g. ADC) is higher than DDR data rate
fifo_dst_empty output EMPTY asserts when DESTINATION data rate (e.g. DAC) is higher than DDR data rate
axi_clk input AXI4 interface
axi_resetn input
axi_awvalid output reg
axi_awid output [ 3:0]
axi_awburst output [ 1:0]
axi_awlock output
axi_awcache output [ 3:0]
axi_awprot output [ 2:0]
axi_awqos output [ 3:0]
axi_awlen output [ 7:0]
axi_awsize output [ 2:0]
axi_awaddr output [(AXI_ADDR_WIDTH-1):0]
axi_awready input
axi_wvalid output reg
axi_wdata output [(AXI_DATA_WIDTH-1):0]
axi_wstrb output [(AXI_DATA_WIDTH/8-1):0]
axi_wlast output
axi_wready input
axi_bvalid input
axi_bid input [ 3:0]
axi_bresp input [ 1:0]
axi_bready output reg always ready for write response
axi_arvalid output reg
axi_arid output [ 3:0]
axi_arburst output [ 1:0]
axi_arlock output
axi_arcache output [ 3:0]
axi_arprot output [ 2:0]
axi_arqos output [ 3:0]
axi_arlen output [ 7:0]
axi_arsize output [ 2:0]
axi_araddr output [(AXI_ADDR_WIDTH-1):0]
axi_arready input
axi_rvalid input
axi_rid input [ 3:0]
axi_rresp input [ 1:0]
axi_rlast input
axi_rdata input [(AXI_DATA_WIDTH-1):0]
axi_rready output

Signals

Name Type Description
axi_wkeep_int_s wire [AXI_DATA_WIDTH/8-1:0]
axi_wlast_int_s wire
axi_fifo_src_last_received_s wire
axi_wcdc_almost_empty wire
axi_wcdc_empty wire
axi_wcdc_level_s wire [AXI_CDC_ADDR_WIDTH-1:0]
axi_wdata_en_s wire
axi_fifo_src_resetn wire
axi_fifo_dst_resetn wire
axi_rxfer_start_s wire
axi_src_resetn wire
axi_dst_resetn wire
fifo_src_last_received reg
axi_wxfer_active reg
axi_rxfer_active reg
axi_rdata_en reg
axi_awlen_d reg [ 7:0]
axi_wbeat_counter reg [ 7:0]
axi_wburst_counter reg [31:0]
axi_rburst_counter reg [31:0]
axi_last_burst_length reg [AXI_CDC_ADDR_WIDTH-1:0]
axi_wxfer_active_d reg [ 1:0]
axi_write_done reg
axi_rxfer_active_d reg
axi_wlast_tkeep reg [AXI_DATA_WIDTH/8-1:0] save the last TKEEP for read NOTE: we are writing invalid data to the memory in case of a fractional last beat
axi_rlast_keep_s wire [AXI_DATA_WIDTH/8:0]
fifo_dst_tkeep_int_s wire [DST_DATA_WIDTH/8-1:0]
fifo_dst_tdata_int_s wire [DST_DATA_WIDTH-1:0]
fifo_dst_tready_int_s wire
fifo_dst_tvalid_int_s wire
fifo_dst_almost_empty_s wire
fifo_dst_empty_s wire
fifo_dst_cdc_ready reg Assuming that the EMIF has a higher bandwidth than the destination interface, load at least one burst into CDC FIFO

Constants

Name Type Value Description
AXI_BYTE_WIDTH AXI_DATA_WIDTH/8 AXI Memory Mapped related parameters
AXI_SIZE 3'b111 :
AXI_LENGTH 4096/AXI_BYTE_WIDTH - 1 we are using the max burst length by default, respecting the 4kbyte boundary defined by the AXI4 standard
AXI_LENGTH_INDEX $clog2(AXI_LENGTH)
AXI_ADDR_INCR AXI_BYTE_WIDTH
FOUR_KB 4096 * 8 CDC FIFO's must be capable to store a 2 x 4Kbytes WARNING: Changing this depth will brake other part of the bridge
AXI_CDC_ADDR_WIDTH [31:0] $clog2(((2 * FOUR_KB) / AXI_DATA_WIDTH) - 1)
SRC_CDC_ADDR_WIDTH [31:0] $clog2(((2 * FOUR_KB) / SRC_DATA_WIDTH) - 1)
DST_CDC_ADDR_WIDTH [31:0] $clog2(((2 * FOUR_KB) / DST_DATA_WIDTH) - 1)
SRC_4KB_BYTE FOUR_KB/SRC_DATA_WIDTH
DST_4KB_BYTE FOUR_KB/DST_DATA_WIDTH
DST_4KB_BYTE_INDEX $clog2(FOUR_KB/DST_DATA_WIDTH)
AXI_4KB_BYTE FOUR_KB/AXI_DATA_WIDTH
WR_CDC_ALMOST_EMPTY_THRESHOLD AXI_4KB_BYTE almost full and almost empty thresholds for the CDC FIFO's
RD_CDC_ALMOST_EMPTY_THRESHOLD DS

Processes

Type: always

Type: always

Description
it helps to flush the source CDC FIFO

Type: always

Type: always

Type: always

Type: always

Description
WRITE address and data channel control

Type: always

Description
awvalid_control */

Type: always

Description
wvalid_control */

Type: always

Description
latch AWLEN for WLAST generation

Type: always

Description
WRITE beat counter to assert WLAST at the right time

Type: always

Description
NOTE: the write CDC FIFO has a 2x4KB depth, so we need to save the last burst length when the level is less than 4KB WARNING: if the CDC depth changes for some reason this will brake

Type: always

Description
the bridge is in a constant read state after the write was finished, until resets (e.g. before the next initialization/write)

Type: always

Description
status flag to indicate an active read transfer

Type: always

Type: always

Description
the bridge needs to predict the last read burst to specify its length this is done by counting the write and read burst, and presuming that after a X number of write burst will follow n*X number of read burst, where n is an integer number

Type: always

Type: always

Description
READ address generation

Type: always

Instantiations

Description

Source side logic - CDC FIFO instance

Source CDC FIFO - source clock domain to storage unit's clock domain

Description
transfer FIFO resets to AXI clock domain

Description
Destination CDC FIFO - storage unit's clock domain to destination clock
domain