Hard Processor System Technical Reference Manual: Agilex™ 5 SoCs

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

5.3.6.4.5.5. Thread Reset Commands

Thread reset command is used to abort command processing in a specific thread.

In CDMA mode, this command stops a thread from processing the next descriptor in the chain. The tdr_busy bit in the trd_status (0x0120) register can be used to determine when a specific thread has been aborted and is in idle state. If the SDMA module is selected for data transfer, clearing of sdma_paused bit in the ctrl_status (0x0118) register may be required. Two types of thread resets can be issued: Type 0 and Type 1. The format of the thread reset command in Command0 register is shown in the following table.

Table 206.  Thread Reset Format in Command0 Register
Bits Field Field Description
[31:30] CT CT = 2’b00 (CDMA mode)
[29:27] Reserved Reserved
[26:24] TRD_NUM This field selects destination thread number for command. Software can select any available thread. Commands can be issued in parallel to all threads.
[23:22] Reserved Reserved
[20] INT If this bit is set, an interrupt should be issued after this operation is finished. The triggered interrupt is n bit of the trd_comp field in the trd_comp_intr_status (0x0138) register. where n is thread number selected by the TRD_NUM field.
[19:16] Reserved Reserved
15:0 CMD_TYPE

This field identifies the type of reset to be executed. Thread Reset Type 0: 0x0200.

Thread Reset Type 1: 0x0201.

The description of each one of the reset types is shown below.

  • Thread Reset Type 0: Only supported by CDMA work mode. When this command is received, the present working command in the thread is completed and no further descriptors are executed by the thread. The status field of the descriptor is updated with the associated status. Sync associated with a descriptor is not executed if the thread reset command is received by the thread while waiting for a sync condition to get satisfied. If the thread is waiting for sync condition to be met and receives the thread reset command, it immediately exits the descriptor operation and returns to the IDLE state. If this command is received in any other working mode, the behavior of this is as Type 1.
  • Thread Reset Type 1: This command is allowed in any of the working modes and when this is received, the present working command in the thread is aborted. For the CDMA work mode, no further descriptors in the chain are fetched and executed. After the reset command is sent, the data path is initialized, so the host does not need to receive or provide any data. Also, if the SDMA was selected for data transfer, the following flags are set:
    • sdma_err bit in the intr_status (0x0110) register is set an needs to be cleared after thread reset process is complete.
    • sdma_paused bit in the ctrl_status (0x0118) register can be set. If this happens, then it needs to be cleared before operation in given thread is finished. This bit is set if incorrect transaction is detected during data transfer through the slave DMA interface.