External Memory Interfaces (EMIF) IP User Guide: Agilex™ 5 FPGAs and SoCs

ID 817467
Date 3/31/2025
Public
Document Table of Contents

13.1.4. ECC Error Handling

The user RAM includes an integrated ECC error buffer, that improves ECC error management capabilities with the mailbox. The ECC error buffer is administered by the IOSSM, which routinely inspects the memory controller's interrupt status to detect ECC events.

Upon identifying an ECC event, the IOSSM captures and stores relevant details from the event, including the following:

  • The type of ECC error that triggered the event.
  • The memory address involved in the error.
  • The Source ID linked to the error-causing transaction.
Table 243.  ECC Error Buffer Byte Offset
Register Name Byte Offset (Hexadecimal) Description
ECC Error Status 0x0300 ECC_ERROR_COUNTER, ECC_ERR_OVERFLOW
ECC Error Buffer Entry 0 –(ECC_ERR_DATA_START) 0x0310 ENTRY 0 R1: IP_TYPE, INSTANCE_ID, ECC_ERR_SOURCE_ID, ECC_ERR_TYPE, ECC_ERR_ADDR_UPPER
0x0314 ENTRY 0 R2: ECC_ERR_ADDR_LOWER
ECC Error Buffer Entry 1 0x0318 ENTRY 1 R1: IP_TYPE, INSTANCE_ID, ECC_ERR_SOURCE_ID, ECC_ERR_TYPE, ECC_ERR_ADDR_UPPER
0x031C ENTRY 1 R2: ECC_ERR_ADDR_LOWER
ECC Error Buffer Entry 2 0x0320 ENTRY 2 R1: IP_TYPE, INSTANCE_ID, ECC_ERR_SOURCE_ID, ECC_ERR_TYPE, ECC_ERR_ADDR_UPPER
0x0324 ENTRY 2 R2: ECC_ERR_ADDR_LOWER
ECC Error Buffer Entry 3 0x0328 ENTRY 3 R1: IP_TYPE, INSTANCE_ID, ECC_ERR_SOURCE_ID, ECC_ERR_TYPE, ECC_ERR_ADDR_UPPER
0x032C ENTRY 3 R1: ECC_ERR_ADDR_LOWER
ECC Error Buffer Entry 4 0x0330 ENTRY 4 R1: IP_TYPE, INSTANCE_ID, ECC_ERR_SOURCE_ID, ECC_ERR_TYPE, ECC_ERR_ADDR_UPPER
0x0334 ENTRY 4 R2: ECC_ERR_ADDR_LOWER
ECC Error Buffer Entry 5 0x0338 ENTRY 5 R1: IP_TYPE, INSTANCE_ID, ECC_ERR_SOURCE_ID, ECC_ERR_TYPE, ECC_ERR_ADDR_UPPER
0x033C ENTRY 5 R2: ECC_ERR_ADDR_LOWER
ECC Error Buffer Entry 6 0x0340 ENTRY 6 R1: IP_TYPE, INSTANCE_ID, ECC_ERR_SOURCE_ID, ECC_ERR_TYPE, ECC_ERR_ADDR_UPPER
0x0344 ENTRY 6 R2: ECC_ERR_ADDR_LOWER
ECC Error Buffer Entry 7 0x0348 ENTRY 7 R1: IP_TYPE, INSTANCE_ID, ECC_ERR_SOURCE_ID, ECC_ERR_TYPE, ECC_ERR_ADDR_UPPER
0x034C ENTRY 7 R2: ECC_ERR_ADDR_LOWER
ECC Error Buffer Entry 8 0x0350 ENTRY 8 R1: IP_TYPE, INSTANCE_ID, ECC_ERR_SOURCE_ID, ECC_ERR_TYPE, ECC_ERR_ADDR_UPPER
0x0354 ENTRY 8 R2: ECC_ERR_ADDR_LOWER
ECC Error Buffer Entry 9 0x0358 ENTRY 9 R1: IP_TYPE, INSTANCE_ID, ECC_ERR_SOURCE_ID, ECC_ERR_TYPE, ECC_ERR_ADDR_UPPER
0x035C ENTRY 9 R2: ECC_ERR_ADDR_LOWER
ECC Error Buffer Entry 10 0x0360 ENTRY 10 R1: IP_TYPE, INSTANCE_ID, ECC_ERR_SOURCE_ID, ECC_ERR_TYPE, ECC_ERR_ADDR_UPPER
0x0364 ENTRY 10 R2: ECC_ERR_ADDR_LOWER
ECC Error Buffer Entry 11 0x0368 ENTRY 11 R1: IP_TYPE, INSTANCE_ID, ECC_ERR_SOURCE_ID, ECC_ERR_TYPE, ECC_ERR_ADDR_UPPER
0x036C ENTRY 11 R2: ECC_ERR_ADDR_LOWER
ECC Error Buffer Entry 12 0x0370 ENTRY 12 R1: IP_TYPE, INSTANCE_ID, ECC_ERR_SOURCE_ID, ECC_ERR_TYPE, ECC_ERR_ADDR_UPPER
0x0374 ENTRY 12 R2: ECC_ERR_ADDR_LOWER
ECC Error Buffer Entry 13 0x0378 ENTRY 13 R1: IP_TYPE, INSTANCE_ID, ECC_ERR_SOURCE_ID, ECC_ERR_TYPE, ECC_ERR_ADDR_UPPER
0x037C ENTRY 13 R2: ECC_ERR_ADDR_LOWER
ECC Error Buffer Entry 14 0x0380 ENTRY 14 R1: IP_TYPE, INSTANCE_ID, ECC_ERR_SOURCE_ID, ECC_ERR_TYPE, ECC_ERR_ADDR_UPPER
0x0384 ENTRY 14 R2: ECC_ERR_ADDR_LOWER
ECC Error Buffer Entry 15 0x0388 ENTRY 15 R1: IP_TYPE, INSTANCE_ID, ECC_ERR_SOURCE_ID, ECC_ERR_TYPE, ECC_ERR_ADDR_UPPER
0x038C ENTRY 15 R2: ECC_ERR_ADDR_LOWER

