126.96.36.199. Programming Helper Data and Wrapped Key to QSPI Flash Memory
You use the Quartus Programming File Generator graphical interface to build an initial QSPI flash image containing a PUF partition. You must generate and program an entire flash programming image to add a PUF partition to the QSPI flash. Creation of the PUF data partition and use of the PUF helper data and wrapped key files for flash image generation is not supported through the Programming File Generator command line interface.
The following steps demonstrate building a flash programming image with the PUF helper data and wrapped key:
- On the File menu, click Programming File Generator. On the Output Files tab make the following selections:
- For Device Family select Stratix 10 .
- For Configuration mode select Active Serial x4.
- For Output directory browse to your output file directory. This example uses output_files
- For Name, specify a name for the programming file to be generated. This example uses output_file.
- Under Description select the programming files to generate. This example generates the JTAG Indirect configuration File (.jic) for device configuration and the Raw Binary File of Programming Helper Image (.rbf) for device helper image. This example also selects the optional Memory Map File (.map) and Raw Programming Data File (.rpd). The raw programming data file is necessary only if you plan to use a third-party programmer in the future.
Figure 8. Programming File Generator - Output Files Tab - Select JTAG Indirect Configuration
- Click Add Bitstream and browse to your .sof.
- Select your .sof file and then click Properties.
- Turn On Enable signing tool.
- For Private key file select your .pem file.
- Turn On Finalize encryption.
- For Encryption key file select your .qek file.
- Click OK to return to the prior window.
- To specify your PUF helper data file, click Add Raw Data. Change the Files of type drop-down menu to Quartus Physical Unclonable Function File (*.puf). Browse to your .puf file.
- To specify your wrapped AES key file, click Add Raw Data. Change the Files of type drop-down menu to Quartus Wrapped Key File (*.wkey). Browse to your .wkey file.
Figure 9. Specify Input Files for Configuration, Authentication, and Encryption
On the Configuration Device tab, make the following selections:
- Click Add Device and select your flash device from the list of available flash devices.
- Select the configuration device you have just added and click Add Partition.
- In the Edit Partition dialog box for the Input file and select your .sof from the dropdown list. You can retain the defaults or edit the other parameters in the Edit Partition dialog box.
Figure 10. Specifying your .sof Configuration Bitstream Partition
- When you add the .puf and .wkey as input files, the Programming File Generator automatically creates a PUF partition in your Configuration Device. To store the .puf and .wkey in the PUF partition, select the PUF partition and click Edit. In the Edit Partition dialog box, select your .puf and .wkey files from the drop-down lists. If you remove the PUF partition, you must remove and re-add the configuration device for the Programming File Generator to create another PUF partition.
Figure 11. Add the .puf and .wkey files to the PUF Partition
- For the Flash Loader parameter select the Intel Stratix 10 device family and device name that matches your Intel Stratix 10 OPN.
- Click Generate to generate the output files that you specified on the Output Files tab.
- The Programming File Generator reads your .qek file and prompts you for your passphrase. Type your passphrase in response to the Enter QEK passphrase prompt. Click the Enter key.
- Click OK when the Programming File Generator reports successful generation.
- On the Intel® Quartus® Prime Tools menu select Programmer.
- In the Programmer, click Hardware Setup and then select a connected Intel® FPGA Download Cable.
- Click Add File and browse to your .jic file.
Figure 12. Program .jic
- Unselect the box associated with the Helper image.
- Select Program/Configure for the .jic output file.
- Turn on Start button to program your quad SPI flash memory.
- Power cycle your board. The design programmed to the quad SPI flash memory device subsequently loads into the target FPGA.
You must generate and program an entire flash programming image to add a PUF partition to the quad SPI flash.
When a PUF partition already exists in the flash, it is possible to use the Intel® Quartus® Prime Programmer to directly access the PUF helper data and wrapped key files. For example, if activation is unsuccessful, it is possible to re-enroll the PUF, re-wrap the AES key, and subsequently only program the PUF files without having to overwrite the entire flash.
- p: program
- v: verify
- r: erase
- b: blank check
- Use the i operation argument to load the provision firmware helper image for the first operation. For example, the following command sequence re-enrolls the PUF, re-wrap the AES root key, erase the old PUF helper data and wrapped key, then program and verify the new PUF helper data and AES root key.
quartus_pgm -c 1 -m jtag -o "ei;new.puf;1SX280LH2" quartus_pgm -c 1 -m jtag --ccert_file=signed_aes.ccert \ -o "e;new.wkey;1SX280LH2" quartus_pgm -c 1 -m jtag -o "r;old.puf" quartus_pgm -c 1 -m jtag -o "r;old.wkey" quartus_pgm -c 1 -m jtag -o "p;new.puf" quartus_pgm -c 1 -m jtag -o "p;new.wkey" quartus_pgm -c 1 -m jtag -o "v;new.puf" quartus_pgm -c 1 -m jtag -o "v;new.wkey"
Did you find the information on this page useful?