IAP Using System Service

The user application initiates an IAP system service request using fabric user logic. The system service specifies whether the image is used for verification or programming. The system controller automatically reads the bitstream from the SPI flash to verify or program the device contents.

Verify Operation

The verify operation compares the specified programming image contents with the device contents. The following table lists the fields in an IAP system service request using the image index.

Table 1. IAP Verify Request by Image Index
System Service Descriptor Bit Field Value Description
15

Reserved.
14:7 SPI_IDX[7:0] Identifies the image index in the SPI directory for IAP operation.
6:0 44H IAP verify operation.

An SPI flash memory address can be specified instead of the image index within the SPI directory, as shown in the following table.

Table 2. IAP Verify Request by Image Address
System Service Descriptor Bit Field Value Description
15:7 MBOXADDR[10:2] Mailbox address. For the format, see Table 5.
6:0 45H IAP verify operation.

If the IAP verification is successful, the status code 0 is generated. If the IP verification fails, an 8-bit error code is generated. For the detailed information about error codes, see Appendix: Error Codes.

Digest Check system service is recommended to verify the integrity of the device contents instead of IAP verify operation. For more information, see RT PolarFire FPGA Datasheet.

Note: Digest printed during programming (same as in *.digest file) is bitstream payload digest. It is meant for device to confirm that it receives the correct bitstream payload. Digest exported from DEVICE_INFO is the digest of the actual memory content. It does not have other metadata that is included in the encrypted bitstream payload, so it is different than one generated during programming.

Program Operation

The program operation updates the device contents using a specified programming image. The IAP program operation does not authenticate the image before executing the program. The image can be authenticated using the IAP image authentication system service. For more information, see IAP Image Authentication System Service.

The user application cannot obtain the status code in the following scenarios:

Note: IAP recovery considers image 0 when the pointer to image 1 in the SPI directory is null. For more information, see SPI Directory.

The following table lists the fields in an IAP system service request using the image index.

Table 3. IAP Program Request by Image Index
System Service Descriptor Bit Field Value Description
15 Reserved.
14:7 SPI_IDX[7:0] Identifies the image index in the SPI directory for IAP operation.
6:0 42H IAP program operation.

An SPI flash memory address can be specified instead of the image index within the SPI directory, as specified in the following table.

Table 4. IAP Request by Image Address
System Service Descriptor Bit Field Value Description
15:7 MBOXADDR[10:2] For the mailbox format, see the following table.
6:0 43H IAP program operation.

The following table describes the mailbox format.

Table 5. Mailbox Format
Offset Length (bytes) Parameter Direction Description
0 4 SPIADDR Input Programming image address in SPI flash memory. If the attached SPI flash device does not support 32-bit addresses, SPIADDR[31:24] is ignored.