Quartus® Prime Pro Edition User Guide: Platform Designer

ID 683609
Date 9/30/2024
Public
Document Table of Contents

1.4.3.3. Generating Board and Presets for Existing Systems Using Command Line

The command line method of applying board and presets to existing systems implements the same steps in a script that you can perform in the Platform Designer GUI. To apply board and preset files to an existing Platform Designer system using the command line, you must first create a Tcl script that performs the following:

  1. Loads the correct Platform Designer package version number with package require.
  2. Imports the pin assignments from the corresponding Quartus® Prime Setting file (.qsf) with load_pin_from_quartus_project.
  3. Saves the system to apply the pin assignment to the system with save_system.
  4. Exports the system or IP presets and board file with export_system_preset.

The following shows an example script that implements these steps:

package require -exact qsys <version number> 
load_pin_from_quartus_project 
save_system
export_system_preset test_preset.qprs 
export_board_file "<board name>" <filename_board.xml>
Note: The <version number> must be 22.4 or later.

The following command runs the example script:

$ qsys-script --script=export.tcl --quartus-project=[test_project] \
     --system-file=[test_system.qsys] 

The following example shows the content of export.tcl if there is one instance in a Platform Designer system in the project:

package require -exact qsys 22.4  
load_pin_from_quartus_project 
export_system_preset ip/presets 
export_board_file "My Board" test_board.xml

The following example shows the content of export.tcl if there is more than one instance in a Platform Designer system in the project:

package require -exact qsys 22.4 
set instance_paths [get_quartus_instance_path_for_entity] 

# select the correct Quartus instance path for your \
    Platform Designer system (e.g using the 1st path) 

set my_instance_path [lindex $instance_paths 0] 
load_pin_from_quartus_project $my_instance_path 
export_system_preset ip/presets 
export_board_file "My Board" test_board.xml