External Memory Interfaces Agilex™ 7 M-Series FPGA IP User Guide

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

12.1.1. Mailbox Supported Commands

Read-Only Registers

The following read-only registers provide direct access to retrieve information. Note that these registers are not write-protected; you should not attempt to write to any of these registers. Additionally, you should avoid reading from registers that are not used in the target design, as doing so might result in unpredictable or invalid data being returned.

Table 240.  Read-Only Registers
Register Name Byte Offset (Hexadecimal) Description
MAILBOX_HEADER 0x000

[Output] Mailbox Header

This register specifies information about the mailbox protocol.

[Fields]

[2:0] MB_SPEC_VER: This field specifies the version of mailbox specification being used by the IOSSM firmware.

Current version number is 1.
MEM_INTF_INFO_0 0x200

[Output] Memory Interface Information

This register specifies the memory interface IP type and instance ID for the interface 0/1 in the IO96B. It will only return the primary interface of each channel.

[Fields]

[31:29] IP_TYPE: Indicates the type of IP:

  • 0x0 – Not used.
  • 0x1 – Primary MC of Primary IO96B.
  • 0x2 – Secondary MC of Primary IO96B.
  • 0x3 – Primary MC of Secondary IO96B.
  • 0x4 – Secondary MC of Secondary IO96B.
[28:24] INSTANCE_ID: IP identifier.
MEM_INTF_INFO_1 0x280
MEM_TECHNOLOGY_INTF0 0x210

[Output] Memory Technology

This register provides the memory technology type for the memory interface 0/1.

[Fields]

[2:0] TECH: Reports the memory technology type:
  • 0x0 = DDR4
  • 0x1 = DDR5
  • 0x2 = DDR5_RDIMM
  • 0x3 = LPDDR4
  • 0x4 = LPDDR5
MEM_TECHNOLOGY_INTF1 0x290
MEMCLK_FREQ_INTF0 0x220

[Output] Memory Clock Frequency - This register reports the memory clock frequency in kilohertz (KHz) for the memory interface 0/1. For protocols with multiple FSPs, it reports the current memory clock frequency in kilohertz (KHz).

[Fields]

[31:0] FREQ_KHZ_FSP_CUR: Current memory clock frequency in KHz.
MEMCLK_FREQ_INTF1 0x2A0
MEMCLK_FREQ_FSP0_INTF0 0x224

[Output] Memory Clock Frequency - Frequency Set Point 0

This register reports the memory clock frequency in kilohertz (KHz) for Frequency Set Point 0 of the memory interface 0/1. Only valid for LPDDR5 protocol.

[Fields]

[31:0] FREQ_KHZ_FSP0: Memory clock frequency in KHz for Frequency Set Point 0.
MEMCLK_FREQ_FSP0_INTF1 0x2A4
MEMCLK_FREQ_FSP1_INTF0 0x228

[Output] Memory Clock Frequency - Frequency Set Point 1

This register reports the memory clock frequency in kilohertz (KHz) for Frequency Set Point 1 of the memory interface 0/1. Only valid for LPDDR5 protocol.

[Fields]

[31:0] FREQ_KHZ_FSP1: Memory clock frequency in KHz for Frequency Set Point 1.
MEMCLK_FREQ_FSP1_INTF1 0x2A8
MEMCLK_FREQ_FSP2_INTF0 0X22C

MEMCLK_FREQ_INTF0_FSP2

[Output] Memory Clock Frequency - Frequency Set Point 2

This register reports the memory clock frequency in kilohertz (KHz) for Frequency Set Point 2 of the memory interface 0/1. Only valid for LPDDR5 protocol.

[Fields]

[31:0] FREQ_KHZ_FSP2: Memory clock frequency in KHz for Frequency Set Point 2.
MEMCLK_FREQ_FSP2_INTF1 0x2AC
MEM_WIDTH_INFO_INTF0 0x230

[Output] Memory Width Information

This register provides the memory width information for the memory interface 0/1.

[Fields]

[23:16] C_WIDTH: Channel width.

[15:8] CS_WIDTH: Chip select width.

