############################################################################## # Copyright © 2017, Xilinx, Inc. # This design is confidential and proprietary of Xilinx, Inc. All Rights Reserved. ############################################################################## # ____ ____ # / /\/ / # /___/ \ / Vendor: Xilinx # \ \ \/ Version: 1.0 # \ \ Filename: vivado_efuse_programming_sequence.txt # / / Date Last Modified: 20170426 # /___/ /\ Date Created: 20170426 # \ \ / \ # \___\/\___\ # #Devices: UltraScale FPGAs, and UltraScale+ FPGAs #Purpose: Example Vivado commands to program eFUSE #Usage: # Read the text below and following the instructions to specify your NKY file and eFUSE settings. # Many settings can be found in the vivado.log for a run of the Vivado GUI procedure that programs the eFUSE. # The unprogrammed, pristine eFUSE bits have a value of 0 (zero). These eFUSE bits are one-time programmable to a 1 value. # # Execute as follows: # vivado -mode batch -notrace -source vivado_efuse_programming_sequence.txt # # How to test this script? # IF YOU ARE NOT USING THE FUSE_USER FIELD, setup the target device as described below, # go to the TEST ONLY line, uncomment its program command line, change the USER value to a non-zero value, # execute this command as described above, # start Vivado GUI and examine the REGISTERS-->EFUSE-->FUSE_USER value to check that it has been programmed. # The following example depends on an external example file named allzeros.nky that contains the following four lines without the leading #sign: #Device xcku040; #EncryptKeySelect EFUSE; #Key0 0000000000000000000000000000000000000000000000000000000000000000; #RsaPublicKeyDigest 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000; # #Reference: UG908 ############################################################################## # # Disclaimer: LIMITED WARRANTY AND DISCLAMER. These designs are # provided to you "as is." Xilinx and its licensors make and you # receive no warranties or conditions, express, implied, # statutory or otherwise, and Xilinx specifically disclaims any # implied warranties of merchantability, noninfringement, or # fitness for a particular purpose. Xilinx does not warrant that # the functions contained in these designs will meet your # requirements, or that the operation of these designs will be # uninterrupted or error free, or that defects in the Designs # will be corrected. Furthermore, Xilinx does not warrant or # make any representations regarding use or the results of the # use of the designs in terms of correctness, accuracy, # reliability, or otherwise. # # LIMITATION OF LIABILITY. In no event will Xilinx or its # licensors be liable for any loss of data, lost profits, cost # or procurement of substitute goods or services, or for any # special, incidental, consequential, or indirect damages # arising from the use or operation of the designs or # accompanying documentation, however caused and on any theory # of liability. This limitation will apply even if Xilinx # has been advised of the possibility of such damage. This # limitation shall apply notwithstanding the failure of the # essential purpose of any limited remedies herein. # ############################################################################## # Revision History: # Revision (YYYYMMDD) - [User] Description # Rev 1.0 (20170426) - [RMK] Created. ############################################################################## # Connect to the JTAG target open_hw connect_hw_server set_property PARAM.FREQUENCY 3000000 [get_hw_targets] open_hw_target # TO-DO: Specify the target device to be programmed. # If more than one device in JTAG chain, then uncomment the following line and specify the device to be programmed as the current_hw_device. Use the device name from the Vivado Hardware Manager view of the JTAG chain of devices. #current_hw_device [get_hw_devices xcku040_0] # TO-DO: Specify the NKY file that contains the optional AES key(s) and optional KeyObfuscate value(s) and optional RSA public key digest value to be programmed create_hw_bitstream -hw_device [current_hw_device] -nky {allzeros.nky} # TEST ONLY, IF NOT USING FUSE_USER FIELD: Uncomment the following line to test programming #program_hw_devices -user_efuse {00000000} [current_hw_device] # STEP 1: Uncomment the following line to program the contents of the NKY file (AES key and RSA hash) and user values to the target device #program_hw_devices -key {efuse} -user_efuse {00000000} -user_efuse_128 {00000000000000000000000000000000} [current_hw_device] # STEP 2: (If applicable) Uncomment the following line to program the security register and replace the 00 hex value below with the security register hex value that you want to program. DO NOT PROGRAM JTAG_DISABLE bit at this time! If the NKY file contains KeyObfuscate value(s), then program the security register bit 6 (hex value 40) to enable the obfuscated key feature. #program_hw_devices -security_efuse {00} [current_hw_device] # STEP 3: (If applicable) Uncomment the following line to program the control register and replace the 00000 hex value below with the control register hex value that you want to program. DO NOT PROGRAM W_DIS_CNTL bit at this time! #program_hw_devices -control_efuse {00000} [current_hw_device] # STEP 4: (If applicable) Uncomment the following line to program the control register W_DIS_CNTL #program_hw_devices -control_efuse {00020} [current_hw_device] # STEP 5: (If applicable) Uncomment the following line to program the security register JTAG_DISABLE bit. The control register W_DIS_SEC must not be programmed in step 3 above. #program_hw_devices -security_efuse {08} [current_hw_device] # Disconnect from the JTAG target disconnect_hw_server close_hw exit