Hard Processor System Technical Reference Manual: Agilex™ 5 SoCs

ID 814346
Date 7/19/2024
Public
Document Table of Contents

5.3.6.4.2.1. Operation in CDMA Mode

In the CDMA operation mode, the Command0(offset 0x0000), Command2(offset 0x0008), and Command3(offset 0x000C) registers are used to define the descriptor chain start address and the thread number associated with the descriptors chain. In this operation mode, these command registers has the structure shown in the following table.

Table 185.  Command Structure in CDMA Operation Mode
Command Number Register Bits Field Description
0 [31:30] CT = 2’b00 (CDMA mode)
[29:27] Reserved
[26:24] TRD_NUM (thread number)
[23:0] Reserved
2 [31:0] Descriptor address low
3 [31:0] Descriptor address high

The host must indicate the address where the linked descriptors' head is located using command2 and command3 registers. The address pointers should be aligned to the natural boundary of the initiator interface data width. A descriptor is fetched by the controller using a burst transaction. The following diagram shows the structure of the linked descriptors.

Figure 99. Linked Descriptors Structure in CDMA Mode

In Command 0 register, the host must indicate the CDMA operation mode setting 0 in CT field. Also, the thread in which the descriptors chain operates must be set in this register using the TRD_NUM field.

The layout of a descriptor in the CDMA operation mode is shown in the following table.

Table 186.  CDMA Descriptor Structure
Item 63:48 47:32 31:16 15:0
0 Next descriptor pointer
1 Reserved Bank number Flash pointer/Copyback source address
2 Reserved Command flags Reserved Command type
3 Memory pointer/Copyback destination address
4 Status
5 Sync flag pointer
6 Reserved Sync arguments
7 Control data pointer

The fields in the previous table are described below:

  • Next descriptor pointer: This is the address in the memory system where the next descriptor is located. This needs to follow the system bus restrictions.
  • Bank number: Select target bank (NAND device chip select). Only one chip is supported by HPS.
  • Flash pointer/Copyback source address: This is the 32-bit target address in the NAND device corresponding to the ROW address. If a multi-plane feature is enabled, this pointer should contain the block address of plane zero of the NAND Flash device. For the copyback operations, this field contains the source address.
  • Memory pointer/Copyback destination address: This is the system or host memory address required for data DMA commands. For the copyback operations, this field contains the destination address.
  • Command flags: The following table describes the flags in this field.
Table 187.  Structure of Command Flags Field in CDMA Descriptor
Bits Name Description
15:11 Reserved Reserved
10 DMA Sel Selects DMA data interface. Slave DMA (0) or master DMA (1). This field is ignored if the command in the descriptor doesn’t require data transfer.
9 Cont The next descriptor address field is valid and descriptor processing should continue. This bit should be zero only for the last descriptor in a descriptors chain.
8 Int

An interrupt should be issued after the completion of descriptor processing. The triggered interrupt is trdX_comp field of the trd_comp_intr_status (0x0138) register, where interrupt bit is selected by the thread number selected by the TRD_NUM field in command0 register.

7:4 Target Volume This field must be set to 0 by software.
3:2 Reserved Reserved
1 Flash_Ptr_Cont

If this bit is set, then the Flash pointer field of the current descriptor is ignored and the command engine uses the existing Flash pointer value. This bit continues the transfer from the address on the Flash interface where the previously completed descriptor finished.

This feature works correctly only when this bit is set for the descriptor that follows other descriptor which has this bit cleared and initializes Flash pointer value. It should be used for command of the same type, for example series of read descriptors or series of write descriptors.

0 Mem_Ptr_Cont

If this bit is set, then the Memory pointer field of the current descriptor is ignored and the command engine uses the existing memory pointer value. This bit continues the transfer from the address on the host interface where the previously completed descriptor finished.

This feature works correctly only when this bit is set for the descriptor that follows other descriptor which has this bit cleared and initializes memory pointer value. It should be used for command of the same type, for example series of read descriptors or series of write descriptors

  • Command type: This field identifies the type of operation the controller needs to perform. The following table describes the encoding.
Table 188.  Encoding in Command Type Field in CDMA Descriptor
Encoding Description
0x10PP Block erase of 'PP+1' number of sequential blocks.
0x11PP

Bank/Volume/LUN reset. PP value is used to select the reset type:

