Forum Discussion

wa_itd's avatar
wa_itd
Icon for New Contributor rankNew Contributor
5 hours ago

How to create a Packaged Subsystem in TCL

I am hoping to create a script which will automatically package the IP I am working on as a packaged subsystem.

So far, I have automated the creation of an IP directory which describes a new component using a _hw.tcl file and the various source files. I believe the next step is to take this component, instantiate it in a Platform Designer system, and create a Packaged Subsystem using it.

I am also hoping that I can parameterise and hide/modify ports of the packaged subsystem, like I can with the _hw.tcl component description.

I am encountering a problem; I am running the following command:

qsys-script --script=create_packaged_subsystem.tcl --new-quartus-project=my_project_name

However, the script fails for the following reason:

Error: invalid command name "set_package_property"

Here is the script itself (more or less a copy-and-paste from the GUI):

package require -exact qsys 26.1

set_package_property NAME "packagename"
set_package_property DISPLAY_NAME "PackageName"
set_package_property VERSION "1.0"
set_package_property GROUP "GroupName"
set_package_property DESCRIPTION "A descripton."
set_package_property ELABORATION_CALLBACK elaboration_callback
set_package_property EXTRACTION_CALLBACK extraction_callback

add_fileset synth_fileset QUARTUS_SYNTH fileset_callback "Quartus Synthesis Fileset"
add_fileset sim_verilog_fileset SIM_VERILOG fileset_callback "Simulation Verilog Fileset"

proc elaboration_callback {} {
    enable_all_instances
}

proc extraction_callback {} {
    extract_modules
}

proc fileset_callback { output_name } {
    generate_all_instances
}

Any help would be hugely appreciated, on this issue and on my general workflow. Also if it is possible to encrypt packaged subsystems or components using Quartus I'd be keen to know. Thanks!

No RepliesBe the first to reply