Forum Discussion
JHill1
Occasional Contributor
1 year agoscripting platform designer insertion of ip files into quartus project
We are recently moving from Quartus 17 to Quartus 22, and have in the past assembled our Quartus project using TCL scripts. We encounter some problems when we try hard to continue using Platform D...
JHill1
Occasional Contributor
1 year agoOk, FWIW, it is quite possible to automate what the platform designer GUI does to your quartus project when changing to a new quartus project using its menus.
After I worked through some issues with TCL, this is the TCL I wrote for use with a qsys-script.
package require qsys 22.1 proc scan_system {} { # get all instance names in the system and print one by one set instances [ get_instances ] foreach inst $instances { examine_instance $inst } } # recursively print all instances in the system proc examine_instance { inst } { set enabled [ get_instance_property $inst "ENABLED" ] if { $enabled != "true" } { return } set class [ get_instance_property $inst "CLASS_NAME" ] if { $class == "altera_generic_component" } { set success [ load_component $inst ] if { ! $success } { return } set component_class [ get_component_property "CLASS_NAME" ] set success [ load_instantiation $inst ] if { ! $success } { return } set ip_file [ get_instantiation_property "IP_FILE" ] puts "set_global_assignment -name IP_FILE $ip_file" } else { set encl_system_file [ get_module_property "FILE" ] set inst_file [ get_instance_property $inst "FILE" ] if { [ catch {load_system $inst_file} ] } { exit 1 puts stderr "Could not load $class.qsys\n" } else { puts "set_global_assignment -name QSYS_FILE $inst_file" scan_system } load_system $encl_system_file } } scan_system