Kameshwar Rao Posted July 4, 2016 Report Share Posted July 4, 2016 is there way to search for the non-uvm compliant error message such as "ERROR - CSI Rx BFM " during the uvm report pahse of uvm environment? if we see this string error count variable need to be incremented and finally display test case is failed in log file. Quote Link to comment Share on other sites More sharing options...
sri.cvcblr Posted July 5, 2016 Report Share Posted July 5, 2016 The easiest is perhaps to run a post-processing script. If you insist you want to do this within simulation domain, try: 1. Your tool may have some API to get you all $error (Assuming that error originated from a $error and not plain $display) 2. You could do a "grep -c ERROR" and another grep -c UVM_ERROR and calculate the difference and increase the count. There are some tiny little details to get there as plain old Verilog's $system won't allow return values to be easy to access within Verilog. You could always write your own C layer around, but is it really worth it? Maybe a good task for an intern if you have access to! Regards Srini www.verifworks.com Quote Link to comment Share on other sites More sharing options...
Kameshwar Rao Posted July 6, 2016 Author Report Share Posted July 6, 2016 1. uvm_report_server svr; reg [31:0] csi2_err_cnt_mem[0:1]; 2. initial begin csi2_err_cnt_mem[0] = 0; csi2_err_cnt_mem[1] = 0; wait for events; //i mean after all bfm models are got dropped. svr = _global_reporter.get_report_server(); svr.summarize(); //Here I grep the non-uvm error message count into a file. $system("grep \"ERROR - CSI RECEIVER BFM\" ${SIM_RUN_DIR}\/${TC_TESTCASE_DIR}\/nccoex\/..\/result\/\*.log \| wc \-l \> csi2_err.txt"); //Read the file contents into two-dimentional memory. $readmemh("csi2_err.txt",csi2_err_cnt_mem); //adding the uvm_error and non-uvm_errors and comparing with value zero. if((svr.get_severity_count(UVM_FATAL) + svr.get_severity_count(UVM_ERROR)) + csi2_err_cnt_mem[0] == 0) begin if(svr.get_severity_count(UVM_WARNING)==0) `uvm_info("final_phase", "STATUS: UVM TEST PASSED", UVM_LOW) else `uvm_info("final_phase", "STATUS: UVM TEST PASSED with WARNINGS", UVM_LOW) print_pass(); $write("** UVM TEST PASSED **\n"); end else begin print_fail(); $write("** UVM TEST FAILED **\n"); endNote-1: the above mention code is working fine for me. Note-2: Srini, Thanks for reply. Best Regards, Kameshwar Rao Quote Link to comment Share on other sites More sharing options...
sri.cvcblr Posted July 7, 2016 Report Share Posted July 7, 2016 Impressed! Well done! Thanks for sharing the code. Regards Srini 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.