Intel® Quartus® Prime Software
Intel® Quartus® Prime Design Software, Design Entry, Synthesis, Simulation, Verification, Timing Analysis, System Design (Platform Designer, formerly Qsys)
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
17268 Discussions

Executing a user added TCL script

SKon1
Novice
945 Views

Hello,

If I write the following 2 lines of code inside Quartus TCL console:

set f [open d:/some_file.vhd w]
close $f 

I get a file named "some_file.vhd" created in d:/ of my PC.
I wanted this file to be created every time I run compilation - so my idea was to write these two lines inside a TCL file named: "some_script.tcl" and add this file to my Quartus project as a source file.
I did that but it doesn't work. It seems like the script inside the TCL file doesn't run and the file isn't created.

What did I do wrong ?

0 Kudos
2 Replies
mfro
New Contributor I
935 Views

That's not how it works.

If you want to execute a specific .tcl script everytime you start the Quartus compilation process (which is what I understood you wanted to do), you need to manually add another line to your <project>.qsf file:

 

set_global_assignment -name PRE_FLOW_SCRIPT_FILE "quartus_sh:<your_tcl_file>.tcl"
0 Kudos
SyafieqS
Employee
927 Views

Hi Kon,


You may refer to below links for Quartus II Tcl Example: Automatic Script Execution

https://www.intel.com/content/www/us/en/programmable/support/support-resources/design-examples/design-software/tcl/auto_processing.html


In your case, you have to modify your .qsf file and add following line 


set_global_assignment -name PRE_FLOW_SCRIPT_FILE "quartus_sh:<your_tcl_file>.tcl"


Thanks,

Regards



0 Kudos
Reply