Month: September 2016

UVM Verbosity Notes

Posted on Updated on

There is always some confusion regarding usage of verbosity-levels and the effect of them on controlling displays in our logs.

We generally use following verbosity levels while coding uvm_info prints.

UVM_NONE = 0 (highest priority messages)

UVM_LOW = 100

UVM_MEDIUM = 200

UVM_HIGH = 300

UVM_FULL = 400

UVM_DEBUG = 500 (lowest priority messages)

 

The values are the integer values of enumeration.

Please note that, though from name UVM_LOW seems to be low priority, but in actual its second highest priority message and similarly UVM_FULL is among lowest priority messages. From this I have formulated following guideline for myself (something similar you can do in your code).

 

  • UVM_DEBUG :
    • Never use UVM_DEBUG unless you are trying to debug an issue with the UVM base class library. Keep UVM_FULL or UVM_HIGH as your highest level (Recieved this valuable suggestion from Dave)
  • UVM_FULL :
    • Will be  used when we want every bit of information to be printed (May be used print complete packets, or can be used inside of loops to check whats happening in each iteration)
    • It Can be used to print full-headers and packets, can be used inside functions/tasks which are called repeatedly
  • UVM_HIGH :
    • Can be used to print full-headers, and in the functions/tasks which are repetitive but only in beginning of simulation (configuration time), or inside repetitive functions but to indicate only entry and exit from that function
  • UVM_MEDIUM :
    • These should be used for periodic prints which shows that sequence/verif-components are running.
  • UVM_LOW :
    • These prints should be associated with minimum messages which we require in regression logs.
  • UVM_NONE :
    • Some messages at beginning of simulation and end of simulation can be put into this category

 

Please note that when we give following verbosity levels from command line, what all they enable

  • UVM_VERBOSITY=UVM_DEBUG     : enables all prints i.e debug, full, high, medium low and none
  • UVM_VERBOSITY=UVM_FULL          : enables all prints barring UVM_DEBUG messages
  • UVM_VERBOSITY=UVM_HIGH         : enables prints of high, medium, low and none
  • UVM_VERBOSITY=UVM_MEDIUM : enables prints of medium, low and none
  • UVM_VERBOSITY=UVM_LOW          : enables prints of low and none
  • UVM_VERBOSITY=UVM_NONE       : enables prints of only none type