Code Coverage for Failed testcases

Hi,

I am generating code coverage for one of the module of my design. I wrote around 50 tetscases to check the code coverage of that module. But the pass/fail status of all test cases are showing as Pass for all the testcases even though there are some failing testcases. I am maintaning a error count in my testbench for each eand every mismatch err_count will be incremented. I am copying the assert part of my testbench here.

//===================TB code =====================//
initial begin
run_my_test();
repeat(100) @(negedge uu_acmac_cap_tb.clk);
//Using assert for coverage report
assert (err_count == 0)
$display($time,“=====TEST %s PASSED=====\n”,test_case_name);
else begin
$display($time," =====TEST %s FAILED with %d errors===\n", test_case_name, err_count);
$error(“======”);
end

end

//===========Simulation log =================//
174004 =====TEST testchain29_ampdu.txt FAILED with 46 errors=====

** Error: ======

in my coverage report it showing as test is passed. I don’t have a functional coverage model here.

Please suggest me how to solve this.

Thanks,
Sreevani Raichur

In reply to sreevani.raichur@gmail.com:

Hi
Can you clarify what you mean by “in my coverage report it showing as test is passed. I don’t have a functional coverage model here.”.

How does a coverage report show it as passed? Is it because you collect successful coverage on the assert statement in your code? Because if so, then because coverage is merged across all testcases, you will hit (cover) that assertion on the passing testcases, and the overall merged result will show that the assertion has been hit.

Richard

In reply to Richard Hamer (EnSilica):

The coverage and the simulation result/pass/fail status are not linked automatically by a simulator. There are Verification Management tools that can do this for you. If you don’t plan to use the management tools, you need to take care of it manually (not a big deal for medium size designs).

Regards
Srini
www.verifnews.org