Intel® Quartus® Prime Pro Edition User Guide: Platform Designer

ID 683609
Date 12/20/2023
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

7.3. Board-Aware Flow Scripting Support

The following Tcl commands support the board-aware flow, including preset and board file management, and board and preset file export. For examples use of these commands, refer to Example 1 and Example 2.
Table 201.  General Commands
Return Command Argument
No return value set_project_property BOARD <board_name>
String get_project_property BOARD
Table 202.  Preset Commands
Return Command Argument
no return value save_component_preset [<preset_file> <preset_name> <preset_description> <preset_version> <board_name> <category> <pin_file.tcl>]
no return value apply_component_preset <preset_name>
Table 203.  Board Commands
Return Command Argument
no return value add_board <board_file> <board_name> <vendor> <device_family> <device_part> <version>
String get_board_info <board_name> <info_type>

<info_type> can be vendor, device_family, device_part, version

String get_boards [<device_family> <device_part>]

Returns all board names.

no return value delete_board <board_name>
Table 204.  Export Board and Presets from Current System Commands
Return Command Argument
no return value export_board_file <board_name> <board_file> [<vendor> <version>]

String[]

Instance_paths
get_quartus_instance_path_for_entity [<entity_name>]

Returns a list of instance paths in hierarchical format. For example:

  • quartus_top.qsys_instance_name
  • quartus_top.something.qsys_instance_name
no return value load_pin_from_quartus_project <instance_path>
No return value export_system_preset [preset_directory_path]
Note: By default the preset_file_name is system_name.qprs.

Example 1: Create System, Add Component, Apply Built-In Preset

# create the system
create_system test_system
set_project_property BOARD {Arria 10 SoC Development Kit}
set_project_property HIDE_FROM_IP_CATALOG {false}
set_use_testbench_naming_pattern 0 {}
# add component pio0
add_component pio_0 ip/test_system/test_system_pio_0.ip altera_avalon_pio pio_0 19.2.0
load_component pio_0

#assume this led4 preset file path is in the search path
apply_component_preset led4 
save_component

Example 2: Create New Preset, Apply Preset with Pin Constraints File

Example of led4_pins.tcl file:

set_instance_assignment -to "led_export[0]" -name IO_STANDARD "1.8 V"
set_location_assignment -to "led_export[0]" "PIN_AR23"
set_instance_assignment -to "led_export[1]" -name IO_STANDARD "1.8 V"
set_location_assignment -to "led_export[1]" "PIN_AR22"
set_instance_assignment -to "led_export[2]" -name IO_STANDARD "1.8 V"
set_location_assignment -to "led_export[2]" "PIN_AM21"
set_instance_assignment -to "led_export[3]" -name IO_STANDARD "1.8 V"
set_location_assignment -to "led_export[3]" "PIN_AL20"

Script:

add_component pio_0 ip/sys/sys_pio_0.ip altera_avalon_pio pio_0 19.2.0
load_component pio_0          
set_component_parameter_value bitClearingEdgeCapReg {0}
set_component_parameter_value bitModifyingOutReg {0}
set_component_parameter_value captureEdge {0}
set_component_parameter_value direction {Output}
set_component_parameter_value edgeType {RISING}
set_component_parameter_value generateIRQ {0}
set_component_parameter_value irqType {LEVEL}
set_component_parameter_value resetValue {0.0}
set_component_parameter_value simDoTestBenchWiring {0}
set_component_parameter_value simDrivenValue {0.0}
set_component_parameter_value width {4}
set_component_project_property HIDE_FROM_IP_CATALOG {false}
# export interface first, then only import the pin constraint tcl file
set_interface_property led EXPORT_OF pio_0.external_connection
save_component_preset led4_demo.qprs led4_demo "" ALL "Arria 10 SoC Development Kit" "IO" led4_pins.tcl
apply_component_preset led4_demo
save_component