Knowledge Base Article

Why do I see RRESP=2 if ECC is enabled in External Memory Interfaces (EMIF) IP?

Description

When ECC is enabled in External Memory Interfaces (EMIF) IP of Agilex® 7 FPGA M-Series, Agilex® 5 FPGA, and Agilex® 3 FPGA devices, you might receive RRESP=2 during data readback if any of the following conditions is true.

DDR4 Component:

Data size of the first write command to the associated AXI4 address ≠ 256 bits * N

DDR5 Component/DDR5 DIMM/LPDDR4/LPDDR5:

Data size of the first write command to the associated AXI4 address ≠ (Channel DQ width * 16) * N

where N is a positive integer (1, 2, 3, ...).

The hard memory controller uses fixed DQ burst length. The above conditions generate partial access to the memory. The uninitialized portion of data in the memory will cause uncorrectable ECC error, leading to RRESP=2.

Below are some example scenarios that showcase this RRESP problem.

Example #1:

When using a x16+ECC DDR4 Component interface in fabric accessing mode, the first write command to an AXI4 address is a partial access with the use of WSTRB.

WDATA width = 256 bits, AWLEN = 0, WSTRB = 0x0000FFFF:

  • Data size of the first write command to the associated AXI4 address = 128 bits

 

Example #2:

When using a 1chx32 LPDDR5 interface with in-line ECC enabled in fabric accessing mode, the first write command to an AXI4 address has only one WDATA beat.

WDATA width = 256 bits, AWLEN = 0:

  • Data size of the first write command to the associated AXI4 address = 256 bits
  • Channel DQ width * 16 = 512 bits

 

Example #3:

When using a x32+ECC DDR5 RDIMM interface in 256-bit NoC accessing mode, the first write command to an AXI4 address uses an even number AWLEN value.

WDATA width = 256 bits, AWLEN = 2:

  • Data size of the first write command to the associated AXI4 address = 768 bits
  • Channel DQ width * 16 = 512 bits
 
Resolution

To work around this problem, ensure the data size of the first write command to the associated AXI4 address equals to either 256 bits * N or (Channel DQ width * 16) * N, depending on the memory protocol.

An alternative method is available starting with Quartus® Prime Pro Edition Software version 26.1.1.

When IP parameter Initialize Memory in the Advanced Calibration Settings section is enabled, on calibration passing, and before handing off control of the memory to user logic, the memory will be initialized with all zeros in the data section and the corresponding ECC codes in the ECC section.

With this approach, there is no special requirement on the data size of the first write command to the associated AXI4 address.

Note: To avoid leading to long simulation time, only the first 256 bytes of memory will be initialized in simulation when Initialize Memory is enabled.

 
Additional Information

DDR4 DIMM interface and LPDDR5 interface using link ECC are not affected by this RRESP problem.

Updated 2 months ago
Version 2.0
No CommentsBe the first to comment