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

ID 817467
Date 11/18/2024
Public
Document Table of Contents

13.2.3. Example 3: Sending Recalibration Request and Reading Calibration Status Using the Mailbox

This example provides instructions for sending recalibration request and reading the calibration status using the mailbox.

The values in this example are for illustrative purposes and are obtained from an EMIF example design using DDR5 2CHx40 RDIMM, implemented on the Agilex™ 7 FPGA Development Kit –HBM2e Edition.

In a 2CHx40 DDR5 RDIMM design, CH1 and CH2 use the Primary MC in Primary IO96B and Secondary IO96B, respectively; hence the CMD_TARGET_IP_TYPE is 0x1 for CH1 , and 0x3 for CH2. The CMD_TARGET_IP_INSTANCE defaults to 0 in the example design generated by the Quartus® Prime software.

The table below illustrates the construction of the data to be written to the CMD_REQ register for this request:

Channel CMD_REQ [31:29]: CMD_TARGET_IP_TYPE CMD_REQ [28:24]: CMD_TARGET_IP_INSTANCE_ID CMD_REQ [23:16]: CMD_TYPE CMD_REQ [15:0]: CMD_OPCODE CMD_REQ [31:0]:
CH1 0x1 0x0 0x05 0xa 0x2005_000a
CH2 0x3 0x0 0x05 0xa 0x6005_000a

Recalibrate CH1 using the JAMB/AXI-Lite interface for CH1

  1. It is not required to write to the CMD_PARAM_* register as this OPCODE does not require any cmd_param.
  2. Write to the CMD_REQ(address=0x500_043c) with write_data=0x2005_000a .
  3. Read from CMD_RESPONSE_STATUS(address=0x500_045c) until you get the STATUS_COMMAND_RESPONSE_READY (Bit 0 of CMD_RESPONSE_STATUS register) equals 1.
  4. Clear the STATUS_COMMAND_RESPONSE_READY (Bit 0 of CMD_RESPONSE_STATUS register) Perform a Read-Modify-Write operation:
    1. Read from CMD_RESPONSE_STATUS register.
    2. Write_Data = Data in (a) & 0xffff_fffe (Change only bit 0).
    3. Write to address = 0x500_045c data= write_data from (b).

Recalibrate CH2 using the JAMB/AXI-Lite interface for CH2

Repeat the same steps as listed above. For Step 2, the write_data=0x6005_000a, because the CMD_TARGET_IP_TYPE for CH2 is 0x3 in this design.

Read the CH1 Calibration Status using the JAMB/AXI-Lite interface for CH1

  1. Read from CMD_RESPONSE_STATUS(address=0x500_045c) till you get either bit_1/bit_0 is asserted. If bit_2 is asserted for more than 20 sec, break from the loop and proceed to step 2.

    bit_2 =1 means one or more EMIF instances are busy with calibration.

    bit_1= 1 means one or more EMIF instances have failed to calibrate successfully.

    bit_0 =1 means all EMIF instances within the IO96B have calibrated successfully.

  2. Clear the STATUS_COMMAND_RESPONSE_READY (Bit 0 of CMD_RESPONSE_STATUS register).

Read the CH2 Calibration Status using the JAMB/AXI-Lite interface for CH2

Repeat the same steps as for CH1, above.