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

ID 683364
Date 12/15/2018
Public
Document Table of Contents

1.16.7.2. Add Platform Designer Instance Parameters

The Instance Parameters tab allows you to define parameters to control the implementation of a subsystem component. Each column in the Instance Parameters table defines a property of the parameter. This procedure creates instance parameters in a Platform Designer system to be used as a subsystem in a higher-level system.
  1. In the memory_system.qsys system, click View > Instance Parameters.
  2. Click Add Parameter.
  3. In the Name and Display Name columns, rename the new_parameter_0 parameter to component_data_width.
  4. For component_data_width, select Integer for Type, and 8 as the Default Value.
  5. Click Add Parameter.
  6. In the Name and Display Name columns, rename the new_parameter_0 parameter to component_memory_size.
  7. For component_memory_size, select Integer for Type, and 1024 as the Default Value.
    Figure 38.  Platform Designer Instance Parameters Tab
  8. In the Instance Script section, type the commands that control how Platform Designer passes parameters to an instance from the higher-level system. For example, in the script below, the onchip_memory_0 instance receives its dataWidth and memorySize parameter values from the instance parameters that you define.
    # request a specific version of the scripting API
    package require -exact qsys 15.0
    
    # Set the name of the procedure to manipulate parameters
    set_module_property COMPOSITION_CALLBACK compose
    
    proc compose {} {
         # manipulate parameters in here
         set_instance_parameter_value onchip_memory_0 dataWidth [get_parameter_value component_data_width]
         set_instance_parameter_value onchip_memory_0 memorySize [get_parameter_value component_memory_size]
    
         set value [get_instance_parameter_value onchip_memory_0 dataWidth]
             send_message info "Value of onchip memory ram data width is $value "
    }
  9. Click Preview Instance to open the parameter editor GUI.
    Preview Instance allows you to see how an instance of a system appears when you use it in another system.
    Figure 39. Preview an Instance in the Parameter Editor
  10. Click File > Save.