Jump to content

How to depress the path for UVM REPORTING?


Recommended Posts

when i report messages,the output includes the full path ,such as:

UVM_INFO mytest.sv(180) @ 795: uvm_test_top.mytest_env.mytest_agent.mytest_driver [mytest] len=23,data[0]=`45

sometimes,the output is too long and the path info is not necessary.

how to depress the path ,and it may be like as follows:

UVM_INFO mytest.sv(180) @ 795: [mytest] len=23,data[0]=`45

Thanks.

Link to comment
Share on other sites

Another option, depending on how much you need to selectively control the report options, is to use the report handlers from higher level components in the lower levels:

class my_agent extends uvm_agent;

function void build_phase(uvm_phase phase);
 my_driver_h = my_driver::type_id::create(...);
 my_driver_h.set_report_handler(get_report_handler);
...
endfunction
If you do this, you will no longer be able to selectively modify the reporting options for all messages in your driver. You still have the ability to controll messages by IDs.

The other option is to create separate logging objects that are disconnected from the hierarchy:

class my_driver extends umv_driver;

uvm_report_object log = new("some_shorter_name");

function void some_function();
   `uvm_info_context("myid","my message here", UVM_LOW, log);
end
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.

Guest
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.

 Share

×
×
  • Create New...