21.6.13 PROGRAMDEVICE

Description

"PROGRAMDEVICE" is a command tool used in configure_tool and run_tool. Configure_tool allows you to configure the tool’s parameters and values prior to executing the tool. "run_tool" executes the tool with the configured parameters. To program the design in Libero SoC, you must first configure the "PROGRAMDEVICE" tool with configure_tool command and then execute the "PROGRAMDEVICE" command with the run_tool command. Use the commands to configure the programming action and the programming procedures associated with the program action.

configure_tool -name {PROGRAMDEVICE} \
               -params {prog_action: params_value}
run_tool -name {PROGRAMDEVICE}

Arguments

ParameterTypeDescription
prog_actionstringThe acceptable values for this argument are the following:
  • PROGRAM - Programs all selected family features: FPGA Array, targeted eNVM clients and security settings. Mandatory procedures are: INIT_VARIABLES_FOR_ACTION, SET_PROGRAM_ACTIONTYPE, VERIFY_IDCODE, PROC_ENABLE, DO_PROGRAM, DO_VERIFY (optional) and DO_EXIT.
  • VERIFY - Verifies all selected family features: FPGA Array, targeted eNVM clients and security settings. Mandatory procedures are: INIT_VARIABLES_FOR_ACTION, SET_VERIFY_ACTIONTYPE, VERIFY_IDCODE, PROC_ENABLE, DO_VERIFY and DO_EXIT.
  • ERASE - Erases the selected family features: FPGA Array and security settings. Mandatory procedures are: INIT_VARIABLES_FOR_ACTION, SET_ERASE_ACTIONTYPE, VERIFY_IDCODE, PROC_ENABLE, DO ERASE and DO_EXIT.
  • DEVICE_INFO - Displays the IDCODE, the design name, the checksum, and device security settings and programming environment information programmed into the device. Mandatory procedures are: INIT_VARIABLES_FOR_ACTION, SET_DEVICE_INFO_ACTIONTYPE, VERIFY_IDCODE, DO_DEVICE_INFO and DO_EXIT.
  • READ_IDCODE - Reads the device ID code from the device. Mandatory procedures are: INIT_VARIABLES_FOR_ACTION, SET_READ_IDCODE, VERIFY_IDCODE, PRINT_IDCODE and DO_EXIT.
  • ENC_DATA_AUTHENTICATION - Encrypted bitstream authentication data. Mandatory procedures are: INIT_VARIABLES_FOR_ACTION, SET_AUTHORIZATION_ACTIONTYPE, VERIFY_IDCODE, DO_AUTHENTICATION and DO_EXIT.
  • VERIFY_DIGEST - Calculates the digests for the components included in the bitstream and compares them against the programmed values. Mandatory procedures are: INIT_VARIABLES_FOR_ACTION, VERIFY_IDCODE, PROC_ENABLE, DO_ENABLE_FABRIC (recommended), DO_ENABLE_SECURITY (recommended), DO_VERIFY_DIGEST (recommended) and DO_EXIT.
  • READ_DEVICE_CERTIFICATE - Reads the device certificate from the device.
Return TypeDescription
IntegerReturns 0 on success and 1 on failure.

Error Codes

Error CodeDescription
NoneNone

Supported Families

Supported Families
PolarFire®
PolarFire SoC
RTG4
SmartFusion® 2
IGLOO® 2

Example

The following example configures "PROGRAMDEVICE" tool to display the IDCODE, design name, device security settings and calculates the digests:

configure_tool -name {PROGRAMDEVICE} \
               -params {prog_action:VERIFY_DIGEST} \
               -params {prog_action:DEVICE_INFO}
run_tool -name {PROGRAMDEVICE} #run_tool takes no parameters