3

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?

Tricky
  • 3,791
  • 3
  • 10
  • 23
sebi707
  • 360
  • 2
  • 11

1 Answers1

0

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
    }
}
Charles Clayton
  • 17,005
  • 11
  • 87
  • 120
  • It seems you cannot use TCL inside the QSF file. If I try add your code the project won't load anymore. – sebi707 Oct 21 '19 at 07:26