Jump to content

Displaying only UVM_LOW and UVM_HIGH log infos


Recommended Posts

Hello Mahesh,

This is an unusual request but I have attached an example for you that uses the report catcher.

You do have the ability to filter messages based on an instance instead of global verbosity if that will help.

Anyway here is the example - I hope it helps: (You will need to run with +UVM_VERBOSITY=UVM_HIGH)



module test;

import uvm_pkg::*;

`include "uvm_macros.svh"

class verbosity_catcher extends uvm_report_catcher;

virtual function action_e catch();

case (get_verbosity())

UVM_LOW, UVM_NONE, UVM_HIGH: return THROW; // Only return LOW, HIGH and NONE

default : return CAUGHT; // do nothing with this message




verbosity_catcher catcher = new();

initial begin

uvm_report_cb::add(null, catcher);

`uvm_info("MYID", "UVM_LOW: This one should be printed", UVM_LOW);

`uvm_info("MYID", "UVM_MEDIUM: This one should NOT be printed", UVM_MEDIUM);

`uvm_info("MYID", "UVM_HIGH: This one should be printed", UVM_HIGH);

`uvm_info("MYID", "UVM_HIGH+1: This one should NOT be printed", UVM_HIGH+1);

`uvm_info("MYID", "UVM_FULL: This one should NOT be printed", UVM_FULL);




UVM_INFO message_callback_test.sv(23) @ 0: reporter [MYID] UVM_LOW: This one should be printed

UVM_INFO message_callback_test.sv(25) @ 0: reporter [MYID] UVM_HIGH: This one should be printed


Link to comment
Share on other sites


Thank you very much for replying with your valuable feedback. I want to share something relevant to your post as follows;

I've tried with +uvm_set_verbosity=run,uvm_test_top.env_0.agent_0,monitor_tx,50 option from command line for controlling UVM_INFO messages with in a particular component and its associated children.

But anyhow, Your post might helpful for me than my work done using +uvm_set_verbosity.




Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...