Mani Posted December 14, 2010 Report Share Posted December 14, 2010 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 Quote Link to comment Share on other sites More sharing options...
jadec Posted January 26, 2011 Report Share Posted January 26, 2011 Why would a component need to know the global error count? What are you trying to use it for? Quote Link to comment Share on other sites More sharing options...
uwes Posted January 28, 2011 Report Share Posted January 28, 2011 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 Quote Link to comment Share on other sites More sharing options...
mahavirrana Posted February 16, 2021 Report Share Posted February 16, 2021 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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.