Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
11 years ago

TCL scripting with PRE_FLOW_SCRIPT_FILE

Hi!

Including the following line in my QSF-File calls the TCL-Script before compilation to generate a timestamp form y FPGA.

set_global_assignment -name pre_flow_script_file "quartus_sh:compile_timestamp_make.tcl"

In addition to timestamp generation I have further things to do prior to compilation.

I want to extract the revision number from subversion.

Thus I wrote another TCL to do this and added another line to the QSF-File:

set_global_assignment -name pre_flow_script_file "quartus_sh:compile_timestamp_make.tcl"

set_global_assignment -name pre_flow_script_file "quartus_sh:compile_svn_revision_make.tcl"

Unfortunately this does not work.

It seems to me that QuartusII can only handle one single TCL File with „PRE_FLOW_SCRIPT_FILE“

Is this correct or is there a way to handle multiple TCLs with „PRE_FLOW_SCRIPT_FILE“?

Thanks a lot for any help

mschultheis

2 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Hi,

    You could put all your code in one file or make a general preprocessing TCL file that calls other TCL files, e.g.:

    QSF:

    set_global_assignment -name PRE_FLOW_SCRIPT_FILE "quartus_sh:preprocessing.tcl"

    Contents of preprocessing.tcl:

    source compile_timestamp_make.tcl
    source compile_svn_revision_make.tcl

    The "source" keyword is a TCL command that evaluates another file as TCL code. See the tcl documentation (http://www.tcl.tk/man/tcl8.5/tclcmd/source.htm).

    Hope this helps!

    JBC
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Hi,

    yes this helps.

    It is an acceptable workaround.

    Thanks

    MSCHULTHEIS