[7:0] DQ_WIDTH: Data width

MEM_WIDTH_INFO_INTF1 0x2B0
MEM_TOTAL_CAPACITY_INTF0 0x234

Output] Total Memory Capacity

This register reports the total memory capacity per channel in gigabits (Gb) for the memory interface 0/1.

[Fields]

[7:0] CAPACITY_GBITS: Total memory device capacity per channel in Gb. Total memory capacity is calculated as:

CAPACITY = (DQ_WIDTH / DEVICE_WIDTH) * NUM_RANKS * C_WIDTH * DEVICE_DENSITY
MEM_TOTAL_CAPACITY_INTF1 0x2B4
ECC_ENABLE_INTF0 0x240

[Output] ECC Enable Status

This register provides detailed information regarding the ECC enable status and type for the memory interface 0/1.

[Fields]

[18:18] RD_LINK_ECC_ENABLED: Indicates the Read Link-ECC enable status.

  • 1'b1 – Read Link-ECC is enabled.
  • 1'b0 – Read Link-ECC is disabled.

[17:17] WR_LINK_ECC_ENABLED: Indicates the Write Link-ECC enable status.

  • 1'b1 – Write Link-ECC is enabled.
  • 1'b0 – Write Link-ECC is disabled.

[16:16] LINK_ECC_SUPPORTED: Indicates if Link-ECC is supported by the interface.

  • 1'b1 – Link-ECC is supported.
  • 1'b0 – Link-ECC is not supported.

[8:8] ECC_TYPE: Specifies the ECC operational mode.

  • 1'b0 – Out-of-Band ECC.
  • 1'b1 – In-line ECC.
[1:0] ECC_ENABLE_TYPE: Reports the current ECC error reporting and correcting status.
  • 1'b00 – ECC is disabled. Data will be written and returned without ECC verification.
  • 1'b01 – ECC is enabled without error detection or correction.
  • 1'b10 – ECC is enabled with error detection; errors are reported but not corrected.
  • 1'b11 – ECC is enabled with error detection and correction; single-bit errors are automatically corrected.
ECC_ENABLE_INTF1 0x2C0
ECC_SCRUB_STATUS_INTF0 0x244

[Output] ECC Scrub Status

This register indicates the ECC scrub operation status for the memory interface 0/1.

[Fields]

[1:1] ECC_SCRUB_IN_PROGRESS: Reports whether an ECC scrub operation is currently in progress.
  • 1'b0 – Not actively performing a scrubbing operation.
  • 1'b1 – The Controller is in the process of performing a scrubbing operation.
[0:0] ECC_SCRUB_STATUS: The ECC scrub operation initiated using ECC_SCRUB_MODE_0/1_START mailbox command has completed.
  • 1'b0 – Scrubbing operation has not completed.
  • 1'b1 – Scrubbing operation has completed.
ECC_SCRUB_STATUS_INTF1 0x2C4
LP_MODE_INTF0 0x250

[Output] Low Power Mode Status

This register provides the current low power state and its validity for the memory interface 0/1.

[Fields]

[5:0] LP_STATE: Current Interface Low Power State.
  • 1'b000000 – Idle.
  • 1'b000001 – Active Power Down.
  • 1'b000010 – Active Power Down with Memory Clock Gating.
  • 1'b000011 – Pre-Charge Power Down.
  • 1'b000100 – Pre-Charge Power Down with Memory Clock Gating.
  • 1'b000101 – Self-Refresh Short.
  • 1'b000110 – Self-Refresh Short with Memory Clock Gating.
  • 1'b001000 – Self-Refresh Long.
  • 1'b001001 – Self-Refresh Long with Memory Clock Gating.
  • 1'b001010 – Self-Refresh Long with Memory Clock and Controller Clock Gating.
  • 1'b001011 – Self-Refresh Power Down Short.
  • 1'b001100 – Self-Refresh Power Down Short with Memory Clock Gating.
  • 1'b001101 – Self-Refresh Power Down.
  • 1'b001110 – Self-Refresh Power Down Long with Memory Clock Gating.
  • 1'b001111 – Self-Refresh Power Down Long with Memory and Controller Clock Gating.