When the IOSSM firmware identifies an ECC event and the buffer has not yet reached its maximum capacity (as indicated by the ECC_ERR_COUNTER not exceeding the maximum capacity of 16 entries), it then populates the next buffer entry with pertinent information in the format outlined in the table below.

Table 244.  ECC Error Buffer Structure
32-Bit Register Bit Range Register Field Description
Register 1 (R1) 5:0 ECC_ERR_ADDR_UPPER Upper 6 bits of the ECC Error Address
9:6 ECC_ERR_TYPE Type of ECC Error
16:10 ECC_ERR_SOURCE_ID Source Transaction AXI ID
21:17 INSTANCE_ID EMIF Instance ID
22:24 IP_TYPE EMIF IP Type
31:25 Reserved
Register 2 (R2) 31:0 ECC_ERR_ADDR_LOWER Lower 32 bits of the ECC Error Address

ECC Error Buffer Overflow Handling

The ECC error buffer is considered full when the ECC_ERR_COUNTER reaches the buffer's maximum capacity of 16 entries. If the buffer becomes full, the IOSSM does not write new data to the ECC error buffer for any subsequent interrupts. Instead, the ECC_ERR_OVERFLOW bits corresponding to each new interrupt type that cannot be buffered are logically OR'ed with the existing overflow status field's contents.

Table 245.  ECC Error Types and Overflow
ECC Error Type ECC_ERR_TYPE ECC_ERR_OVERFLOW
Single-bit error ‘b0000 ‘b0000_0000_0000_0001
Multiple single-bit errors ‘b0001 ‘b0000_0000_0000_0010
Double-bit error ‘b0010 ‘b0000_0000_0000_0100
Multiple double-bit errors ‘b0011 ‘b0000_0000_0000_1000
Single-bit error during ECC scrubbing ‘b1000 ‘b0000_0000_1000_0000
Write link ECC single-bit error (LPDDR5 only) ‘b1001 ‘b0000_0001_0000_0000
Write link ECC double-bit error (LPDDR5 only) ‘b1010 ‘b0000_0010_0000_0000
Read link ECC single-bit error (LPDDR5 only) ‘b1011 ‘b0000_0100_0000_0000
Read link ECC double-bit error (LPDDR5 only) ‘b1100 ‘b0000_1000_0000_0000
Read link ECC double-bit error, caused by read-modify-write operation (LPDDR5 only) ‘b1101 ‘b0001_0000_0000_0000

Clearing ECC Error Buffer

To clear the ECC error buffer and reset the ECC_ERR_COUNTER and the ECC_ERR_OVERFLOW to zero, you should issue the ECC_CLEAR_ERR_BUFFER mailbox command. This command ensures that the buffer is empty and allows for new entries.