Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Novice
41 Views

Executing a user added TCL script

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
Highlighted
New Contributor I
31 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
Highlighted
Moderator
23 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



0 Kudos