Visualizer Compile Optimize and Simulate with just one command

2024-01-18T19:53:28.000-0500
Debug

Summary

Simplify QuestaSim usage, with Qrun tool. It is common for users to write scripts or makefiles to simulate their design. However, Qrun eliminates this need, by providing makefile-like incremental compilation, intelligent default values for common command line options, and automatic compiler selection based on file extension. It also makes it easy for the user to switch between command line mode and GUI mode for debug. Join us as we show you how to enable more complex flows, with the addition of a switch on the Qrun command line in UVM, Power Aware, Coverage, SystemC and more. What You Will Learn: • What is Qrun and why do we need it? • How to use Qrun • How to integrate Qrun in your environment • Some simple use cases • Real-world complex flows


Details

Q1: Can we use Qrun with Verdi tool? Is Verdi used as debugger? 
No, Qrun is a wrapper to invoke Questa tools. Our debugger is Visualizer. 

Q2: Where can I find the documents for Qrun to refer it later in my project? 
Qrun documentation can be found in Siemens Support Center.  
Questa SIM Qrun User's Manual  is a good source for reference. 
Also as shown in the webinar, qrun -help [option] can be used with any argument on Qrun command line. 

Q3: How can I add more options to Qrun as -suppress [num]? 
Adding tool options can be used directly in Qrun command, "qrun … -suppress [num]" for instance. Qrun will route all options to the correct tools.  
In the unique case, where a certain option is relevant to several tools, and the user wants to limit it to only a particular tool, it can be added as mentioned: 
-<tool>.options -opt1 -opt2 +op3 ... -end 

While tool keyword can be replaced with: vcom/vlog/sccom/vopt/vsim 
For instance:

 -vopt.options +nospecify –l vopt.log -end 


Q4: The scenario is 50 tests in a regression. How to use qrun for this case? 
Shortly, it can be done with 2 mode state: 
First, compile and create a snapshot once: 

qrun -f qrun.f -optimize -snapshot [snapshot_name] 

Second, run this line for each test, using one or more snapshots: 

qrun -simulate -snapshot [snapshot_name] +UVM_TESTNAME=[test_name] 

Note, you can create several “flavours” of optimized output, according to the phase of your project. 
Debug options, gate level simulations, coverage etc, will output a different optimized snapshot. 
Further information and useful examples can be found in Qrun and Setting Up Regressions

Q5: Is QRUN free?  What version of Questa is QRUN supported in? Is qrun available with Questa Prime by default? Or is it a separate license? Also, what version of Questa did this get introduced? 
Yes, Qrun does not required additional fees. It is also available with Questa Prime, and it does not require an additional license. 
Qrun is available in the Questa tools since version 2019.4. As always, it is recommended to use the latest version, if possible, to get the benefit of the latest updates and improvements. 

Q6: Is Visualizer an added tool (we have to pay) or is Visualizer free with QuestaSim? does visualizer require additional license? 
Before 2023 Visualizer was installed separately from Questa. Since 2023.1, Visualizer is included in Questa Core/Prime package. It does not require an additional cost or license. 

Q7: Can slides be shared? Will this slide deck be made available, this was very good? You might have already mentioned this, but will slides with all of this content be available after the training? 
The webinar is recorded and that would be shared with examples and Questions/Answers that were not answered live. A pdf version of the slides is available in the KBA. 

Q8: Will qrun be available also for Questa-Intel FPGA Starter Edition? 
Yes. 

Q9: With so many switches available, wouldn't it be easier to use JSON/YAML/etc, and benefit from editor support via JSON schema? 
Thanks for your suggestion. It will be forwarded to the relevant R&D team to evaluate it. 

Q10: Can you explain what benefits Visualizer has over the standard QuestaSim GUI? How does visualizer differ from Questa advanced simulator? What situations would you use one over the other? 
Questasim is the underlying simulator but was also a catchall for the simulator and the old TK GUI, now often referred to as the Classic GUI. Visualizer replaces the classic GUI. It uses QIS flow (-access) and would replace +acc that Questa uses. It provides high performance with high visibility, and on the demand reconstruction of signals. It is our high-end debugger, and it has many features for debugging UVM testbenches, find cause of x-propagation, Logic Cone, Timeline window, Biometric Search etc. There have been several webinars that have been conducted to showcase its usage. Please find the links below: 
Achieve Faster and More Reliable Verification Closure using Coverage Driven Verification 
Strategies for Debugging Race Conditions in Functional Simulation 
Analyzing and Fine-Tuning Functional Simulation Performance 
Explore Effective Debugging with Visualizer Waveforms

Visualizer: UVM Debug Has Never Been Easier


