UVM Debugging in Questa

Make it to the Right and Larger Audience

Blog

UVM Debugging in Questa

Intro

Questa comes with pre-compiled UVM package and the source files. No need to recompile it. To use UVM, just use uvmcontrol switch to enable it.

or in modelsim.ini

Below shows the meaning of each -uvmcontrol option. Default is to use all.
uvm_dbg1

 

Debug visibility

You can use below to turn on visibility at top level

or turn on visibility at blockA and blockB

Just note turning on visibility may affect optimization so you want to enable visibility selectively.

 

Class nomenclature

In UVM print out messages, you may see something like @uart_item@2. Here each class instance is assigned a unique ID in the format of @class_type@#, where class_type is the name of the class type and # is assigned to uniquely identify an instance. So @uart_item@2 is the 2nd instance of the class type uart_item.

Note if a class is instantiated with different parameters, the corresponding classes are treated differently.

For above code, Questa will use /top/example/example__1 for the first class and /top/example/example__2 for the 2nd class.

 

UVM Commands
You can enter below UVM commands in Questa transcript window to show debug information.
uvm_dbg2

For example, you can do uvm call and it bounces back the result.

 

Now we open Questa and load a sample UVM test bench. The Questa window may look like below.

uvm_dbg3

Where you can clearly see Instance window which lists classes and their instances, and Transcript window where you can type in TCL command.

In Transcript window, we type in

and the result is as below.

uvm_dbg4

 

In Transcript window, we type in

and it shows factory info such as class override as below.

uvm_dbg5

So above says driverA is overriden by driver2A. If we check uvm_test_top module, line 35 shows drive2A type overrides driveA type.

uvm_dbg6

 

Another way to check override information is to do

and the result is shown as
uvm_dbg7

Or you can even do

There are lots of info bounced back so it is intended for experienced UVM designer.

 

Next let’s check a configuration, num_sequence_A_grandparent, of i2_agentA sequencer. In instance window, we right click on i2_agent sequencer and select UVM and then View UVM Details.
uvm_dbg8

The UVM Detail window is as below and it shows num_sequence_A_grandparent is written value 2 once but no read and is written value 4 once and there is a read (so value 4 is used in configuration).

uvm_dbg9

The same info can be displayed by using “find insource” as well.

uvm_dbg10

Note the displayed code are in green color and they are hyperlinked. Double click on the code will get you to the source code.

 

Another useful uvm command is “uvm displayobjects” to check objections raised by sequencers and result is
uvm_dbg11

 
Senior Engineer
Author brief is empty
Groups:

Tags:

2 Comments
  1. Abhikarsh 4 years ago
    0
    -0

    Good tutorial about using UVM static commands to browse through UVM structures. Hope there is a part talking about waveform debugging, breakpoint, step execution, etc.

    4
  2. chriszhou 4 years ago
    0
    -0

    Overall not bad for a beginner to touch UVM debugging in Questa. Some images are small and blurred.

    3

Contact Us

Thanks for helping us better serve the community. You can make a suggestion, report a bug, a misconduct, or any other issue. We'll get back to you using your private message ASAP.

Sending

©2021  ValPont.com

Forgot your details?