Visible to Intel only — GUID: dvr1724981386041
Ixiasoft
Visible to Intel only — GUID: dvr1724981386041
Ixiasoft
4.11.1. Data Retention Mechanism Flow
The following diagram shows the data retention flow process.
The following steps explain the flow in the diagram above:
- After the initial power-on, early in the SDRAM initialization, the FSBL sets the boot_scratch_por0[0] bit at HPS address 0x10D12258 to indicate the initialization has started but is not yet complete.
boot_scratch_por0[0] Description (HPS Address 0x10D12258) 0 DDR Memory was initialized successfully. 1 DDR Memory initialization did not complete. - The FSBL executes the SDRAM initialization stages, which include configuring IO96B and MPFE, performing DDR calibration, initializing the IOSSM mailbox, and obtaining SDRAM parameters. These stages can either succeed or fail. If a failure occurs, the boot_scratch_por0[0] remains set.
- The FSBL determines if a full initialization is needed by evaluating the following conditions:
Condition How read? Notes ECC enabled in SDRAM.
ecc_status
Read from memory controller using the IOSSM mailbox. Enabled from hardware Quartus project. Reset type.
reset_type
Read from boot_scratch_cold3[31:29] Set by SDM during HPS bring up.
POR_RESET = 0
WARM_RESET =1
COLD_RESET = 2
NCONFIG = 3
JTAG_CONFIG = 4
RSU_RECONFIG =5
Double bit error (DBE) in SDRAM
DDR_ECC_DBE
Read from boot_scratch_cold3[1] Set by SDM during SDRAM bring up.
1: DBE found in SDRAM
0: No DBE found in SDRAM
Double Bit Error (DBE) in OCRAM.
OCRAM_DBE
Read from boot_scratch_cold3[0] Set by SDM during OCRAM bring up
1: DBE found in OCRAM
0: No DBE found in OCRAM
Previous SDRAM initialization failed.
ddr_init_n
Read from boot_scratch_por0[0] Set and clear by FSBL at the start and end of SDRAM initialization. Backed up by SDM during a WARM or COLD reset.
See previous table for bit value description. You can also manually set this bit to request a full DDR initialization (if the other conditions are also valid for this purpose).
To perform the full SDRAM initialization, you must enable ECC in SDRAM (ecc_status = 1) along with any of the following scenarios:
- Previous initialization did not complete successfully (ddr_init_n = 1).
- DBE Errors in OCRAM were found (OCRAM_DBE = 1).
- DBE Errors in SDRAM were found (DDR_ECC_DBE = 1).
- The reset type is different from WARM and COLD reset (reset_type ≠ 1 and reset_type ≠ 2).
Based on these criteria, after a POR, a full initialization is expected if ECC is enabled in SDRAM. During a full initialization, BIST runs over the SDRAM, resulting in the loss of any existing data.
- Following the flow in the diagram, after SDRAM initialization completes, the HPS can begin using the SDRAM to read and write data.
- Based on overall system requirements, you can flush the caches before a warm or cold reset occurs, when possible.
- Based on overall system requirements, you can set the boot_scratch_por[0] bit to force a full SDRAM initialization (if ECC is enabled in SDRAM) during the next warm or cold reset.
- The warm or cold reset is requested.
- The reset is processed by the SDM firmware analyzing the type of reset requested and the state of previous initialization. The following table describes what the SDM does during this stage.
Table 16. SDM Reset Types and States Condition HPS is reset? HNOC & IO96B are reset? FPGA fabric is wiped? SDRAM preserved? Notes jtag config or nConfig Yes Yes Yes No Reset is reported as JTAG_CONFIG or NCONFIG. HPS Cold reset Yes No No Yes 1 Reset state is reported as Cold. HPS Warm reset Yes No No Yes1 Reset state is reported as Warm. HPS Cold reset to recover from DDR initialization failure (ddr_init_n = 1) Yes Yes Yes No1 POR reset is asserted affecting HNOC and IO96B. Reset state is reported as Cold. Full memory initialization is performed. HPS Warm reset to recover from DDR initialization failure (ddr_init_n = 1) Yes yes Yes No1 This is converted into a cold reset (see HPS Cold reset to recover from DDR initialization failure) in previous row). Full memory initialization is performed. HPS Reconfig FPGA (HPS Boot First) No No Yes Yes No reset is observed. HPS Reconfig FPGA (FPGA Boot first) Unsupported HPS Cold/Warm reset to recover from DDR DBE with ECC enable. Yes No No No1 Reset state is reported as Cold or Warm reset depending on which was requested. DDR memory need to be recalibrated and full memory initialization performed. HPS Cold/Warm reset to recover from OCRAM DBE with ECC enable. Yes No No No1 Reset state is reported as Cold or Warm reset depending on which was requested. Full memory initialization is performed. In all the reset scenarios listed in the table, the SDM also backs up and restores the boot_scratch_por0[0] register which includes the SDRAM initialization status before the reset, and updates boot_scratch_cold3[31:29] with the identified reset type. Additionally, for scenarios 8 and 9, the SDM updates the DBE status of SDRAM and OCRAM during their initialization before releasing the HPS from reset.
- After an HPS reboot, during SDRAM initialization, the FSBL reads the boot_scratch_por[0] bit and keeps it internally for later analysis.
- The FSBL then executes the main SDRAM initialization stages.
- If the main SDRAM initialization stages succeed, the FSBL determines if a full initialization is required, as previously described. The FSBL then checks the internally saved value of boot_scratch_por0[0] to verify if the previous SDRAM initialization was completed successfully. If a full initialization is required, the FSBL performs BIST, which results in the loss of data in SDRAM. If a full initialization is not required, the data in SDRAM is preserved.
The following diagram shows the SDRAM initialization flow in the FSBL.