Quartus® Prime Pro Edition User Guide: Platform Designer

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

8.1.2.6. get_string

Description

Returns the value of an externalized string previously loaded by the load_strings command.

Availability

Discovery, Main Program, Edit, Elaboration, Validation, Generation, Composition, Fileset Generation, Parameter Upgrade

Usage

get_string <identifier>

Returns

The externalized string.

Arguments

identifier
The string identifier.

Example

hw.tcl:
load_strings test.properties
set_module_property NAME test
set_module_property VERSION [get_string VERSION]
set_module_property DISPLAY_NAME [get_string DISPLAY_NAME]
add_parameter firepower INTEGER 0 ""
set_parameter_property firepower DISPLAY_NAME [get_string PARAM_DISPLAY_NAME]
set_parameter_property firepower TYPE INTEGER
set_parameter_property firepower DESCRIPTION [get_string PARAM_DESCRIPTION]

test.properties:
DISPLAY_NAME = Trogdor!
VERSION = 1.0
PARAM_DISPLAY_NAME = Firepower
PARAM_DESCRIPTION = The amount of force to use when breathing fire.

Notes

Use uppercase words separated with underscores to name string identifiers. If you are externalizing module properties, use the module property name for the string identifier:
set_module_property DISPLAY_NAME [get_string DISPLAY_NAME]
If you are externalizing a parameter property, qualify the parameter property with the parameter name, with uppercase format, if needed:
set_parameter_property my_param DISPLAY_NAME [get_string MY_PARAM_DISPLAY_NAME]
If you use a string to describe a string format, end the identifier with _FORMAT.
set formatted_string [ format  [ get_string TWO_ARGUMENT_MESSAGE_FORMAT ] "arg1" "arg2" ]