[6:6] LP_STATE_VALID: Indicates whether the data for the low power state is valid.
  • 1'b1 – Valid. The low power state information is reliable.
  • 1'b0 – Invalid. The interface is currently transitioning into or out of a low power state.
LP_MODE_INTF1 0x2D0
MEM_INIT_STATUS_INTF0 0x260

[Output] BIST Memory Initialization Status

This register holds the status of the BIST memory initialization operation for the memory interface specified by the instance ID. The value of this register is only valid if the mailbox command BIST_MEM_INIT_START was issued previously.

[Fields]

[0:0] MEM_INIT_STATUS: Indicates the status of the BIST memory content initialization operation.
  • 1'b0 – Memory content initialization operation still in progress if previously initiated.
  • 1'b1 – Memory content initialization operation has been completed.
MEM_INIT_STATUS_INTF1 0x2E0
BIST_STATUS_INTF0 0x264

[Output] BIST Results Status

This register contains BIST results for the previously initiated BIST operation for memory interface 0/1

[Fields]

[31:16] BIST_FAIL_RESULT_OFFSET: Holds the offset pointer of the BIST failure results. The data at the pointer location will be as below:
  • OFFSET [0] to OFFSET [8]: [287:0] BIST_EXP_DATA - Holds the expected read data for BIST data check failure.
  • OFFSET [9] to OFFSET [10]: [37:0] BIST_FAIL_ADDR - Holds the actual failing address for BIST data check failure.
  • OFFSET [11] to OFFSET [20]: [287:0] BIST_FAIL_DATA - Holds the actual failing data for BIST data check failure. [15:8] BIST_FAIL_RESULT_SIZE: Holds the size of the BIST failure results. The value of this will be 640 bits.
[1:1] BIST_RESULT: Holds the result of the BIST operation. For this BIST mode, the test will end at the first failure, or completely check the specified data range if no failures were found. This value is valid when BIST_STATUS indicates that the BIST operation has completed.
  • 1'b0 = Data check failed.
  • 1'b1 = Data check passed.
[0:0] BIST_STATUS: Indicates the status of the BIST operation.
  • 1'b0 – BIST operation still in progress if previously initiated.
  • 1'b1 – BIST operation has been completed.
BIST_STATUS_INTF1 0x2E4
ECC_ERR_STATUS 0x300

[Output] ECC Error Status

This register contains the status of the ECC error buffer.

[Fields]

[31:16] ECC_ERR_OVERFLOW: This field indicates that buffer overflow has occurred due to a new ECC interrupt occurring after the ECC error buffer is at full capacity of 16 entries. Each new interrupt type that cannot be enqueued into the buffer are logically-OR’d to the existing contents of the overflow status field. The ECC interrupt types indicated by the different positional bits in the overflow field are as below:
  • [0] – Single-bit error.
  • [1] – Multiple single-bit errors.
  • [2] – Double-bit error.
  • [3] – Multiple double-bit errors.
  • [8] – Single-bit error during ECC scrubbing.
  • [9] – Write link ECC single-bit error (LPDDR5 only).
  • [10] – Write link ECC double-bit error (LPDDR5 only).
  • [11] – Read link ECC single-bit error (LPDDR5 only).
  • [12] – Read link ECC double-bit error (LPDDR5 only).
  • [13] – RMW read link ECC double-bit error (LPDDR5 only).

[15:0] ECC_ERR_COUNTER: This field indicates the number of entries in ECC error buffer. The buffer has a maximum capacity of 16 entries after which overflow occurs. The mailbox command ECC_CLEAR_ERR_BUFFER clears the ECC error buffer and resets the ECC_ERR_COUNTER to 0.

ECC_ERR_DATA_START 0x310

[Output] ECC Error Data Start

This register is the start of the ECC error data buffer. The buffer has a maximum capacity of 16 ECC errors. Each ECC error data entry has a size of 64 bits arranged in two 32-bit registers (Register 1 and Register 2 ). The mailbox command ECC_CLEAR_ERR_BUFFER clears the ECC error buffer and resets the ECC_ERR_COUNTER to 0.

