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.
15340 Discussions

Find Quartus Project Directory Path via TCL

DZuck1
Novice
512 Views

Hi,

 

I am trying to use a TCL script to grab the project's SVN repo revision and place it into a register in my Quartus project. Using the example posted on the Intel website I was able to pull the SVN revision into my project.

 

The script pulls the revision of the .QPF file but I would like to pull the revision of the whole directory as the revision of the .QPF file may not be the latest revision of the project. When I commit new source files to SVN the revision of the QPF may not necessarily change.

 

I have added the following line to my QSF file:

set_global_assignment -name PRE_FLOW_SCRIPT_FILE "quartus_sh:svn_revision.tcl \$\{project\}.qpf"

I am hoping there is some Quartus variable that I can pass into the script to get the project directory path. Does anyone know what that variable is?

 

Thanks,

DZuck1

0 Kudos
2 Replies
JoanneSinY_L_Intel
140 Views

​Hi

 

Can you try to run without specify any project qsf path?

set_global_assignment -name PRE_FLOW_SCRIPT_FILE "quartus_sh:svn_revision.tcl

 

Thanks

Joanne

DZuck1
Novice
140 Views
Hi Joanne, I was able to find the script file directory’s path by using the following function: proc getScriptDirectory {} { set dispScriptFile [file normalize [info script]] set scriptFolder [file dirname $dispScriptFile] return $scriptFolder } Thanks, DZuck1
Reply