Intel® Quartus® Prime Software
Intel® Quartus® Prime Design Software, Design Entry, Synthesis, Simulation, Verification, Timing Analysis, System Design (Platform Designer, formerly Qsys)
Announcements
Intel Support hours are Monday-Fridays, 8am-5pm PST, except Holidays. Thanks to our community members who provide support during our down time or before we get to your questions. We appreciate you!

Need Forum Guidance? Click here
Search our FPGA Knowledge Articles here.
15543 Discussions

Executing a user added TCL script

SKon1
Novice
246 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
236 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"
SyafieqS
Moderator
228 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/desig...


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



Reply