Intel® Quartus® Prime Software
Intel® Quartus® Prime Design Software, Design Entry, Synthesis, Simulation, Verification, Timing Analysis, System Design (Platform Designer, formerly Qsys)
17054 Discussions

quartus tcl - finding project name

Altera_Forum
Honored Contributor II
2,304 Views

Could anybody tell me in quartus tcl how I can get the name of the project? I've looked in the project package and all I've found is commands to obtain revision names.  

I've got a generic timing report script and I want to use the project name as the prefix to the report names. 

 

I just know the answer is staring me in the face. :confused:
0 Kudos
1 Reply
Altera_Forum
Honored Contributor II
1,209 Views

If you are in the tcl shell and your Quartus project is already opened you can obtain the information in the quartus array from the global name space: 

 

for example: 

# array names quartus 

ip_rootpath copyright load_report_is_needed advanced_use nativelink_tclpath quartus_rootpath processing tclpath ipc_mode nameofexecutable natural_bus_naming eda_tclpath settings internal_use regtest_mode package_table eda_libpath args ipc_sh version binpath project is_report_loaded available_packages 

# puts $quartus(project) 

 

If you are loading a script from your .qsf file  

for example: 

 

set_global_assignment -name PRE_FLOW_SCRIPT_FILE "quartus_sh:myscript.tcl" 

 

then the project file name is automatically passed to your script as the first argument: 

 

 

proc main {} { 

 

package require cmdline 

 

 

# # Global Variables 

global ::argv 

 

 

set project_name [lindex $argv 1] 

 

... 

 

Alain
0 Kudos
Reply