FPGA Intellectual Property
PCI Express*, Networking and Connectivity, Memory Interfaces, DSP IP, and Video IP
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.
5920 Discussions

Tcl commands required to create project files in sub-directory

EPrec
Beginner
439 Views

I used the 'Generate tcl file for Project' to generate a base Tcl file for my project. I'd like to modify that Tcl file so that I can 'Source' it one folder level above where I want my project (.qpf) and constraint (.qsf) files to be created.

 

For example, the generated Tcl script starts with the command:

if {[is_project_open]} { if {[string compare $quartus(project) "my_project"]} { puts "Project my_project is not open" set make_assignments 0 } } else { # Only open if not already open if {[project_exists my_project]} { project_open -revision my_project my_project } else { project_new -revision my_project my_project } set need_to_close_project 1 }

the 'is_project_open' command must look only in the local directory (where the Tcl script resides). Is there a Tcl command that can 'cd' into a sub-directory, run all the commands that create the project and make assignments and then exit?

 

 

 

0 Kudos
2 Replies
EPrec
Beginner
140 Views

... think I answered my own question. I added the following to the top of the Tcl file and it appears to be working as desired:

set origin_dir "./Work_Dir" cd $origin_dir

 

KhaiChein_Y_Intel
140 Views

It's glad that you found the command.

Reply