Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
16 years ago

quartus tcl - finding project name

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:

1 Reply

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    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