Quartus: Add dependencies from external file

Viewed 168

I have lots of FPGA projects and some generic components shared among them. I’m searching for a way to add these components through an external file, so I can easily add new components to all my projects.

I’ve moved all the

set_global_assignment -name VHDL_FILE x.vhd
set_global_assignment -name VHDL_FILE y.vhd

statements from the QSF to a separate TCL file and included it using

set_global_assignment -name SOURCE_TCL_SCRIPT_FILE library.tcl

This is almost what I want, but when modifying the file list from the GUI all components from this TCL script are added to the QSF file again. Is there a way to prevent this?

1 Answers

Could you do something like use TCL in the QSF to create a series of statements programatically from a manifest file that contains a list of files you need:

proc readData {filename} {
    set f [open $filename r]
    foreach line [split [read $f] \n] {
        set_global_assignment -name VHDL_FILE $line
    }
}
Related