sebs
sebs

Reputation: 205

SystemVerilog: introspection for functional coverage

Unfortunately, SystemVerilog lacks of a comprehensive way for introspection. The only way that I know is leveraging VPI in order to obtain information about objects. However, it does not seem to include objects for functional coverage (covergroups, coverpoints, bins).

What I would like to accomplish is to:

1) obtain the coverage status of certain bins (get_coverage() is only able to return accumulated coverage information of single coverpoints and cross coverage points).

2) obtain information about the content of coverpoints regarding their bins or with other words all bin definitions of a coverpoint.

Up to now, I could not manage to let VPI do the job for me. Hence, I am wondering if anyone already did experiments in this field and has some solutions to my problem. In case VPI does not offer such an introspection feature, I would also be happy about vendor-specific ways to analyze coverpoints and their bins.

Upvotes: 0

Views: 474

Answers (2)

dave_59
dave_59

Reputation: 42738

There is no need to do this kind of post-processing work from within the SystemVerilog language. Most tools will give you reports that have all this information and can be filtered. The UCIS API is also available but would be overkill.

Upvotes: 0

Tudor Timi
Tudor Timi

Reputation: 7573

If your vendor supports the Unified Coverage Interoperability Standard (UCIS) you could probably get away with implementing some C code that can read a coverage database and query it for what you need.

You could then stitch this C code to your SV simulator using the DPI/VPI.

Upvotes: 1

Related Questions