21.3.32 export_bitstream_file

Description

This Tcl command configures the parameters for the bitstream to be exported from Libero.
Important: RTG4 and PolarFire devices do not support the security, SPI directory, or serialization options that SmartFusion 2 and IGLOO 2 devices support.
The following is the syntax for the Export Bitstream File Tcl command for SmartFusion 2, IGLOO 2, and RTG4.
Important: The Tcl script file exported from Libero will include all command options. You can modify or remove the options.
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.
Important: High water mark values are needed when One Way Passcode (OWP) is enabled and SPI file is being exported.
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

ParameterTypeDescription
filestringSpecifies 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_dirstringSpecifies the directory location for the export. By default, the file is saved in the <designer>/<design_name>/export directory.
formatstringSpecifies 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:
  • Exporting CHAIN_STP, SVF, and SPI files is not supported in RTG4.
  • Exporting CHAIN_STP and SVF files is not supported in PolarFire.
for_ihpbooleanSpecifies 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_sizebooleanSpecifies limit on the SVF file size. Valid values are: TRUE, true, 1, FALSE, false, 0.
limit_SVF_file_by_max_filesize_or_vectorsbooleanSpecifies limit on the SVF file size or vectors number. Valid values are: TRUE, true, 1, FALSE, false, 0.
svf_max_filesizeintegerSpecifies svf file maximum size. It is equal to or greater than 0 KB.
svf_max_vectorsintegerSpecifies maximum number of vectors in file. It must be equal to or greater than 0.
scriptstringAbsolute path of script file. This is an optional parameter.
force_rtg4_otpbooleanEnforces 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_markintegerHigh 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

The following table lists the Security-related options.
Important: One of the 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.

ParameterTypeDescription
trusted_facility_filebooleanSpecifies the bitstream file to be exported.
  • 1 - Indicates that this particular file type will be exported.
  • 0 - Indicates that it will not be exported.
trusted_facility_file_componentsstringSpecifies the components of the design that will be saved to the bitstream file. The default is FABRIC. The value can be:
  • PolarFire® - one or any combination of FABRIC, SNVM, ENVM, or FABRIC_SNVM.
  • SmartFusion® 2, IGLOO® 2, and RTG4 - one or any combination of FABRIC, ENVM.

Zeroization Options:

The following table lists the Zeroization options.

ParameterTypeDescription
zeroization_likenew_actionbooleanSpecifies that all data will be erased, and the device can be reprogrammed immediately.
zeroization_unrecoverable_actionbooleanSpecifies 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.

ParameterTypeDescription
master_filebooleanSpecifies the bitstream files to be exported. Depends on the selected security.
Important: If -master_file is 1, SECURITY must be selected.
master_file_componentsstringSpecifies the components in the design that will be saved to the bitstream file.
  • PolarFire® - SECURITY, FABRIC, SNVM, FABRIC_SNVM, ENVM
  • SmartFusion® 2, IGLOO® 2, and RTG4 - SECURITY, FABRIC, ENVM
Important:
  1. The SECURITY option is available in -bitstream_file_components only when file type is ​INITIATOR in -bitstream_file_type.
  2. SNVM must be programmed with FABRIC.
  3. Security-only programming must be performed only on erased or new devices. If performed on device with fabric programmed, the fabric will be disabled after performing security-only programming. You must reprogram the fabric to re-enable it.
encrypted_uek1_filebooleanSpecifies the bitstream file to be exported. Default is 0. Valid values are:
  • 1 - indicates that this particular file type will be exported.
  • 0 - indicates that it will not be exported.
encrypted_uek1_file_componentsstringSpecifies the components of the design that will be saved to uek1 bitstream. The value can be any one or both of FABRIC and ENVM.
  • PolarFire - FABRIC, ENVM, FABRIC_SNVM, SNVM
  • SmartFusion 2, IGLOO 2, and RTG4 - FABRIC, ENVM
Important: sNVM should be programmed with FABRIC.
encrypted_uek2_filebooleanSpecifies the bitstream file to be exported. Default is 0. Valid values are:
  • 1 - indicates that this particular file type will be exported.
  • 0 - indicates that it will not be exported.
encrypted_uek2_file_componentsstringSpecifies the components of the design that will be saved to uek2 bitstream.
  • PolarFire - FABRIC, ENVM, FABRIC_SNVM, SNVM.
  • SmartFusion 2, IGLOO 2 and RTG4 - FABRIC, ENVM.
Important: sNVM should be programmed with FABRIC.
encrypted_uek3_filebooleanSpecifies the bitstream file to be exported. Valid values are:
  • 1 - indicates that this particular file type will be exported.
  • 0 - indicates that it will not be exported.
encrypted_uek3_file_componentsstringSpecifies 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_passkeybooleanSpecifies that the ​Initiator file includes plain text passkey. This argument is optional.
uek1_include_plaintext_passkeybooleanSpecifies that uek1 includes plain text passkey. This argument is optional.
uek2_include_plaintext_passkeybooleanSpecifies that uek2 includes plain text passkey. This argument is optional.
uek3_include_plaintext_passkeybooleanSpecifies 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.

ParameterTypeDescription
master_backlevel_bypassbooleanSpecifies the Bypass Back Level protection for Golden/Recovery bitstream if back level protection is enabled in _master file.
uek1_backlevel_bypassbooleanSpecifies the Bypass Back Level Protection for Golden/Recovery bitstream if back level protection is enabled in _uek1 file.
uek2_backlevel_bypassbooleanSpecifies 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.

ParameterTypeDescription
add_golden_imageboolean
  • 1 - To enable golden SPI image in SPI direct.
  • 0 - To disable golden SPI image in SPI direct.
golden_image_addressstring32-bit hexadecimal address for golden image.
golden_image_design_versionstringDecimal value for golden image design version.
add_update_imageboolean
  • 1 - To enable golden update SPI image.
  • 0 - To disable golden update SPI image.
update_image_addressstringHexadecimal value for update image address.
update_image_design_versionstringDecimal value for update image design version.

Serialization Options

The following table lists the serialization options. These are optional.

ParameterTypeDescription
serialization_stapl_typestringSerialization stapl file type either SINGLE or MULTIPLE. Default is SINGLE.
serialization_target_solutionstringTarget 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.

ParameterTypeDescription
trusted_facility_keep_fabric_operationalbooleanSpecifies 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_seqbooleanSpecifies 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 booleanSpecifies 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_seqbooleanSpecifies 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_operationalbooleanSpecifies 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_seqbooleanSpecifies 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 CodeDescription
NoneWarning: SPI Directory options are not supported for RTG4 devices and will be ignored.
NoneIncorrect Update SPI Image address format. Address must be 32-bit HEX number.
NoneGolden SPI Image parameters are required to export SPI directory.
NoneExport SPI files is not supported. Export SVF files is not supported.
NoneYou 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}