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

Scripting and Options for quartus_sh

Altera_Forum
Honored Contributor II
3,213 Views

Hi Everybody,  

 

I started using scripts for compiling and have the following problem: 

 

Using quartus_sh: 

How can I filter the information shown in MS-DOS? I only want to see Warnings, Errors and Critical Warnings. Maybe "Started Fitter" or such info would also be nice.  

 

quartus_sh --help was not helpful :-(
0 Kudos
13 Replies
Altera_Forum
Honored Contributor II
1,127 Views

Perhaps you have already tried this but I would guess that the same techniques that one can use to suppress messages while in the Quartus development application would also work when using the shell commands. I have not tried that myself but would be interested to hear if this helps. 

 

See the ""Analyzing and Controlling Synthesis Messages" chapter in this part of the Quartus Handbook: 

http://www.altera.com/literature/hb/qts/qts_qii51008.pdf
0 Kudos
Altera_Forum
Honored Contributor II
1,127 Views

You can use quartus_sh command with option -s!

0 Kudos
Altera_Forum
Honored Contributor II
1,127 Views

Jerry, I do not understand how the -s option can be used to control the large number of info messages that quartus displays in the MS-DOS window while a compilation script. 

 

I did check into my suggestion above and it seems to have no impact on the messages produced, so it may be disregarded.  

 

Seems like the best ways to check warnings and errors are either to open up the project in the quartus IDE and look at the compilation report or to have the tcl script parse the compilation report and sort out the non-suppressed messages of the desired levels. So far, I normally have the tcl script check the worst case slack and some other key parameters and then use the quartus GUI to scan for warnings.
0 Kudos
Altera_Forum
Honored Contributor II
1,127 Views

Hi mvanpelt, 

 

You are right, you should write script to read the report from the rpt files after compilation. The -s options just can pause the ms-dos when the compilation is completed.
0 Kudos
Altera_Forum
Honored Contributor II
1,127 Views

open Nios II Command Shell. run: 

 

quartus_sh --flow compile project.qpf | grep Warning
0 Kudos
Altera_Forum
Honored Contributor II
1,127 Views

Good idea, thank you. As someone who does not (yet) use Nios, I was not even aware of the Nios shell. 

 

In my case, I use a Tcl script to do the build. Then your suggestion can be extended to: 

quartus_sh -t build.tcl | grep Warning
0 Kudos
Altera_Forum
Honored Contributor II
1,127 Views

cool! cygwin is a big help on Windows. if you find yourself doing a lot of scripting, i would recommend trying a Linux VM

0 Kudos
Altera_Forum
Honored Contributor II
1,127 Views

 

--- Quote Start ---  

Good idea, thank you. As someone who does not (yet) use Nios, I was not even aware of the Nios shell. 

 

In my case, I use a Tcl script to do the build. Then your suggestion can be extended to: 

quartus_sh -t build.tcl | grep Warning 

--- Quote End ---  

 

 

Can you use this command under bach? For i can run "quartus_sh -t build.tcl", but can't run "quartus_sh -t build.tcl | grep Warning". Or is greq isn't of MS-DOS command?
0 Kudos
Altera_Forum
Honored Contributor II
1,127 Views

yeal, i search "grep" words and found that it is Linux command. 

 

I'm using window OS, however, i used scripts often when design QII projects. For this case, maybe, we can use below tcl code to extract warning information from rpt files: 

 

set a "*Warning (*"set f while { >=0} { if {} { puts stdout $line puts stdout " Warnings!!!" } else { # #puts stdout "NO Warnings!!!" } } close $f
0 Kudos
Altera_Forum
Honored Contributor II
1,127 Views

as mentioned above, you can use the Nios II Command Shell on Windows, which is actually a cygwin terminal. cygwin includes grep

0 Kudos
Altera_Forum
Honored Contributor II
1,127 Views

 

--- Quote Start ---  

as mentioned above, you can use the Nios II Command Shell on Windows, which is actually a cygwin terminal. cygwin includes grep 

--- Quote End ---  

 

 

Thanks for you reply! 

 

Now, i can extract the information from the compilation reports thru using grep or using tcl codes.
0 Kudos
Altera_Forum
Honored Contributor II
1,127 Views

Thank you very much for your posts! Actually I forgot to check the posts after getting the first one. 

 

 

The idea with the Nios Shell was good. But unfortunately my script is in batch and I don't want to change to linux scripting.  

 

I will try to use the code from Jerry
0 Kudos
Altera_Forum
Honored Contributor II
1,127 Views

 

--- Quote Start ---  

Thank you very much for your posts! Actually I forgot to check the posts after getting the first one. 

 

 

The idea with the Nios Shell was good. But unfortunately my script is in batch and I don't want to change to linux scripting.  

 

I will try to use the code from Jerry 

--- Quote End ---  

 

 

Hi vhdl_world, 

 

When you use the code, please note which only extract map's warning informations. Becasue different warnings are strored in different rpt files, so if you want to extract full compilation's warning info you should open all different rpt files and extract what you want from them.
0 Kudos
Reply