Forum Discussion

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

How to invoke the executable quartus_cpf from within(?) quartus_sh

I am trying to build a tcl script to run my the compilation flow with some additional operations on a current project. I run my tcl script from the Win7 Console as

quartus_sh --script=<my_tcl_script.tcl>

The main executable inside my_tcl_script.tcl is of course "execute_flow -compile". Works great. Now, as part of automating my build process I also need to convert some programming files. I can call "quartus_cpf -c <my_conversion_file.cof>" from a Win7 Console with no problems. BUT, I want to put the various "quartus_cpf -c <my_conversion_file.cof>" *IN* the "my_tcl_script.tcl" that is running under quartus_sh. The error message is: "invalid command name "quartus_cpf".

Obviously I am missing some vital understanding. I may be confused with Figure 2-2 on page 2-8 in the Quartus II Handbook Version 12.1 (June 2012). Here the section entitled "Compilation with quartus_sh --flow" seems to show quartus_cpf as able to be invoked from within quartus_sh.

So, the question is how can I "run" quartus_cpf within quartus_sh?

2 Replies

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

    I think...

    load_package flow

    execute_module -tool cpf

    You will probably need some args. I recommend:

    a) Running "quartus_sh --qhelp". I find this invaluable for all scripting.

    b) Running "quartus_sh -s" to open a shell, so you can try various things first to see what works, then put it into the script.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    --- Quote Start ---

    I think...

    load_package flow

    execute_module -tool cpf

    You will probably need some args. I recommend:

    a) Running "quartus_sh --qhelp". I find this invaluable for all scripting.

    b) Running "quartus_sh -s" to open a shell, so you can try various things first to see what works, then put it into the script.

    --- Quote End ---

    Yup, I need to use 'execute_module -tool cpf'. The whole command string is:

    execute_module -tool cpf -args "-c <path_to_my_cof>"

    Worked great. Also, thanks for the suggesting on running "quartus_sh -s" for experiments.

    -mowomo