AN 1002: Sharing Platform Designer Packaged Subsystems

ID 786899
Date 10/02/2023
Public
Document Table of Contents

4.4.3. Step 4b: Enable or Disable Modules and Checkboxes

The following code enables all the contained modules, and enables or disables the parameter checkboxes. get_parameter_value reads the current parameter value. This code runs upon elaboration, so the code must be within the proc elaboration_callback.

Note: For details on this command, refer to the Parameters topic and the Control Interfaces Dynamically with an Elaboration Callback topic of the Intel Quartus Prime Pro Edition User Guide: Platform Designer.

For TX, the value can be true or false because this is a boolean parameter. From this value, the script enables or disables the remaining checkboxes so that only one checkbox can be true at any time. The script also performs this same operation for the RX parameter and checkbox. Finally, the script creates two variables. These variables are later passed to the run_system_script command.

proc elaboration_callback {} {
enable_all_instances
if { [get_parameter_value TX] } {
      set_parameter_property RX ENABLED false 
} else {
       set_parameter_property RX ENABLED true 
}
if { [get_parameter_value RX] } {
 set_parameter_property TX ENABLED false
} else {
 set_parameter_property TX ENABLED true
}
set transmitter [get_parameter_value TX]
set receiver [get_parameter_value RX]
Figure 14. Enabling or Disabling Modules and Checkboxes