Jump to content

getting the number of UVM_ERROR/UVM_FATAL's


Recommended Posts

Hi,

Is there any inbuilt function at a uvm component level to find out the number of UVM_ERROR's?

Presently I am getting a handle of the uvm_report_server and then calling get_severity_count, as shown below. The user just uses the num_uvm_errors function.

If an in-built function is available at a component level, then the user need not bother about getting a report_server handle.

Thanks for the inputs.

-------code------

virtual function int num_uvm_errors();

if(server==null)

server = get_report_server();

return server.get_severity_count(UVM_ERROR);

endfunction

-------

Regards,

Mani

Link to comment
Share on other sites

  • 1 month later...
Hi,

Is there any inbuilt function at a uvm component level to find out the number of UVM_ERROR's?

Presently I am getting a handle of the uvm_report_server and then calling get_severity_count, as shown below. The user just uses the num_uvm_errors function.

If an in-built function is available at a component level, then the user need not bother about getting a report_server handle.

Thanks for the inputs.

-------code------

virtual function int num_uvm_errors();

if(server==null)

server = get_report_server();

return server.get_severity_count(UVM_ERROR);

endfunction

-------

Regards,

Mani

hi,

the severity counts are per report_server. as every uvm_component is an uvm_report_object with (potentially) an own report_server it is upto the user to say from scope/sever the counts should be retrieved. this is the reason that you have get_report_server and get_severity_count separated.

/uwe

Link to comment
Share on other sites

  • 10 years later...

Hi,

  you can try this out:

module error_count_test();

`include "uvm_macros.svh"
 import uvm_pkg::*;

int get_uvm_error_count; 

uvm_report_server srvr;

initial srvr = uvm_report_server::get_server();

initial begin

  //after your operation

  get_uvm_error_count = srvr.get_severity_count(UVM_ERROR));

 $display("total uvm error count is %0d",get_uvm_error_count);

end

endmodule

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.

×
×
  • Create New...