Hard Processor System Technical Reference Manual: Agilex™ 5 SoCs

ID 814346
Date 4/01/2024
Public
Document Table of Contents

5.3.6.6. Control Data Mechanism

The NAND Flash controller supports the Control Data mechanism that allows to write and read metadata to a NAND device page from/to a different host memory location than the one where main user data is located. This mechanism is available in the CDMA and PIO operation modes.

The following figure describes the Control Data mechanism. Here you can observe that metadata is at a different location than user data and it has a particular size. When Control Data mechanism is active, the NAND Flash controller automatically transfers the corresponding metadata using DMA accesses (either from memory to Flash device in program operations or from Flash device to memory in read operations). As you can see in the figure, the metadata in the NAND page is located just after the user data in the last sector. Then the CRC and the ECC are calculated using the user data and metadata together.

Figure 133. Description of Control Data Mechanism

When using the Control Data mechanism, the last sector size only includes the user data bytes and the size of the metadata is configured in the control_data_size field in the control_data_ctrl (0x0494) register. The location of the metadata in the host memory (for either program or read operations) is indicated at:

  • CDMA operation mode: control data pointer field in descriptor.
  • PIO operation mode: Command 5 and Command 6 register.
Note: Metadata is typically used by software to keep history and statistics about the use of the flash device, at page or block level (information about block health, page aging, information in page valid or invalid, and so on).