Hard Processor System Technical Reference Manual: Agilex™ 5 SoCs

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

5.3.7.1.2. Programming Command Registers

As indicated previously, all operations in the NAND Flash controller are executed by the command engine module. This supports up to 8 execution threads, but the command engine can only accept a new command when the thread selected is in IDLE state. Follow this sequence to start a new operation on a specific thread number:

  1. Check if the thread selected is in IDLE state. For this, the trd_status register (0x0120) needs to be read. Each bit in the trd_busy field corresponds to the state of a thread (that is, bit0 is for thread 0, bit1 is for thread 1, and so on). If the corresponding bit is cleared, then we can start a new operation in that thread.
  2. Write the operation to trigger in the command registers (0 to 6, registers may be in cmd_regX registers or in descriptors depending on the operation mode), writing last the command register 0 (writing in this register the thread number in the TRD_NUM field), as this write operation triggers the operation execution.