Adding coverage to the testbench

Instance your top-level Covertop in the testbench. On each sampling opportunity, call sample() with your trace object; this recursively invokes each active coverpoint's sample() method.

    # My testbench

    cvg = MyBigCoverGroup(log=self.log)

    ...
    # Collect trace_data from monitors and other sources, then pass to coverage
    cvg.sample(trace_data)


Prev: Covertop
Next: Exporting and merging coverage