Parameterized Macro: AXI Memory Mapped (AXI Full) FIFO
- MACRO_GROUP: XPM
- MACRO_SUBGROUP: XPM_FIFO
Introduction
This macro is used to instantiate AXI Memory Mapped (AXI Full) FIFO.
AXI4 FIFO is derived from the XPM_FIFO_SYNC and XPM_FIFO_ASYNC. The AXI interface protocol uses a two-way valid and ready handshake mechanism. The information source uses the valid signal to show when valid data or control information is available on the channel. The information destination uses the ready signal to show when it can accept the data.
Timing Diagrams
In the timing diagrams above, the information source generates the valid signal to indicate when the data is available. The destination generates the ready signal to indicate that it can accept the data, and transfer occurs only when both the valid and ready signals are High.
Because AXI4 FIFO is derived from XPM_FIFO_SYNC and XPM_FIFO_ASYNC, much of the behavior is common between them. The ready signal is generated based on availability of space in the FIFO and is held high to allow writes to the FIFO. The ready signal is pulled Low only when there is no space in the FIFO left to perform additional writes. The valid signal is generated based on availability of data in the FIFO and is held High to allow reads to be performed from the FIFO. The valid signal is pulled Low only when there is no data available to be read from the FIFO. The information signals are mapped to the din and dout bus of XPM_FIFO_SYNC and XPM_FIFO_ASYNC. The width of the AXI4 FIFO is determined by concatenating all of the information signals of the AXI interface. The information signals include all AXI signals except for the valid and ready handshake signals.
AXI4 FIFO operates only in First-Word Fall-Through mode. The First-Word Fall-Through (FWFT) feature provides the ability to look ahead to the next word available from the FIFO without issuing a read operation. When data is available in the FIFO, the first word falls through the FIFO and appears automatically on the output data bus.
Module Ports
The vivado_interfaces.svh file includes the following module ports for AXI4, AXI4-Stream, and AXI4-Lite interfaces.
| Interface Type | Ports |
|---|---|
| vivado_axis_v1_0 | TID, TDEST, TDATA, TSTRB, TKEEP, TLAST, TUSER, TVALID, TREADY |
| vivado_aximm_v1_0 | AWID, AWADDR, AWLEN, AWSIZE, AWBURST, AWLOCK, AWCACHE, AWPROT, AWREGION, AWQOS, AWUSER, AWVALID, WID, WDATA, WSTRB, WLAST, WUSER, WVALID, BREADY, ARID, ARADDR, ARLEN, ARSIZE, ARBURST, ARLOCK, ARCACHE, ARPROT, ARREGION, ARQOS, ARUSER, ARVALID, RREADY, AWREADY, WREADY, BID, BRESP, BUSER, BVALID, ARREADY, RID, RDATA, RRESP, RLAST, RUSER, RVALID |
| vivado_axi4_lite_v1_0 | AWADDR, AWPROT, AWVALID, WDATA, WSTRB, WVALID, BREADY, ARADDR, ARPROT, ARVALID, RREADY, AWREADY, WREADY, BRESP, BVALID, ARREADY, RDATA, RRESP, RVALID |
Port Descriptions
| Port | Direction | Width | Function |
|---|---|---|---|
| M_AXI | Interface | Master AXI interface. | |
| S_AXI | Interface | Slave AXI interface. | |
| dbiterr_rdch | Output | 1 | Indicates that the ECC decoder detected a double-bit error and data in the FIFO core is corrupted. |
| dbiterr_wdch | Output | 1 | Indicates that the ECC decoder detected a double-bit error and data in the FIFO core is corrupted. |
| prog_empty_rdch | Output | 1 | This signal is asserted when the number of words in the Read Data
Channel FIFO is less than or equal to the programmable empty
threshold value. It is deasserted when the number of words in the Read Data Channel FIFO exceeds the programmable empty threshold value. |
| prog_empty_wdch | Output | 1 | 1-bit output; Programmable Empty- This signal is asserted when
the number of words in the Write Data Channel FIFO is less than or
equal to the programmable empty threshold value. It is deasserted when the number of words in the Write Data Channel FIFO exceeds the programmable empty threshold value. |
| prog_full_rdch | Output | 1 | This signal is asserted when the number of words in the Read Data
Channel FIFO is greater than or equal to the programmable full
threshold value. It is deasserted when the number of words in the Read Data Channel FIFO is less than the programmable full threshold value. |
| prog_full_wdch | Output | 1 | This signal is asserted when the number of words in the Write
Data Channel FIFO is greater than or equal to the programmable full
threshold value. It is deasserted when the number of words in the Write Data Channel FIFO is less than the programmable full threshold value. |
| rd_data_count_rdch | Output | RD_DATA_COUNT_WIDTH_RDCH | This bus indicates the number of words available for reading in the Read Data Channel FIFO. |
| rd_data_count_wdch | Output | RD_DATA_COUNT_WIDTH_WDCH | This bus indicates the number of words available for reading in the Write Data Channel FIFO. |
| sbiterr_rdch | Output | 1 | Indicates that the ECC decoder detected and fixed a single-bit error. |
| sbiterr_wdch | Output | 1 | Indicates that the ECC decoder detected and fixed a single-bit error. |
| wr_data_count_rdch | Output | WR_DATA_COUNT_WIDTH_RDCH | WR_DATA_COUNT_WIDTH_RDCH-bit output. Write Data Count: This bus indicates the number of words written into the Read Data Channel FIFO. |
| wr_data_count_wdch | Output | WR_DATA_COUNT_WIDTH_WDCH | WR_DATA_COUNT_WIDTH_WDCH-bit output. Write Data Count: This bus indicates the number of words written into the Write Data Channel FIFO. |
| injectdbiterr_rdch | Input | 1 | Double Bit Error Injection- Injects a double bit error if the ECC feature is used. |
| injectdbiterr_wdch | Input | 1 | Double Bit Error Injection- Injects a double bit error if the ECC feature is used. |
| injectsbiterr_rdch | Input | 1 | Single Bit Error Injection- Injects a single bit error if the ECC feature is used. |
| injectsbiterr_wdch | Input | 1 | Single Bit Error Injection- Injects a single bit error if the ECC feature is used. |
| m_aclk | Input | 1 | Master Interface Clock: All signals on master interface are sampled on the rising edge of this clock. |
| s_aclk | Input | 1 | Slave Interface Clock: All signals on slave interface are sampled on the rising edge of this clock. |
| s_aresetn | Input | 1 | Active low asynchronous reset. |
Design Entry Method
| Instantiation | Yes |
| Inference | No |
| IP and IP Integrator Catalog | No |
Available Attributes
| Attribute | Type | Allowed Values | Default | Description |
|---|---|---|---|---|
| AXI_ADDR_WIDTH | DECIMAL | 1 to 64 | 32 | Defines the width of the ADDR ports, s_axi_araddr, s_axi_awaddr, m_axi_araddr and m_axi_awaddr |
| AXI_ARUSER_WIDTH | DECIMAL | 1 to 1024 | 1 | Defines the width of the ARUSER port, s_axi_aruser and m_axi_aruser |
| AXI_AWUSER_WIDTH | DECIMAL | 1 to 1024 | 1 | Defines the width of the AWUSER port, s_axi_awuser and m_axi_awuser |
| AXI_BUSER_WIDTH | DECIMAL | 1 to 1024 | 1 | Defines the width of the BUSER port, s_axi_buser and m_axi_buser |
| AXI_DATA_WIDTH | DECIMAL | 8 to 1024 | 32 | Defines the width of the DATA ports, s_axi_rdata, s_axi_wdata, m_axi_rdata and m_axi_wdata NOTE: The maximum FIFO size (width x depth) is limited to 150-Megabits. |
| AXI_ID_WIDTH | DECIMAL | 1 to 32 | 1 | Defines the width of the ID ports, s_axi_awid, s_axi_wid, s_axi_bid, s_axi_ar_id, s_axi_rid, m_axi_awid, m_axi_wid, m_axi_bid, m_axi_ar_id, and m_axi_rid |
| AXI_LEN_WIDTH | DECIMAL | 8 to 8 | 8 | Defines the width of the LEN ports, s_axi_arlen, s_axi_awlen, m_axi_arlen and m_axi_awlen |
| AXI_RUSER_WIDTH | DECIMAL | 1 to 1024 | 1 | Defines the width of the RUSER port, s_axi_ruser and m_axi_ruser |
| AXI_WUSER_WIDTH | DECIMAL | 1 to 1024 | 1 | Defines the width of the WUSER port, s_axi_wuser and m_axi_wuser |
| CASCADE_HEIGHT | DECIMAL | 0 to 64 | 0 |
0- No Cascade Height, Allow Vivado Synthesis to choose. 1 or more - Vivado Synthesis sets the specified value as Cascade Height. |
| CDC_SYNC_STAGES | DECIMAL | 2 to 8 | 2 |
Specifies the number of synchronization stages on the CDC path. Applicable only if CLOCKING_MODE = "independent_clock" |
| CLOCKING_MODE | STRING | "common_clock", "independent_clock" | "common_clock" | Designate whether AXI Memory Mapped FIFO is clocked with a common
clock or with independent clocks-
|
| ECC_MODE_RDCH | STRING | "no_ecc", "en_ecc" | "no_ecc" |
|
| ECC_MODE_WDCH | STRING | "no_ecc", "en_ecc" | "no_ecc" |
|
| EN_RESET_SYNCHRONIZER | DECIMAL | 0 to 1 | 1 |
0- Disable synchronizing stages in the reset path. 1- Enable synchronizing stages in the reset path. Based on CLOCKING_MODE number of synchronizing stages will differ |
| EN_SIM_ASSERT_ERR | STRING | String | "warning" |
|
| FIFO_DEPTH_RACH | DECIMAL | 16 to 4194304 | 2048 | Defines the AXI Memory Mapped FIFO Write Depth, must be power of two NOTE: The maximum FIFO size (width x depth) is limited to 150-Megabits. |
| FIFO_DEPTH_RDCH | DECIMAL | 16 to 4194304 | 2048 | Defines the AXI Memory Mapped FIFO Write Depth, must be power of two NOTE: The maximum FIFO size (width x depth) is limited to 150-Megabits. |
| FIFO_DEPTH_WACH | DECIMAL | 16 to 4194304 | 2048 | Defines the AXI Memory Mapped FIFO Write Depth, must be power of two NOTE: The maximum FIFO size (width x depth) is limited to 150-Megabits. |
| FIFO_DEPTH_WDCH | DECIMAL | 16 to 4194304 | 2048 | Defines the AXI Memory Mapped FIFO Write Depth, must be power of two NOTE: The maximum FIFO size (width x depth) is limited to 150-Megabits. |
| FIFO_DEPTH_WRCH | DECIMAL | 16 to 4194304 | 2048 | Defines the AXI Memory Mapped FIFO Write Depth, must be power of two NOTE: The maximum FIFO size (width x depth) is limited to 150-Megabits. |
| FIFO_MEMORY_TYPE_RACH | STRING | "auto", "block", "distributed", "ultra" | "auto" | Designate the fifo memory primitive (resource type) to use-
|
| FIFO_MEMORY_TYPE_RDCH | STRING | "auto", "block", "distributed", "ultra" | "auto" | Designate the fifo memory primitive (resource type) to use-
|
| FIFO_MEMORY_TYPE_WACH | STRING | "auto", "block", "distributed", "ultra" | "auto" | Designate the fifo memory primitive (resource type) to use-
|
| FIFO_MEMORY_TYPE_WDCH | STRING | "auto", "block", "distributed", "ultra" | "auto" | Designate the fifo memory primitive (resource type) to use-
|
| FIFO_MEMORY_TYPE_WRCH | STRING | "auto", "block", "distributed", "ultra" | "auto" | Designate the fifo memory primitive (resource type) to use-
|
| PACKET_FIFO | STRING | "false", "true" | "false" |
|
| PROG_EMPTY_THRESH_RDCH | DECIMAL | 5 to 4194301 | 10 |
Specifies the minimum number of read words in the FIFO at or below which prog_empty is asserted.
|
| PROG_EMPTY_THRESH_WDCH | DECIMAL | 5 to 4194301 | 10 |
Specifies the minimum number of read words in the FIFO at or below which prog_empty is asserted.
|
| PROG_FULL_THRESH_RDCH | DECIMAL | 5 to 4194301 | 10 |
Specifies the maximum number of write words in the FIFO at or above which prog_full is asserted.
|
| PROG_FULL_THRESH_WDCH | DECIMAL | 5 to 4194301 | 10 |
Specifies the maximum number of write words in the FIFO at or above which prog_full is asserted.
|
| RD_DATA_COUNT_WIDTH_RDCH | DECIMAL | 1 to 23 | 1 | Specifies the width of rd_data_count_rdch. To reflect the correct value, the width should be log2(FIFO_DEPTH)+1. |
| RD_DATA_COUNT_WIDTH_WDCH | DECIMAL | 1 to 23 | 1 | Specifies the width of rd_data_count_wdch. To reflect the correct value, the width should be log2(FIFO_DEPTH)+1. |
| SIM_ASSERT_CHK | DECIMAL | 0 to 1 | 0 |
0- Disable simulation message reporting. Messages related to potential misuse will not be reported. 1- Enable simulation message reporting. Messages related to potential misuse will be reported. |
| USE_ADV_FEATURES_RDCH | STRING | String | "1000" |
Enables rd_data_count_rdch, prog_empty_rdch, wr_data_count_rdch, prog_full_rdch sideband signals.
|
| USE_ADV_FEATURES_WDCH | STRING | String | "1000" |
Enables rd_data_count_wdch, prog_empty_wdch, wr_data_count_wdch, prog_full_wdch sideband signals.
|
| WR_DATA_COUNT_WIDTH_RDCH | DECIMAL | 1 to 23 | 1 | Specifies the width of wr_data_count_rdch. To reflect the correct value, the width should be log2(FIFO_DEPTH)+1. |
| WR_DATA_COUNT_WIDTH_WDCH | DECIMAL | 1 to 23 | 1 | Specifies the width of wr_data_count_wdch. To reflect the correct value, the width should be log2(FIFO_DEPTH)+1. |
System Verilog Instantiation Template
// xpm_fifo_axif_sv : In order to incorporate this function into the design,
// System Verilog : the following instance declaration needs to be placed
// instance : in the body of the design code. The instance name
// declaration : (xpm_fifo_axif_sv_inst) and/or the port declarations within the
// code : parenthesis may be changed to properly reference and
// : connect this function to the design. All inputs
// : and outputs must be connected.
// Please reference the appropriate libraries guide for additional information on the XPM modules.
// -------------- Begin Cut here for INTERFACE Include ------- // INCLUDE_TAG
`include "vivado_interfaces.svh"
// -- INCLUDE_TAG_END ------ End INTERFACE Include ------------
// -------------- Begin Cut here for INTERFACE Template ------- // INTF_TAG
// Default parameter used by the module are for S_AXI
vivado_aximm_v1_0 #(
.ID_WIDTH(1),
.ADDR_WIDTH(32),
.AWUSER_WIDTH(16),
.DATA_WIDTH(32),
.WUSER_WIDTH(4),
.BUSER_WIDTH(16),
.ARUSER_WIDTH(16),
.RUSER_WIDTH(4)
) S_AXI(), M_AXI();
// -- INTF_TAG_END -------------- End INTERFACE Template ------------------
// <-----Cut code below this line---->
// xpm_fifo_axif_sv: AXI Memory Mapped (AXI Full) FIFO
// Xilinx Parameterized Macro, version 2025.2
xpm_fifo_axif_sv #(
.AXI_ADDR_WIDTH(ADDR_WIDTH), // DECIMAL
.AXI_ARUSER_WIDTH(ARUSER_WIDTH), // DECIMAL
.AXI_AWUSER_WIDTH(AWUSER_WIDTH), // DECIMAL
.AXI_BUSER_WIDTH(BUSER_WIDTH), // DECIMAL
.AXI_DATA_WIDTH(DATA_WIDTH), // DECIMAL
.AXI_ID_WIDTH(ID_WIDTH), // DECIMAL
.AXI_RUSER_WIDTH(RUSER_WIDTH), // DECIMAL
.AXI_WUSER_WIDTH(WUSER_WIDTH), // DECIMAL
.CASCADE_HEIGHT(0), // DECIMAL
.CDC_SYNC_STAGES(2), // DECIMAL
.CLOCKING_MODE("common_clock"), // String
.ECC_MODE_RDCH("no_ecc"), // String
.ECC_MODE_WDCH("no_ecc"), // String
.EN_RESET_SYNCHRONIZER(1), // DECIMAL; 0=disable synchronizer in the reset path, 1=enable synchronizer in the reset path
.EN_SIM_ASSERT_ERR("warning"), // String
.FIFO_DEPTH_RACH(2048), // DECIMAL
.FIFO_DEPTH_RDCH(2048), // DECIMAL
.FIFO_DEPTH_WACH(2048), // DECIMAL
.FIFO_DEPTH_WDCH(2048), // DECIMAL
.FIFO_DEPTH_WRCH(2048), // DECIMAL
.FIFO_MEMORY_TYPE_RACH("auto"), // String
.FIFO_MEMORY_TYPE_RDCH("auto"), // String
.FIFO_MEMORY_TYPE_WACH("auto"), // String
.FIFO_MEMORY_TYPE_WDCH("auto"), // String
.FIFO_MEMORY_TYPE_WRCH("auto"), // String
.PACKET_FIFO("false"), // String
.PROG_EMPTY_THRESH_RDCH(10), // DECIMAL
.PROG_EMPTY_THRESH_WDCH(10), // DECIMAL
.PROG_FULL_THRESH_RDCH(10), // DECIMAL
.PROG_FULL_THRESH_WDCH(10), // DECIMAL
.RD_DATA_COUNT_WIDTH_RDCH(1), // DECIMAL
.RD_DATA_COUNT_WIDTH_WDCH(1), // DECIMAL
.SIM_ASSERT_CHK(0), // DECIMAL; 0=disable simulation messages, 1=enable simulation messages
.USE_ADV_FEATURES_RDCH("1000"), // String
.USE_ADV_FEATURES_WDCH("1000"), // String
.WR_DATA_COUNT_WIDTH_RDCH(1), // DECIMAL
.WR_DATA_COUNT_WIDTH_WDCH(1) // DECIMAL
)
xpm_fifo_axif_sv_inst (
.M_AXI(M_AXI.master),
.S_AXI(S_AXI.slave),
.dbiterr_rdch(dbiterr_rdch), // 1-bit output: Double Bit Error- Indicates that the ECC decoder detected a double-bit error and data
// in the FIFO core is corrupted.
.dbiterr_wdch(dbiterr_wdch), // 1-bit output: Double Bit Error- Indicates that the ECC decoder detected a double-bit error and data
// in the FIFO core is corrupted.
.prog_empty_rdch(prog_empty_rdch), // 1-bit output: Programmable Empty- This signal is asserted when the number of words in the Read Data
// Channel FIFO is less than or equal to the programmable empty threshold value. It is de-asserted
// when the number of words in the Read Data Channel FIFO exceeds the programmable empty threshold
// value.
.prog_empty_wdch(prog_empty_wdch), // 1-bit output: Programmable Empty- This signal is asserted when the number of words in the Write
// Data Channel FIFO is less than or equal to the programmable empty threshold value. It is
// de-asserted when the number of words in the Write Data Channel FIFO exceeds the programmable empty
// threshold value.
.prog_full_rdch(prog_full_rdch), // 1-bit output: Programmable Full: This signal is asserted when the number of words in the Read Data
// Channel FIFO is greater than or equal to the programmable full threshold value. It is de-asserted
// when the number of words in the Read Data Channel FIFO is less than the programmable full threshold
// value.
.prog_full_wdch(prog_full_wdch), // 1-bit output: Programmable Full: This signal is asserted when the number of words in the Write Data
// Channel FIFO is greater than or equal to the programmable full threshold value. It is de-asserted
// when the number of words in the Write Data Channel FIFO is less than the programmable full
// threshold value.
.rd_data_count_rdch(rd_data_count_rdch), // RD_DATA_COUNT_WIDTH_RDCH-bit output: Read Data Count- This bus indicates the number of words
// available for reading in the Read Data Channel FIFO.
.rd_data_count_wdch(rd_data_count_wdch), // RD_DATA_COUNT_WIDTH_WDCH-bit output: Read Data Count- This bus indicates the number of words
// available for reading in the Write Data Channel FIFO.
.sbiterr_rdch(sbiterr_rdch), // 1-bit output: Single Bit Error- Indicates that the ECC decoder detected and fixed a single-bit
// error.
.sbiterr_wdch(sbiterr_wdch), // 1-bit output: Single Bit Error- Indicates that the ECC decoder detected and fixed a single-bit
// error.
.wr_data_count_rdch(wr_data_count_rdch), // WR_DATA_COUNT_WIDTH_RDCH-bit output: Write Data Count: This bus indicates the number of words
// written into the Read Data Channel FIFO.
.wr_data_count_wdch(wr_data_count_wdch), // WR_DATA_COUNT_WIDTH_WDCH-bit output: Write Data Count: This bus indicates the number of words
// written into the Write Data Channel FIFO.
.injectdbiterr_rdch(injectdbiterr_rdch), // 1-bit input: Double Bit Error Injection- Injects a double bit error if the ECC feature is used.
.injectdbiterr_wdch(injectdbiterr_wdch), // 1-bit input: Double Bit Error Injection- Injects a double bit error if the ECC feature is used.
.injectsbiterr_rdch(injectsbiterr_rdch), // 1-bit input: Single Bit Error Injection- Injects a single bit error if the ECC feature is used.
.injectsbiterr_wdch(injectsbiterr_wdch), // 1-bit input: Single Bit Error Injection- Injects a single bit error if the ECC feature is used.
.m_aclk(clk), // 1-bit input: Master Interface Clock: All signals on master interface are sampled on the rising edge
// of this clock.
.s_aclk(clk), // 1-bit input: Slave Interface Clock: All signals on slave interface are sampled on the rising edge
// of this clock.
.s_aresetn(reset_n) // 1-bit input: Active low asynchronous reset.
);
// End of xpm_fifo_axif_sv_inst instantiation