1.6.1. Operation Commands
Resettig Quad SPI Flash
Commad | Code (Hex) | Commad Legth 11 | Respose Legth 11 | Desciptio | |||
---|---|---|---|---|---|---|---|
NOOP | 0 | 0 | 0 | Seds a OK status espose. | |||
GET_IDCODE | 10 | 0 | 1 | The espose cotais oe agumet which is the JTAG IDCODE fo the device | |||
GET_CHIPID | 12 | 0 | 2 | The espose cotais 64-bit CHIPID value with the least sigificat wod fist. | |||
GET_USERCODE | 13 | 0 | 1 | The espose cotais oe agumet which is the 32-bit JTAG USERCODE that the cofiguatio bitsteam wites to the device. | |||
GET_VOLTAGE | 18 | 1 | 12 | The GET_VOLTAGE commad has a sigle agumet which is a bitmask specifyig the chaels to ead. Bit 0 specifies chael 0, bit 1 specifies chael 1, ad so o. The espose icludes a oe-wod agumet fo each bit set i the bitmask. The voltage etued is a usiged fixed-poit umbe with 16 bits below the biay poit. Fo example, a voltage of 0.75V etus 0x0000C000.13 14 15 |
|||
GET_TEMPERATURE | 19 | 1 | 16 | The GET_TEMPERATURE commad etus the tempeatue o tempeatues of the coe fabic o tasceive chael locatios you specify. Fo Statix® 10 devices: Use the seso_eq agumet to specify the locatios. The seso_eq icludes the followig fields:
Fo Agilex™ 7 ad Agilex™ 5 devices: Use the seso_eq agumet to specify the locatios. The seso_eq icludes the followig fields:
The tempeatue etued is a siged fixed value with 8 bits below the biay poit. Fo example, a tempeatue of 10°C etus 0x00000A00. A of tempeatue -1.5°C etus 0xFFFFFE80. If the bitmask specifies a ivalid Locatio, the commad etus a eo code which is ay value i the age 0x80000000 -0x800000FF. Fo Statix® 10 devices: Refe to the Tempeatue Seso Chaels ad Locatios i the Statix® 10 Aalog to Digital Covete Use Guide fo moe ifomatio about seso locatios. Fo Agilex™ 7 devices: Refe to the Agilex™ 7 Powe Maagemet Use Guide fo moe ifomatio about local build-i tempeatue sesos. Fo Agilex™ 5 devices: Refe to the Agilex™ 5 Powe Maagemet Use Guide fo moe ifomatio about local build-i tempeatue sesos. |
|||
GET_I2C_TELEMETRY | 1B | 3 | N | This commad is fo VID-eabled devices ad allows ead of 1 byte ad 2 byte egiste cotets of I2C devices ove the PMBus. Specify the device addess ad egiste addess to ead, as commad paametes. The FPGA suppots I2C device addess i 7-bit fomat. Two goups of eight addesses (0000 XXX ad 1111 XXX) ae eseved ad ot accessible via Mailbox commad. The PMBus* Specificatio has defiitios fo egistes i the addess age of 0x00 - 0xAE. Registe defiitios beyod this age ae defied by the I2C device’s maufactue.
Takes thee agumets:
Whe successful, etus the OK espose code followed by the ead data fom the device. A failue espose etus a eo code.
Note: Block Read ad egistes that use Block Read fo access ae ot suppoted. Refe to the PMBus* Specificatio fo a list of these egistes.
Note: Readig 2 bytes fom a 1 byte egiste esults i upedictable data beig etued i the secod byte. Readig 1 byte fom a 2 byte egiste could leave upocessed data i the VR’s output data buffe. Most VR’s would age-out this data afte some timeout but this is ot guaateed behavio.
Note: This commad is oly suppoted o Agilex™ 7 devices.
|
|||
RSU_IMAGE_UPDATE | 5C | 2 | 0 | Tigges ecofiguatio fom the data souce that ca be eithe the factoy o a applicatio image. This commad takes a optioal 64-bit agumet that specifies the ecofiguatio data addess i the flash. Whe sedig the agumet to the IP, you fist sed bits [31:0] followed by bits [63:32]. If you do ot povide this agumet its value is assumed to be 0.
Oce the device pocesses this commad, it etus the espose heade to espose FIFO befoe it poceeds to ecofigue the device. Esue the host PC o host cotolle stops sevicig othe iteupts ad focuses o eadig the espose heade data to idicate the commad completed successfully. Othewise, the host PC o host cotolle may ot be able to eceive the espose oce the ecofiguatio pocess stated. Oce the device poceeds with ecofiguatio, the lik betwee the exteal host ad FPGA is lost. If you use PCIe* i you desig, you eed to e-eumeate the PCIe* lik.
Impotat: Whe esettig quad SPI, you must follow istuctios specified i Resettig Quad SPI Flash.
|
|||
RSU_GET_SPT | 5A | 0 | 4 | RSU_GET_SPT etieves the quad SPI flash locatio fo the two sub-patitio tables that the RSU uses: SPT0 ad SPT1. The 4-wod espose cotais the followig ifomatio: |
|||
Wod | Name | Desciptio | |||||
0 | SPT0[63:32] | SPT0 addess i quad SPI flash. | |||||
1 | SPT0[31:0] | ||||||
2 | SPT1[63:32] | SPT1 addess i quad SPI flash. | |||||
3 | SPT1[31:0] | ||||||
CONFIG_STATUS | 4 | 0 | 6 | Repots the status of the last ecofiguatio. You ca use this commad to check the cofiguatio status duig ad afte cofiguatio. The espose cotais the followig ifomatio: |
|||
Wod | Summay | Desciptio | |||||
0 | State | Descibes the most ecet cofiguatio elated eo. Retus 0 whe thee ae o cofiguatio eos.
The followig esposes etu No-Eo States:
The eo field has 2 fields:
Refe to Appedix: CONFIG_STATUS ad RSU_STATUS Eo Code Desciptios i the Mailbox Cliet Itel® FPGA IP Use Guide fo moe ifomatio. |
|||||
1 | Quatus Vesio |
Fo Statix® 10 devices: Available i Quatus® Pime softwae vesio 19.4 o late, the field displays:
Fo Agilex™ 7 devices: Available i Quatus® Pime softwae vesios betwee 19.4 ad 21.2, the field displays:
Fo Agilex™ 7 ad Agilex™ 5 devices: Available i Quatus® Pime softwae vesio 21.3 o late, the Quatus vesio displays:
Fo example, i Quatus® Pime softwae vesio 21.3.1, the followig values epeset the majo ad mio Quatus elease umbes, ad the Quatus update umbe:
|
|||||
2 | Pi status |
|
|||||
3 | Soft fuctio status | Cotais the value of each of the soft fuctios, eve if you have ot assiged the fuctio to a SDM pi.
|
|||||
4 | Eo locatio | Cotais the eo locatio. Retus 0 if thee ae o eos. | |||||
5 | Eo Details |
Fo Agilex™ 7 ad Statix® 10 devices: Cotais the eo details. Retus 0 if thee ae o eos. | |||||
Reseved | Fo Agilex™ 5 devices: This field is eseved. | ||||||
RSU_STATUS | 5B | 0 | 9 | Repots the cuet emote system upgade status. You ca use this commad to check the cofiguatio status duig cofiguatio ad afte it has completed. This commad etus the followig esposes: | |||
Wod | Summay | Desciptio | |||||
0-1 | Cuet image | Flash offset of the cuetly uig applicatio image. | |||||
2-3 | Failig image | Flash offset of the highest pioity failig applicatio image. If multiple images ae available i flash memoy, stoes the value of the fist image that failed. A value of all 0s idicates o failig images. If thee ae o failig images, the emaide of the emaiig wods of the status ifomatio do ot stoe valid ifomatio.
Note: A isig edge o CONFIG to ecofigue fom ASx4, does ot clea this field. Ifomatio about failig image oly updates whe the Mailbox Cliet eceives a ew RSU_IMAGE_UPDATE commad ad successfully cofigues fom the update image.
|
|||||
4 | State | Failue code of the failig image.
The eo field has two pats:
Retus 0 fo o failues. Refe to Appedix: CONFIG_STATUS ad RSU_STATUS Eo Code Desciptios i the Mailbox Cliet Itel® FPGA IP Use Guide fo moe ifomatio. |
|||||
5 | Vesio | RSU iteface vesio ad eo souce. Fo moe ifomatio, efe to the RSU Status ad Eo Codes sectio i the Had Pocesso System Remote System Update Use Guide. |
|||||
6 | Eo locatio | Stoes the eo locatio of the failig image. Retus 0 fo o eos. | |||||
7 | Eo details | Stoes the eo details fo the failig image. Retus 0 if thee ae o eos. | |||||
8 | Cuet image ety coute | Cout of the umbe of eties that have bee attempted fo the cuet image. The coute is 0 iitially. The coute is set to 1 afte the fist ety, the 2 afte a secod ety. Specify the maximum umbe of eties i you Quatus® Pime Settigs File (.qsf). The commad is: set_global_assigmet -ame RSU_MAX_RETRY_COUNT 3. Valid values fo the MAX_RETRY coute ae 1-3. The actual umbe of available eties is MAX_RETRY -1 This field was added i vesio 19.3 of the Quatus® Pime Po Editio softwae. |
|||||
RSU_NOTIFY | 5D | 1 | 0 |
Cleas all eo ifomatio i the RSU_STATUS espose ad esets the ety coute. The oe-wod agumet has the followig fields:
This commad is ot available befoe vesio 19.3 of the Quatus® Pime Po Editio softwae. |
|||
QSPI_OPEN | 32 | 0 | 0 | Requests exclusive access to the quad SPI. You issue this equest befoe ay othe QSPI equests. The SDM accepts the equest if the quad SPI is ot i use ad the SDM is ot cofiguig the device. Retus the OK espose code if the SDM gats access. Upo eceivig the OK espose code, issue the QSPI_SET_CS commad to select the flash devices. The SDM gats exclusive access to the cliet usig this mailbox. Othe cliets caot access the quad SPI util the active cliet eliquishes access usig the QSPI_CLOSE commad. Access to the QSPI flash memoy devices usig SDM_IO pis is oly available fo the AS x4 cofiguatio scheme, JTAG cofiguatio, ad a desig compiled fo AS x4 cofiguatio. Fo the Avalo® steamig iteface ( Avalo® ST) cofiguatio scheme, you must coect QSPI flash memoies to GPIO pis. Access to the quad SPI flash memoy devices via ay mailbox cliet IP is ot available by default i desigs that iclude the HPS, uless you disable the QSPI i HPS softwae cofiguatio.
Impotat: Whe esettig quad SPI, you must follow istuctios specified i Resettig Quad SPI Flash.
|
|||
QSPI_CLOSE | 33 | 0 | 0 | Closes the exclusive access to the quad SPI iteface.
Impotat: Whe esettig quad SPI, you must follow istuctios specified i Resettig Quad SPI Flash.
|
|||
QSPI_SET_CS | 34 | 1 | 0 | Specifies oe of the attached quad SPI devices via the chip select lies. Takes a oe-wod agumet as descibed below:
Note: All devices suppot oe AS x4 flash memoy device fo AS cofiguatio fom quad SPI device coected to CSO[0]. Oce the device has eteed use mode, you ca use up to fou AS x4 flash memoies with Mailbox Cliet Itel® FPGA IP o HPS as data stoage. The Mailbox Cliet Itel® FPGA IP o HPS ca use CSO[3:0] to access quad SPI devices.
Fo Statix® 10 devices: Duig AS x4 cofiguatio scheme, this commad is optioal. The chip select lie follows the last executed QSPI_SET_CS commad o defaults to CSO[0] afte the AS x4 cofiguatio. Fo Agilex™ 7 ad Agilex™ 5 devices: Duig AS x4 cofiguatio scheme, this commad is equied afte evey QSPI_OPEN commad. Fo all devices duig JTAG cofiguatio scheme, this commad is equied afte evey QSPI_OPEN commad.
Impotat: Whe esettig quad SPI, you must follow istuctios specified i Resettig Quad SPI Flash.
|
|||
QSPI_READ | 3A | 2 | N | Reads the attached quad SPI device. The maximum tasfe size is 4 kilobytes (KB) o 1024 wods.
Takes two agumets:
Fo a patially successful ead, QSPI_READ may eoeously etu the OK status.
Note: You caot u the QSPI_READ commad while device cofiguatio is i pogess.
Impotat: Whe esettig quad SPI, you must follow istuctios specified i Resettig Quad SPI Flash.
|
|||
QSPI_WRITE | 39 | 2+N | 0 | Wites data to the quad SPI device. The maximum tasfe size is 4 kilobytes (KB) o 1024 wods.
Takes thee agumets:
To pepae memoy fo wites, use the QSPI_ERASE commad befoe issuig this commad.
Note: You caot u the QSPI_WRITE commad while device cofiguatio is i pogess.
Impotat: Whe esettig quad SPI, you must follow istuctios specified i Resettig Quad SPI Flash.
|
|||
QSPI_ERASE | 38 | 2 | 0 | Eases a 4/32/64 KB secto of the quad SPI device. Takes two agumets:
Impotat: Whe esettig quad SPI, you must follow istuctios specified i Resettig Quad SPI Flash.
|
|||
QSPI_READ_DEVICE_REG | 35 | 2 | N | Reads egistes fom the quad SPI device. The maximum ead is 8 bytes. Takes two agumets:
A successful ead etus the OK espose code followed by the data ead fom the device. The ead data etu is i multiple of 4 bytes. If the bytes to ead is ot a exact multiple of 4 bytes, it is padded with multiple of 4 bytes util the ext wod bouday ad the padded bit value is zeo.
Impotat: Whe esettig quad SPI, you must follow istuctios specified i Resettig Quad SPI Flash.
|
|||
QSPI_WRITE_DEVICE_REG | 36 | 2+N | 0 | Wites to egistes of the quad SPI. The maximum wite is 8 bytes. Takes thee agumets:
To pefom a secto ease o sub-secto ease, you must specify the seial flash addess i most sigificat byte (MSB) to least sigificat byte (LSB) ode as the followig example illustates. To ease a secto of a Mico* 2 gigabit (Gb) flash at addess 0x04FF0000 usig the QSPI_WRITE_DEVICE_REG commad, wite the flash addess i MSB to LSB ode as show hee: Heade: 0x00003036 Opcode: 0x000000DC Numbe of bytes to wite: 0x00000004 Flash addess: 0x0000FF04 A successful wite etus the OK espose code. This commad pads data that is ot a multiple of 4 bytes to the ext wod bouday. The commad pads the data with zeo.
Impotat: Whe esettig quad SPI, you must follow istuctios specified i Resettig Quad SPI Flash.
|
|||
QSPI_SEND_DEVICE_OP | 37 | 1 | 0 | Seds a commad opcode to the quad SPI. Takes oe agumet:
A successful commad etus the OK espose code.
Impotat: Whe esettig quad SPI, you must follow istuctios specified i Resettig Quad SPI Flash.
|
|||
QSPI_READ_SHA | 6E | 2 | 16/12/8 | Istucts the fimwae to ead data fom the flash cotolle ad calculate its hash value usig oe of thee Secue Hashig Algoithms (SHA). The etued hash value ca be compaed to a peviously calculated hash value usig the same algoithm to detemie the itegity of the flash cotets. This commad takes two 32-bit wods as agumets. Wod 0:
Wod 1:
The espose legth vaies depedig o the SHA vaiat chose i the commad.
Note: This commad is oly suppoted o Agilex™ 7 ad Agilex™ 5 devices.
Note: Fo this commad o Agilex™ 5 devices, oly SHA512 is suppoted fo commad ad espose.
|
|||
GET_CONFIGURATION_TIME | 65 | 0 | 2 | Retus the 64-bit cycle cout of the cofiguatio etwok cotol clock, with the least sigificat wod fist. Dividig the cout value by the cofiguatio etwok cotol clock fequecy povides a estimate of the time it takes to pocess the cofiguatio bitsteam, begiig with loadig of the SDM fimwae util the etie desig sectio of the cofiguatio bitsteam is cofigued ad the device etes use mode. Fo moe ifomatio, efe to the Cofiguatio File Fomat Diffeeces sectio i the Cofiguatio Use Guide fo you device. The opeatig fequecy of the cofiguatio etwok clock depeds o the clock souce settigs cofiguatio i Quatus® Pime. This commad ca be used with ay of the suppoted cofiguatio schemes. Typically, cofiguatio cycle cout is captued i the lowe 32 bits. It is ulikely that the fimwae etus a 64-bit cycle cout. If this happes, you must cocateate the two 32-bit wods to obtai the total cycle cout value. Example: Retued espose: 0x007C27EE = 8136686 cycles Cofiguatio cotol clock fequecy: 200 MHz Cofiguatio time: (8136686/200000000) × 1000 = 40.68 ms
Note: This commad is oly suppoted o Agilex™ 7 ad Agilex™ 5 devices.
|
|||
Cofiguatio Clock Souce | Cofiguatio Netwok Cotol Clock Fequecy | ||||||
Exteal Oscillato (OSC_CLK_1) | 250 MHz | ||||||
Iteal Oscillato | 170 MHz to 230 MHz | ||||||
READ_SEU_ERROR | 3C | 0 |
|
Whe a SEU eo is detected, the eo ifomatio is stoed i the eo message queue. This commad povides a way to ispect the queue ad emove eties fom it. Whe you set the SEU_ERROR pi i the Device ad Pi Optios widow, you may obseve that the SEU_ERROR sigal emais high whe thee is oe o moe eos i the eo message queue. The sigal goes low whe the eo message queue is empty. The espose is oe wod log whe thee ae o eos i the eo message queue. Whe thee is oe o moe eos i the queue, the fist eo fom the queue is emoved ad etued i the subsequet wods. This commad etus oe elemet fom the queue at a time.
Note: Do ot use this mailbox commad if you desig cotais the Advaced SEU Detectio Itel® FPGA IP.
|
|||
Wod | Name | Desciptio | |||||
0 | Eo Cout | Bit[31:0]:Total eo cout i the Eo Message Queue. | |||||
1 | Secto Addess | Refe to the espective SEU Mitigatio Use Guide fo the bit desciptio. | |||||
2 | Eo Data | ||||||
READ_SEU_STATS | 40 | 1 | 6 | This commad epots the SEU statistics fo a give secto. This commad takes oe 32-bit wods as agumets. Wod 0:
The espose legth as show below:
Time (secod) = cycle/iteal clock fequecy Refe to the espective SEU Mitigatio Use Guide fo moe ifomatio.
Note: This commad is oly suppoted o Agilex™ 5 devices.
|
|||
INSERT_SAFE_SEU_ERROR | 41 | 2 | 0 | This commad ijects oe o moe eos ito a selected secto. If detectio is wokig, the the device coects this eo if possible ad epots it back to the use though the stadad SEU epotig mechaism. Ijectio may oly taget to a pe-defied list of locatio fo uused CRAMs ae povided (idetified by CRAM_SEL 0 to 7).
Up to 2 CRAM_SEL may be specified i a sigle INSERT_SEU_ERROR message. The CRAM Select may be used to pefom the followig ijectio sceaios:
Fame selectio:
Example: |
|||
Select | CRAM_SEL1 | CRAM_SEL0 | SEU Eo Type | ||||
All eve fames | 0 | 1 | Double adjacet bit | ||||
1 | 0 | ||||||
0 | 2/3 | Multibit (ucoectable) | |||||
2/3 | 0 | ||||||
1/2/3 | 1/2/3 | ||||||
Eve + odd fames | 0/1/2/3 | 4/5/6/7 | 2 x sigle bit | ||||
All odd fames | 4 | 5 | Double adjacet bit | ||||
5 | 4 | ||||||
4 | 6/7 | Multibit (ucoectable) | |||||
6/7 | 4 | ||||||
5/6/7 | 5/6/7 | ||||||
This commad takes two 32-bit wods as agumets
Refe to the espective SEU Mitigatio Use Guide fo moe ifomatio.
Note: This commad is oly suppoted o Agilex™ 5 devices.
|
|||||||
INSERT_ECC_ERROR | 42 | 1 | 0 | This commad isets a ECC eo ito selected RAM of CNT/SDM ad tigge ECC eo by pefomig a eadback. Use ca oly iset sigle bit ECC.
This commad takes oe 32-bit wod as agumets.
Note: This commad is oly suppoted o Agilex™ 5 devices.
|
|||
QSPI_READ_SHA512 | 6E | 2 | 16 | This commad takes two 32-bit wods as agumets. Wod 0:
Wod 1:
The espose legth etus 16 wods.
Note: This commad is oly suppoted o Statix® 10 devices.
|
|||
STATUS_VR | 713 | 1 | 1 | Povides a iteface fo Powe Maagemet Fimwae (PMF) ad Voltage Regulato (VR) data. This commad is fo VID-eabled devices with both VR pollig ad PMF also eabled.
Takes oe of the followig iput agumets descibed below:
This commad is available i the Quatus® Pime Po Editio softwae vesio 23.3 o late.
Note: This commad is oly suppoted o Agilex™ 7 devices.
|
Fo CONFIG_STATUS ad RSU_STATUS majo ad mio eo code desciptios, efe to Appedix: CONFIG_STATUS ad RSU_STATUS Eo Code Desciptios.