0x00: Asynchronous reset.

0x01: Synchronous reset.

0x02: LUN reset.

0x12PP Copyback operation of 'PP+1' number of sequential pages. Both source and destination addresses need to point on the same BANK, LUN, and Plane. The host's software must follow device addressing restrictions when it selects source and destination Flash pointer. When host sets both addresses, it must additionally take into account the number of pages to be sure that the controller does not cross LUN/Plane boundary if multi-plane operations in controller are disabled.
0x21PP Command for Program (Write) Operation of 'PP+1' number of sequential pages.
0x22PP Command for Read Operation of 'PP+1' number of sequential pages.
0xFFFF NOP descriptor.
Any other values are reserved
  • Status: The controller updates this field with command status once the command operation is complete. The following table describes the different status bits.
Table 189.  Status Field Bit Description
Bits Status Field Name Description
63:56 pl_ecc_err Each bit of this field provides ECC error status for the corresponding plane.
55:48 pl_device_error Each bit of this field provides device error status for the corresponding plane. If the pl_status_en bit in the multiplane_config (0x0434) register is cleared, then all bits corresponding to planes present inside devices are set.
47:32 Reserved

Reserved

31:24 Error Index If the Fail bit is set, then this field indicates the operation index number where the first error was detected. Operations are numbered from 0. This field is not updated when source of error is transferred on the system bus - in this case, only the Bus Error bit is set.
23:21 Reserved Reserved
20 prot_err If the bit is set, then the programmed operation tries to modify a protected area.
19 di_ctx_err When set, this bit indicates that a parity error was detected on the data bus during access to the context memory. Additionally, it is set when parity error is detected during access to the remap memory.
18 di_dsc_err When set, this bit indicates that a parity error was detected on the data bus during access to the system bus. It applies to the descriptor read and sync flag read.
17 di_dat_err When set, this bit indicates that a data integrity error was detected in the data path.
16 Bus Error When set, this bit indicates that the controller received an error response on the system bus.
15 Complete When set, this bit indicates that the controller has updated status information and the operation is complete. The bit must be set even if the operation failed. This bit must be in cleared state while descriptor is constructed. If the bit is set when the controller reads the descriptor for execution, the controller skips execution of the descriptor and continues with execution of further descriptors in the chain depending on the state of the continue bit.
14 Fail When set, this bit indicates that operation failed to complete successfully.
13 DQS Error

Indicates that incorrect DQS pulses number was detected during the data read operation. This is information from the PHY that either the DQS strobe did not appear during read (for example, device is not connected to the controller) or rd_del_sel signal value is wrong (field in the phy_gate_lpbk_ctrl_reg) and data read from Flash device are corrupted and read FIFO pointers in the PHY are misaligned. The dll_rst_n or rst_n clears dfi_dqs_underrun/dfi_dqs_overflow flag in the PHY and clears all PHY read data pointers. One of these is required by the PHY before continuing to work after dfi_dqs_underrun/dfi_dqs_overflow assertion.

12 device_error Device error was detected during read status operation in any of the device planes.
11 Erased Page When set, this bit indicates that the controller detected an erased page in the read transaction. The detection of erased page is based on the number of 0s in a page. If the number of 0s in a page being read is less than the value on the erase_det_lvl field of the ecc_config_1 (0x042c) register, an erased page is inferred, and no uncorrectable error is flagged for that page. If ECC is disabled, the erased_page interrupt must be set as explained above. If ECC is enabled, in addition to the above condition, only when the ECC logic detects no errors or correctable error pattern for that page is the erased_page interrupt flagged. If the ECC logic detects a uncorrectable error page, the erased page interrupt is not set. The flag does not contribute to the Fail flag.
10 Reserved Reserved
9:2 Max Error For the Flash read command, this field indicates the maximum amount of error corrections applied to one ECC sector. The field is of significance only if the read transaction resulted in correctable errors. If no errors were found, this field reads zero.
1 ecc_err Uncorrectable ECC error was detected for the any of the device planes.
0 Descriptor Error The bit indicates that an invalid descriptor sequence has been detected.
  • Sync flag pointer: Address pointer to sync buffer location. See next section for additional information.
  • Sync arguments: Controls the buffer sync mechanism. See next section for additional information.
  • Control data pointer: System memory address that points to the location where control data is stored.