Quantcast
Channel: Cadence Functional Verification Forum
Viewing all articles
Browse latest Browse all 1069

Enabling code coverage deeper into SV function calls

$
0
0

Hi all, 

I have a package of functions, many functions have a test case associated with them that exercises that function over most of its input variables.

The design also contains two RTL modules (encode and decode) with normal clock, reset, input and output data ports which act as wrappers calling functions from the package.

- The decoder module for example takes encoded input data, calls three functions from the package and registers the decoded output data. The combination of the decoder called functions is tested over any 1 bit error, and multiple 2 bit errors over a large variety of data inputs toggling all bits of the input encoded data.

However code coverage results viewed by IMC seems to concentrate only on the two RTL modules in the design database and ignores code coverage of the functions that have their own test cases. Consequently I get 100% block coverage and 100% toggle coverage for the two RTL blocks, but I get 0% code coverage for any of the functions. This is despite the coverage database being a merger of all of my test cases, many of which provide a function with test data and expected results data. All test cases pass.

Statement coverage is enabled, select_coverage -all is also used.

I thought it may need set_subprogram_scoring and set_expr_scoring however these have no effect.

In IMC, the package is shown, as is the testbench. For the two RTL modules (encode and decode) it shows 100% expression coverage, but never goes into the functions that are called. I'd have thought it would explore into the called function and show that line xyz of that function wasn't covered etc. I seriously doubt the function was actually 100% covered, I was expecting something like 95% and the need to add another test case for some combination of 2 errors etc I'd have forgotten.

Any ideas?

Thanks


Viewing all articles
Browse latest Browse all 1069

Trending Articles