Jump to content

non-uvm message compliant, grep during report pahse.

Recommended Posts

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!





Link to comment
Share on other sites

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();


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



       //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)
              `uvm_info("final_phase", "STATUS: UVM TEST PASSED", UVM_LOW)
              `uvm_info("final_phase", "STATUS: UVM TEST PASSED with WARNINGS", UVM_LOW)
            $write("** UVM TEST PASSED **\n");

             $write("** UVM TEST FAILED **\n");


Note-1:  the above mention code is working fine for me.


Note-2: Srini, Thanks for reply.


Best Regards,

Kameshwar Rao

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