Hard Processor System Technical Reference Manual: Agilex™ 5 SoCs

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

A.2.6.1.2.1. Indirect Read Operation

An indirect read operation reads data from the Flash memory, places the data into the SRAM, and transfers the data to an external controller through the data target interface. The following registers control the indirect read operations:

  • Indirect read transfer register (indrd)
  • Indirect read transfer watermark register (indrdwater)
  • Indirect read transfer start address register (indrdstaddr)
  • Indirect read transfer number bytes register (indrdcnt)
  • Indirect address trigger register (indaddrtrig)

These registers must be configured prior to issuing indirect read operations. The start address needs to be defined in the indrdstaddr register and the total number of bytes to be fetched is specified in the indircnt register. Writing 1 to the start indirect read bit (start) of the indrd register triggers the indirect read operation from the Flash memory to populate the SRAM with the returned data.

To read data from the Flash device into the SRAM, an external controller issues 32-bit read transactions to the data target interface. The address of the read access must be in the indirect address range. You can configure the indirect address through the indaddrtrig register. The external controller can issue 32-bit reads until the last word of an indirect transfer. On the final read, the external controller may issue a 32-bit, 16-bit, or 8-bit read to complete the transfer. If there are less than four bytes of data to read on the last transfer, the external controller can still issue a 32-bit read and the QSPI controller pads the upper bits of the response data with zeros.

Assuming the requested data is present in the SRAM at the time the data target read is received by the QSPI controller, the data is fetched from SRAM and the response to the read burst is achieved with minimum latency. If the requested data is not immediately present in the SRAM, the data target interface enters a wait state until the data has been read from Flash memory into SRAM. Once the data has been read from SRAM by the external controller, the QSPI controller frees up the associated resource in the SRAM. If the SRAM is full, reads on the SPI interface are back-pressured until space is available in the SRAM. The QSPI controller completes any current read burst, waits for SRAM to free up, and issues a new read burst at the address where the previous burst was terminated.

The processor can also use the SRAM fill level in the SRAM fill register (sramfill) to control when data should be fetched from the SRAM.

Alternatively, you can configure the fill level watermark of the SRAM in the indrdwater register. When the SRAM fill level passes the watermark level, the indirect transfer watermark interrupt is generated. You can disable this watermark feature by writing a value of all zeroes to the indrdwater register.

For the final bytes of data read by the QSPI controller and placed in the SRAM, if the watermark level is greater than zero, the indirect transfer watermark interrupt is generated even when the actual SRAM fill level has not risen above the watermark.

If the address of the read access is outside the range of the indirect trigger address, one of the following actions occurs:

  • When direct access mode is enabled, the read uses direct access mode.
  • When direct access mode is disabled, the target returns an error back to the requesting controller.

You can cancel an indirect operation by setting the cancel indirect read bit (cancel) of the indrd register to 1. For more information, refer to the “Indirect Read Operation” section.