21.3.32 export_bitstream_file
(Ask a Question)Description
This Tcl command configures the parameters for the bitstream to be exported from Libero.export_bitstream_file [-file_name "file_name"] \
[-export_dir "export_dir"] \
[-format "PPD | DAT | HEX | STP | CHAIN_STP | SPI | SVF" ] \
[-for_ihp "TRUE | FALSE" ] \
[-master_file "TRUE | FALSE" ] \
[-master_file_components "SECURITY | FABRIC | ENVM" ] \
[-encrypted_uek1_file "TRUE | FALSE" ] \
[-encrypted_uek1_file_components "FABRIC | ENVM" ] \
[-encrypted_uek2_file "TRUE | FALSE" ] \
[-encrypted_uek2_file_components "FABRIC | ENVM" ] \
[-encrypted_uek3_file "TRUE | FALSE" ] \
[-encrypted_uek3_file_components "FABRIC | ENVM" ] \
[-trusted_facility_file "TRUE | FALSE" ] \
[-trusted_facility_file_components 'FABRIC | ENVM" ] \
[-add_golden_image "TRUE | FALSE" ] \
[-golden_image_address "golden_image_address" ] \
[-golden_image_design_version "golden_image_design_version" ] \
[-add_update_image "TRUE | FALSE" ] \
[-update_image_address "update_image_address" ] \
[-update_image_design_version "update_image_design_version" ] \
[-serialization_stapl_type "serialization_stapl_type" ] \
[-serialization_target_solution "serialization_target_solution" ] \
[-script "script" ] \
[-force_rtg4_otp "TRUE | FALSE" ] \
[-master_include_plaintext_passkey "TRUE | FALSE" ] \
[-uek1_include_plaintext_passkey "TRUE | FALSE" ] \
[-uek2_include_plaintext_passkey "TRUE | FALSE" ] \
[-uek3_include_plaintext_passkey "TRUE | FALSE" ]
The following is the syntax for the Export Bitstream File Tcl command for PolarFire.export_bitstream_file [-file_name "file_name"] \
[-export_dir "export_dir"] \
[-format "PPD | DAT | HEX | STP | SPI" ] \
[-for_ihp "TRUE | FALSE" ] \
[-limit_SVF_file_size "TRUE | FALSE" ] \
[-limit_SVF_file_by_max_filesize_or_vectors "limit_SVF_file_by_max_filesize_or_vectors" ] \
[-svf_max_filesize "svf_max_filesize" ] \
[-svf_max_vectors "svf_max_vectors" ] \
[-master_file "TRUE | FALSE" ] \
[-master_file_components "SECURITY | FABRIC | SNVM | ENVM | FABRIC_SNVM" ] \
[-encrypted_uek1_file "TRUE | FALSE" ] \
[-encrypted_uek1_file_components "FABRIC | SNVM | ENVM | FABRIC_SNVM" ] \
[-encrypted_uek2_file "TRUE | FALSE"] \
[-encrypted_uek2_file_components "FABRIC | SNVM | ENVM | FABRIC_SNVM" ] \
[-trusted_facility_file "TRUE | FALSE"] \
[-trusted_facility_file_components "FABRIC | SNVM | ENVM | FABRIC_SNVM" ] \
[-trusted_facility_keep_fabric_operational "TRUE | FALSE"] \
[-trusted_facility_skip_startup_seq "TRUE | FALSE"] \
[-zeroization_likenew_action "TRUE | FALSE" ] \
[-zeroization_unrecoverable_action "TRUE | FALSE" ] \
[-master_backlevel_bypass "TRUE | FALSE" ] \
[-uek1_backlevel_bypass "TRUE | FALSE" ] \
[-uek1_keep_fabric_operational "TRUE | FALSE"] \
[-uek1_skip_startup_seq "TRUE | FALSE"] \
[-uek2_backlevel_bypass "TRUE | FALSE" ] \
[-uek2_keep_fabric_operational "TRUE | FALSE"] \
[-uek2_skip_startup_seq "TRUE | FALSE"] \
[-master_include_plaintext_passkey "TRUE | FALSE" ] \
[-uek1_include_plaintext_passkey "TRUE | FALSE" ] \
[-uek2_include_plaintext_passkey "TRUE | FALSE" ] \
[-script "script" ]
The following is the syntax for the Export Bitstream File Tcl command for PolarFire SoC.export_bitstream_file [-file_name "file_name"] \
[-export_dir "export_dir"] \
[-format "PPD | DAT | HEX | STP | SPI" ] \
[-for_ihp "TRUE | FALSE" ] \
[-limit_SVF_file_size "TRUE | FALSE" ] \
[-limit_SVF_file_by_max_filesize_or_vectors "limit_SVF_file_by_max_filesize_or_vectors" ] \
[-svf_max_filesize "svf_max_filesize" ] \
[-svf_max_vectors "svf_max_vectors" ] \
[-master_file "TRUE | FALSE" ] \
[-master_file_components "SECURITY | FABRIC | SNVM | ENVM | FABRIC_SNVM" ] \
[-encrypted_uek1_file "TRUE | FALSE" ] \
[-encrypted_uek1_file_components "FABRIC | SNVM | ENVM | FABRIC_SNVM" ] \
[-encrypted_uek2_file "TRUE | FALSE"] \
[-encrypted_uek2_file_components "FABRIC | SNVM | ENVM | FABRIC_SNVM" ] \
[-trusted_facility_file "TRUE | FALSE"] \
[-trusted_facility_file_components "FABRIC | SNVM | ENVM | FABRIC_SNVM" ] \
[-zeroization_likenew_action "TRUE | FALSE" ] \
[-zeroization_unrecoverable_action "TRUE | FALSE" ] \
[-master_backlevel_bypass "TRUE | FALSE" ] \
[-uek1_backlevel_bypass "TRUE | FALSE" ] \
[-uek2_backlevel_bypass "TRUE | FALSE" ] \
[-master_include_plaintext_passkey "TRUE | FALSE" ] \
[-uek1_include_plaintext_passkey "TRUE | FALSE" ] \
[-uek2_include_plaintext_passkey "TRUE | FALSE" ] \
[-sanitize_snvm "TRUE | FALSE" ] \
[-sanitize_envm "TRUE | FALSE" ] \
[-trusted_facility_keep_fabric_operational "TRUE | FALSE" ] \
[-trusted_facility_skip_startup_seq "TRUE | FALSE" ] \
[-uek1_keep_fabric_operational "TRUE | FALSE" ] \
[-uek1_skip_startup_seq "TRUE | FALSE" ] \
[-uek1_high_water_mark {1234} ] \
[-uek2_keep_fabric_operational "TRUE | FALSE" ] \
[-uek2_skip_startup_seq "TRUE | FALSE" ] \
[-uek2_high_water_mark {1234} ] \
Arguments
Parameter | Type | Description |
---|---|---|
file | string | Specifies the name of the file that will be exported. The default file name is the design name. Important: File name must start with the design name. |
export_dir | string | Specifies the directory location for the export. By default, the file is saved in the <designer>/<design_name>/export directory. |
format | string | Specifies the bitstream file formats to be exported. Space is used as a delimiter. The value can be any one of PPD, STP, CHAIN_STP, DAT, SPI, HEX, and SVF. If omitted, PPD and DAT files will be exported. Note:
|
for_ihp | boolean | Specifies the export of bitstream files for Microchip In-House Programming (IHP). Valid values are: TRUE, true, 1, FALSE, false, 0. The default value is 0. |
limit_SVF_file_size | boolean | Specifies limit on the SVF file size. Valid values are: TRUE, true, 1, FALSE, false, 0. |
limit_SVF_file_by_max_filesize_or_vectors | boolean | Specifies limit on the SVF file size or vectors number. Valid values are: TRUE, true, 1, FALSE, false, 0. |
svf_max_filesize | integer | Specifies svf file maximum size. It is equal to or greater than 0 KB. |
svf_max_vectors | integer | Specifies maximum number of vectors in file. It must be equal to or greater than 0. |
script | string | Absolute path of script file. This is an optional parameter. |
force_rtg4_otp | boolean | Enforces the use of One-Time Programming (OTP). It is optional. Valid values are: TRUE, true, 1, FALSE, false, 0. Default is 0. |
uek2_high_water_mark | integer | High Water Mark (HWM) is required for SPI files only if atleast one locked component (not permanently locked) is selected and OWP is enabled. If OWP is disabled, HWM is disabled too. An error is generated if the HWM is not specified when required. You must keep a track of the HWM and ensure the value is increasing. Important: HWM value for UEK1 file is not required. HWM for UEK1 and HWM for UEK2 cannot be equal. The HWM value can be upto 32 HEX characters. 0 is an illegal value. |
Security-Related Options
trusted_facility file
, master_file
, encrypted_uek1_file,
and encrypted_uek2_file
, or encrypted_uek3_file
must be set to 1. 1 indicates that this particular file type will be exported; 0 indicates that it will not be exported. For example, if trusted_facility_file
is set to 1, all other file types must be set to 0.If trusted_facility_file
is set to 0, a combination of master_file
and uek1_file
, uek2_file
, and uek3_file
can be set to 1. In this case, master_file must be set to 1.
Export the bitstream file as you may require the design components saved in the exported bitstream file.
Parameter | Type | Description |
---|---|---|
trusted_facility_file | boolean | Specifies the bitstream file to be exported.
|
trusted_facility_file_components | string | Specifies the components of the design that will be saved to the bitstream file. The default is FABRIC. The value can be:
|
Zeroization Options:
The following table lists the Zeroization options.
Parameter | Type | Description |
---|---|---|
zeroization_likenew_action | boolean | Specifies that all data will be erased, and the device can be reprogrammed immediately. |
zeroization_unrecoverable_action | boolean | Specifies that all data will be erased, and the device cannot be reprogrammed and must be scrapped. |
Custom Security Options
The following table lists the Custom security options.
Parameter | Type | Description |
---|---|---|
master_file | boolean | Specifies the bitstream files to be exported. Depends on the selected security. Important: If -master_file is 1, SECURITY must be selected. |
master_file_components | string | Specifies the components in the design that will be saved to the bitstream file.
Important:
|
encrypted_uek1_file | boolean | Specifies the bitstream file to be exported. Default is 0. Valid values are:
|
encrypted_uek1_file_components | string | Specifies the components of the design that will be saved to uek1 bitstream. The value can be any one or both of FABRIC and ENVM.
Important: sNVM should be programmed with FABRIC. |
encrypted_uek2_file | boolean | Specifies the bitstream file to be exported. Default is 0. Valid values are:
|
encrypted_uek2_file_components | string | Specifies the components of the design that will be saved to uek2 bitstream.
Important: sNVM should be programmed with FABRIC. |
encrypted_uek3_file | boolean | Specifies the bitstream file to be exported. Valid values are:
|
encrypted_uek3_file_components | string | Specifies the components of the design that will be saved to uek3 bitstream. The value can be any one or both of FABRIC and ENVM. |
master_include_plaintext_passkey | boolean | Specifies that the Initiator file includes plain text passkey. This argument is optional. |
uek1_include_plaintext_passkey | boolean | Specifies that uek1 includes plain text passkey. This argument is optional. |
uek2_include_plaintext_passkey | boolean | Specifies that uek2 includes plain text passkey. This argument is optional. |
uek3_include_plaintext_passkey | boolean | Specifies that uek3 includes plain text passkey. This argument is optional. |
Bypass Back Level Protection Options
The following table lists the Bypass Back Level Protection options. These options are only supported by the SPI bitstream files. Export the bitstream file as you may require the design components saved in the exported bitstream file.
Parameter | Type | Description |
---|---|---|
master_backlevel_bypass | boolean | Specifies the Bypass Back Level protection for Golden/Recovery bitstream if back level protection is enabled in _master file. |
uek1_backlevel_bypass | boolean | Specifies the Bypass Back Level Protection for Golden/Recovery bitstream if back level protection is enabled in _uek1 file. |
uek2_backlevel_bypass | boolean | Specifies the Bypass Back Level Protection for Golden/Recovery bitstream if back level protection is enabled in _uek2 file. |
SPI-Related Options
The following table lists the SPI-related options. These are optional.
Parameter | Type | Description |
---|---|---|
add_golden_image | boolean |
|
golden_image_address | string | 32-bit hexadecimal address for golden image. |
golden_image_design_version | string | Decimal value for golden image design version. |
add_update_image | boolean |
|
update_image_address | string | Hexadecimal value for update image address. |
update_image_design_version | string | Decimal value for update image design version. |
Serialization Options
The following table lists the serialization options. These are optional.
Parameter | Type | Description |
---|---|---|
serialization_stapl_type | string | Serialization stapl file type either SINGLE or MULTIPLE. Default is SINGLE. |
serialization_target_solution | string | Target programming hardware – Flashpro_3_4_5 or generic_STAPL_player. Default is Flashpro_3_4_5. |
Advanced Options
The following table lists the advanced options. These options are available for PolarFire SoC device family only.
Parameter | Type | Description |
---|---|---|
trusted_facility_keep_fabric_operational | boolean | Specifies to keep fabric in operational state during programming if file is programmed at a trusted facility. Valid values are: TRUE, true, 1, FALSE, false, 0. |
trusted_facility_skip_startup_seq | boolean | Specifies to skip device start-up sequence after programming if file is programmed at a trusted facility and trusted_facility_keep_fabric_operational is TRUE. Valid values are: TRUE, true, 1, FALSE, false, 0. |
uek1_keep_fabric_operational | boolean | Specifies to keep fabric in operational state during programming if file is encrypted using UEK1 custom security. Valid values are: TRUE, true, 1, FALSE, false, 0. |
uek1_skip_startup_seq | boolean | Specifies to skip device start-up sequence after programming if file is programmed using UEK1 custom security and uek1_keep_fabric_operational is TRUE. Valid values are: TRUE, true, 1, FALSE, false, 0. |
uek2_ keep_fabric_operational | boolean | Specifies to keep fabric in operational state during programming if file is programmed using UEK2 custom security. Valid values are: TRUE, true, 1, FALSE, false, 0. |
uek2_ skip_startup_seq | boolean | Specifies to skip device start-up sequence after programming if file is programmed using UEK2 custom security and uek2_keep_fabric_operational is TRUE. Valid values are: TRUE, true, 1, FALSE, false, 0. |
Error Codes
Error Code | Description |
---|---|
None | Warning: SPI Directory options are not supported for RTG4™ devices and will be ignored. |
None | Incorrect Update SPI Image address format. Address must be 32-bit HEX number. |
None | Golden SPI Image parameters are required to export SPI directory. |
None | Export SPI files is not supported. Export SVF files is not supported. |
None | You have not configured custom security options. You can only export bitstream files to program at trusted facility. |
Supported Families
Supported Families |
---|
PolarFire® |
RTG4™ |
SmartFusion® 2 |
IGLOO® 2 |
Example
Export bitstream file for design with default security:
export_bitstream_file \
-trusted_facility_file 1 \
-trusted_facility_file_components {FABRIC}
Export bitstream file for design with custom security options.
Export bitstreams to Initiator, uek1 and uek2 encrypted files. Initiator file to include security, fabric components and Export Pass Key in Plaintext, uek1 and uek2 encrypted files to include FABRIC with Like new Zeroization option enabled.
export_bitstream_file\
-file_name {fftousram_new} \
-export_dir
{X:\10_docs_review\pf2.2_sp1\Programming_sars\99412\clkint_fftousram_ac_latch_launch\des
igner\fftousram_new\export} \
-format {PPD DAT STP HEX} \
-for_ihp 1 \
-master_file 1 \
-master_file_components {SECURITY FABRIC} \
-encrypted_uek1_file 1 \
-encrypted_uek1_file_components {FABRIC} \
-encrypted_uek2_file 1 \
-encrypted_uek2_file_components {FABRIC} \
-trusted_facility_file 0 \
-trusted_facility_file_components {} \
-zeroization_likenew_action 1 \
-zeroization_unrecoverable_action 0 \
-master_backlevel_bypass 0 \
-uek1_backlevel_bypass 0 -uek2_backlevel_bypass 0 \
-master_include_plaintext_passkey 1 \
-uek1_include_plaintext_passkey 0 \
-uek2_include_plaintext_passkey 0
The following example, intented for SmartFusion 2 and IGLOO 2 families, exports SPI directory for programming recovery:
export_bitstream_file \
-add_golden_image 1 \
-golden_image_address {1111} \
-golden_image_design_version {1} \
-add_update_image 1 \
-update_image_address {1211} \
-update_image_design_version {1}
The following example exports bitstream file for design with MSS/serialization clients. This example failed in case of PolarFire family.
export_bitstream_file \
-file_name {mss1} \
-format {STP} \
-trusted_facility_file 1 \
-trusted_facility_file_components {FABRIC} \
-serialization_stapl_type {SINGLE} \
-serialization_target_solution {FLASHPRO_3_4_5}