Coverage Report Object

Many of the tools that format and visualize coverage data make use of the coverage report object implemented by PyUCIS. The CoverageReport object contains information about the covergroups, covergroup instances, coverpoints and cross coverpoints in a coverage database. It contains data on the percentage of coverage achieved, as well as detailed information on the number of hits in each coverpoint and cross bin.

Building a CoverageReport

The best way to obtain a coverage report is to use the CoverageReportBuilder class. The build method on this class accepts a UCIS database object and returns a CoverageReport class.

class ucis.report.CoverageReportBuilder(db)

Builds a coverage-report object from a UCIS database

static build(db: UCIS) CoverageReport

Builds a CoverageReport object from a UCIS database

CoverageReport Object

The CoverageReport object is a tree of covergroups and coverpoints.

class ucis.report.CoverageReport

Root coverage-report object

coverage

Coverage percentage achieved by all covergroups

covergroups

List of (type) covergroups

class ucis.report.CoverageReport.Covergroup(name, instname)

Contains coverage data for a covergroup type or instance

covergroup_m: Dict[str, Covergroup]

Map of covergroup instance names to object This is only populated when self is a type covergroup

covergroups: List[Covergroup]

List of covergroup sub-instances. This is only populated when self is a type covergroup

coverpoint_m: Dict[str, Coverpoint]

Map of coverpoint name to object

coverpoints: List[Coverpoint]

List of coverpoints in the covergroup

cross_m: Dict[str, Cross]

Map of cross name to object

crosses: List[Cross]

List of cross points in the covergroup

instname

Covergroup instance name

class ucis.report.CoverageReport.CoverItem(name)

Base type for covergroups and coverpoints

coverage

Coverage percentage achieved by the cover item

name

Name of the cover item

weight

Weight given to this item when calculating coverage %

class ucis.report.CoverageReport.Coverpoint(name)

Bases: CoverItem

Contains coverage data about a coverpoint

coverage

Coverage percentage achieved by the cover item

name

Name of the cover item

weight

Weight given to this item when calculating coverage %

class ucis.report.CoverageReport.Cross(name)

Bases: CoverItem

Contains coverage data for a cross

coverage

Coverage percentage achieved by the cover item

name

Name of the cover item

weight

Weight given to this item when calculating coverage %