Sunday, March 12, 2023

UVM REPORTING

 

UVM provides all the classes and functions to generate the message.

Ø Messages are mainly info, warning, error and fatal.

Ø In SV, we have $display and we don’t have control on which message t be printed. (Log file is huge and hard to analyse to debug but UVM provides filtering mechanism).

Ø Each reporting command used any of the following arguments: 

uvm_severity, uvm_action and uvm_verbosity.

Ø For displaying information messages, we have,

§  `uvm_info(ID, MSG, VERBOSITY)

Ø ID: identifier of the message, from where the msg has to printed

Ex: “TEST” / “ENV”

Or we can use few inbuild methods,

§  get_full_name() : provides full hierarchy

§  get_type_name(): provides name of the class

§  get_name(): provides the name of the class

 

Verbosity: Indicates how important the message is

Ø uvm_verbosity would filter out the debugging messaging according to priority set.

Ø By default, verbosity is set to UVM_MEDIUM.

§  Verbosity levels: UVM_NONE ->  0 (weight)

                    UVM_LOW ->  100 (weight)

                    UVM_MEDIUM ->  200 (weight)

                    UVM_HIGH ->  300 (weight)

                    UVM_FULL ->  400 (weight)

                    UVM_DEBUG ->  500 (weight)

 

o   Ex:   `uvm_info(“ENV”, “We are inside ENV”, UVM_LOW)

o   It will print messages with verbosity NONE and LOW

 

SEVERITY: Filter the messages based on severity level.

Ø uvm_severity indicates the importance of the message to be displayed.

o   UVM_INFO -> DISPLAY

o    UVM_WARNING -> DISPLAY

o   UVM_ERROR -> DISPLAY | COUNT : It will display and count the errors

o   UVM_FATAL -> DISPLAY | EXIT : It will display and exit the simulation

 

Ø MESSAGE ACTION:

  o   UVM_DISPLAY: It will display the message.

o   UVM_LOG: It will send the message to the file.

      o   UVM_COUNT: It will display the count of error messages.

   o   UVM_EXIT: It will exit from the simulation.

     o   NO_ACTION: Nothing will be done.

 

To control the filtering the messages – to improve the quality.

Ø Filtering messages with verbosity

o   set_report_verbosity_level(int verbosity level)

o   Ex: env.set_report_verbosity_level(UVM_LOW)

 

Ø Filtering messages with severity level

o   Set_report_severity_level(severity, action)

Ex:  env.set_report_severity_level(UVM_INFO, UVM_DISPLAY)

No comments:

Post a Comment