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

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

5.16. Create an IP Component with Platform Designer a System View Different from the Generated Synthesis Output Files

There are cases where it may be beneficial to have the structural Platform Designer system view of a component differ from the generated synthesis output files. The structural composition callback allows you to define a structural hierarchy for a component separately from the generated output files.

One application of this feature is for IP designers who want to send out a placed-and-routed component that represents a Platform Designer system in order to ensure timing closure for their client or team-mate. In this case, the designer creates a design partition for the Platform Designer system, and then exports a post-fit Intel® Quartus® Prime Exported Partition File (.qxp) when satisfied with the placement and routing results.

The designer specifies a .qxp file as the generated synthesis output file for the new component. The designer can specify whether to use a simulation output fileset for the custom simulation model file, or to use simulation output files generated from the original Platform Designer system.

When the client or team-mate adds this component to their Platform Designer system, the designer wants the client or team-mate to see a structural representation of the component, including lower-level components and the address map of the original Platform Designer system. This structural view is a logical representation of the component that is used during the elaboration and validation phases in Platform Designer.

Structural Composition Callback and .qxp File as the Generated Output

To specify a structural representation of the component for Platform Designer, connect components or generate a hardware Tcl description of the Platform Designer system, and then insert the Tcl commands into a structural composition callback. To invoke the structural composition callback use the command:

set_module_property STRUCTURAL_COMPOSITION_CALLBACK structural_hierarchy

package require -exact qsys 14.0
set_module_property name example_structural_composition

set_module_property STRUCTURAL_COMPOSITION_CALLBACK \
structural_hierarchy
 
add_fileset synthesis_fileset QUARTUS_SYNTH \
synth_callback_procedure

add_fileset simulation_fileset SIM_VERILOG \
sim_callback_procedure

set_fileset_property synthesis_fileset TOP_LEVEL \
my_custom_component

set_fileset_property simulation_fileset TOP_LEVEL \
my_custom_component

proc structural_hierarchy {} {

# called during elaboration and validation phase
# exported ports should be same in structural_hierarchy  
# and generated QXP

# These commands could come from the exported hardware Tcl

	add_interface clk clock sink
	add_interface reset reset sink

	add_instance clk_0 clock_source	
	set_interface_property clk EXPORT_OF clk_0.clk_in	
	set_interface_property reset EXPORT_OF clk_0.clk_in_reset

	add_instance pll_0 altera_pll	
	# connections and connection parameters
	add_connection clk_0.clk pll_0.refclk clock
	add_connection clk_0.clk_reset pll_0.reset reset	
}

proc synth_callback_procedure { entity_name } {

# the QXP should have the same name for ports 
# as exportedin structural_hierarchy

 add_fileset_file my_custom_component.qxp QXP PATH \
 "my_custom_component.qxp"
}

proc sim_callback_procedure { entity_name } {

# the simulation files should have the same name for ports as
# exported in structural_hierarchy

add_fileset_file my_custom_component.v VERILOG PATH \ 
"my_custom_component.v"
 ….
 …. 
}