[Fields]

R1[24:22] IP_TYPE: This field specifies the IP type of the interface that produced the ECC interrupt. IP_TYPE of 0 indicates that the buffer entry is not populated with valid data.

R1[21:17] INSTANCE_ID: This field specifies the instance ID of the interface that produced the ECC interrupt.

R1[16:10] ECC_ERR_SOURCE_ID: This field specifies the source ID associated with the ECC event. For AXI ports, the source ID is comprised of the Port ID (upper bit/s) and the Requestor ID, where the Requestor ID is the axi0_AWID for write commands or the axi0_ARID for read commands.

R1[9:6] ECC_ERR_TYPE: This field specifies the ECC interrupt type of the ECC event.
  • 1'b0000 – Single-bit error.
  • 1'b0001 – Multiple single-bit errors.
  • 1'b0010 – Double-bit error.
  • 1'b0011 – Multiple double-bit errors.
  • 1'b1000 – Single-bit error during ECC scrubbing.
  • 1'b1001 – Write link ECC single-bit error (LPDDR5 only).
  • 1'b1010 – Write link ECC double-bit error (LPDDR5 only).
  • 1'b1011 – Read link ECC single-bit error (LPDDR5 only)
  • 1'b1100 – Read link ECC double-bit error (LPDDR5 only).
  • 1'b1101 – Read link ECC double-bit error, caused by read-modify-write operation (LPDDR5 only).

R1[5:0] ECC_ERR_ADDR_UPPER: This field specifies the upper 6 bits of the address of the read data that caused the ECC event. The Controller will pad this parameter with zeros for any address bits not used by the controller.

R2[31:0] ECC_ERR_ADDR_LOWER: This field specifies the lower 32 bits of the address of the read data that caused the ECC event. The Controller will pad this parameter with zeros for any address bits not used by the controller.

Note: Refer to ECC Error Handling for information on ECC Error Buffer Byte Offset.
STATUS 0x400

[Output] Status Register

“At a Glance” status register. This field is automatically updated by the Calibration IOSSM and no explicit operation is required to trigger an update.

  • 1'b001 – Calibration was successful.
  • 1'b010 – Calibration failed.
  • 1'b100 – Calibration ongoing.
  • 1'b000 – Interface unused.
STATUS_CAL_INTF0 0x404

[Output] Memory Calibration Status

This register provides the calibration status for memory interface 0/1.

[Fields]

[2:0] STATUS: Calibration Status of memory interface
  • 1'b001 – Calibration was successful.
  • 1'b010 – Calibration failed.
  • 1'b100 – Calibration ongoing.
  • 1'b000 – Interface unused.
STATUS_CAL_INTF1 0x408

Mailbox Supported Commands

The following registers require handshaking procedures with the mailbox for successful retrieval of information. Refer to the instructions described in Sending a Mailbox Command for more information on handshaking procedures.

Table 241.  Supported Commands
CMD_TYPE Enum CMD_OPCODE Enum Value
CMD_TRIG_CONTROLLER_OP (value=0x4) ECC_ENABLE_SET 0x0101
ECC_INTERRUPT_MASK 0x0105
ECC_WRITEBACK_ENABLE 0x0106
ECC_INJECT_ERROR 0x0109
ECC_CLEAR_ERR_BUFFER 0x0110
ECC_SCRUB_MODE_0_START 0x0202
ECC_SCRUB_MODE_1_START 0x0203
BIST_STANDARD_MODE_START 0x0301
BIST_MEM_INIT_START 0x0303
BIST_SET_DATA_PATTERN_UPPER 0x0305
BIST_SET_DATA_PATTERN_LOWER 0x0306
CHANGE_FSP_LP5 0x0c01
LP_MODE_ENTER 0x0d01
LP_MODE_EXIT 0x0d02
LP_MODE_AUTO 0x0d04

CMD_TRIG_MEM_CAL_OP ​ (value=0x5)

TRIG_MEM_CAL 0x000a