Q11: Do you have an example of when you would want to use the 3-step flow instead of the 2-step flow. I don't see a practical use case that would drive you to needing to use the 3-step flow instead of the 2-step flow. 
3-step flow is there to enable full flexibility and control to the user. It enables the user to perform a single step at a time, for instance, running compilation separately from optimization. Therefore, it could be useful when incorporating it into existing scripts, which mostly using 3 step flow, with different switches to compile, optimize and simulate: 
   qrun -f qrun.f -compile    can be used for compiling instead of vlog/vcom 
   qrun -f qrun.f -optimize   can be used for optimising instead of vopt 
   qrun -f qrun.f -simulate   can be used for simulating instead of vsim 
This can help users integrate Qrun into an existing project easily, without changing much of the current scripting. 

Q12: Is the script Qrun generates run under Questa or a shell (sh or csh)? 
Both, you can source it interactively after opening Questa or in the shell itself. 
You can generate the script using the command; qrun -f qrun.f -script script.csh 
And then “source script.csh” in the csh shell or in the QuestaSim GUI 

Q13: Is there a character limit on Windows with qrun command?  
There is no known tool limitation for characters count. However, some limitations may apply from your operating system. For instance, using a long filename on windows has a character limit. 
For Qrun command, it is recommended to list options in a text file, for better readability and ease of use, and call that file with “-f” option. 

Q14: What is difference between parallel and jcomp ? How many cores does parallel use? 
Use -parallel to enable Parallel Compilation 
Use -jcomp <n> to indicate how many cores to use or how many compiles to run in parallel. The default is 4     

Q15: How does single step qrun handles pipeline regression flow? 
Qrun can be ran with a single optimization file name for different tests, using "-snapshot" or "-o" followed by a filename to your choice. Qrun can be ran with 2 step flow, as described in the answer to question 4, or with a single step flow. In case using a single step flow, qrun will skip compilation and optimization if there is no change in the given options or files, and will only run simulation. In this way, qrun can handle multiple tests for a single optimization. However, if you want to use an optimization file that does not hold latest changes, single step flow is not suitable, since it will redo optimization. But, such a scenario can be easily handled in 2 step or 3 step flow.

Q16: How is qrun -optmize different than vopt?  
Vopt tool executes optimization, every time it being called. 
Qrun -optimize invokes Vopt only when there are changes in files or options. 

Q17: What is a PDU flow?  
PDU stands for Pre-Optimised Design Unit. In PDU flow we divide the design into several design units, instead of considering it as a single unit. In case there are files or options changes in certain design unit, other units will not be optimized again, and this will ultimately save time. Please refer to this support kit for more information How to save optimization Time?

Q18: Is optimization better in Qrun? How is the vopt time compared in Qrun vs Vopt? 
Qrun is a wrapper tool to invoke Questa tools such as vopt. The only difference from running vopt directly, is the ability of Qrun to skip repeated optimizations in case it is not necessary. 

Q19: Will mixed simulation tools like vaspi and vasim eventually be integrated into qrun or is there already an equivalent tool? 
No, Qrun supports only Questa digital simulations tools.

Q20: How to use qrun with Xilinx precompiled libraries? 
You can reference precompiled libraries using "-L" or "-refLib" switches: 

qrun    –L   <library_name>  
qrun –reflib <library_name>  


Q21: Can you have a script that uses vlog to compile part of the design (example Xilinx customized IP) and then use qrun to compile the rest of the project and run simulation? 
Yes, by referencing precompiled libraries, using "-L" or "-refLib" switches. 

Q22: Can you direct for information about Questasim's Qrun flow on Xilinx Vivado IP/design?
Use this link How to use Questasim’s Qrun flow on Xilinx Vivado IP/design and make sure you are logged in to support center. For further information on registering go to How do I register for Support Center?  

Q23: Where can I get the source code for the examples presented in the webinar? Thank you 
You would receive a KBA article shortly with the webinar recording, Q&A and the source code for the examples used. 

Q24: For low power simulations, I use some switches, for example: -notiming, +nospecify etc. Are these same and will be used same way in Qrun? 
Yes. Qrun knows to associate the suitable switches to the correct tools. 

Q25: Does the -reflib command add external (e.g. 3rd party, precompiled) libraries during VHDL compilation? Using QRUN, we have to run vmap separately, -reflib does not add the libraries to the modelsim.ini automatically. 
"-L" / "-reflib" only apply to vlog, the Verilog/SV compiler. VHDL has the logical library name embedded in the source code so -L/-reflib are not needed, since they point to a library. Since vlog doesn’t have a way to specify the logical library name, it searches the contents of each library pointed to with "-L" / "-reflib" and loads the first matching design unit. In case the user wants to reference a pre-compiled library, it can be done using "-L" / "-reflib" and a full path to a library. Qrun does not add external library mapping. Qrun will concatenate the full path of it to all relevant commands and will not create a mapping or update the modelsim.ini file. The local references to the library should be removed, since there is no mapping, and it is not required. If you are still interested in using a local name to the precompiled library, only then you will need to create a mapping using vmap or manually editing the modelsim.ini file.
 

KB Article ID# KB000129032_EN_US

Contents

SummaryDetails

Associated Components

Visualizer Debug