AN 1002: Sharing Platform Designer Packaged Subsystems
ID
786899
Date
10/02/2023
Public
4.4.1. Editing the Packaged Subsystem
4.4.2. Step 4a: Add Two Checkbox Controls
4.4.3. Step 4b: Enable or Disable Modules and Checkboxes
4.4.4. Step 4c: Run run_system_script
4.4.5. Step 4d: Iterate Over All Parameters
4.4.6. Step 4e: Setting DisplayPort IP Functionality
4.4.7. Step 4f: Make Packaged Subsystem Unlockable
4.4.8. Step 4g: Sync System Infos, Assign Base Addresses, and Save
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