Visible to Intel only — GUID: mwh1409958621055
Ixiasoft
Visible to Intel only — GUID: mwh1409958621055
Ixiasoft
1.8.1. Creating an Instance Parameter Script in Platform Designer
package require -exact qsys <version>
To use Tcl commands that work with instance parameters in the instance script, you must specify the commands within a Tcl composition callback. In the instance script, you specify the name for the composition callback with the following command:
set_module_property COMPOSITION_CALLBACK <name of callback procedure>
Specify the appropriate Tcl commands inside the Tcl procedure with the following syntax:
proc <name of procedure defined in previous command> {} {#Tcl commands to query and set parameters go here}
Instance Parameter Script Example
In this example, an instance script uses the pio_width parameter to set the width parameter of a parallel I/O (PIO) component. The script combines the get_parameter_value and set_instance_parameter_value commands using brackets.
# Request a specific version of the scripting API
package require -exact qsys 13.1
# Set the name of the procedure to manipulate parameters:
set_module_property COMPOSITION_CALLBACK compose
proc compose {} {
# Get the pio_width parameter value from this Platform Designer system and
# pass the value to the width parameter of the pio_0 instance
set_instance_parameter_value pio_0 width \
[get_parameter_value pio_width]
}