Skip to content

How to use the coverage weight option inside coverpoint? #113

Answered by mballance
aneels3 asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @aneels3,
Coverpoint options are configured by attaching a 'dict' to the coverpoint. The testcase below shows overriding the at_least option for one coverpoint:

def test_coverpoint_atleast(self):
@vsc.covergroup
class cg(object):
def __init__(self):
self.with_sample(dict(
a=vsc.uint8_t(),
b=vsc.uint8_t()))
self.options.at_least = 2
self.cp1 = vsc.coverpoint(self.a, bins={
"a" : vsc.bin_array([], 1, 2, 4, 8),
}, options=dict(at_least=1))
self.cp2 = vsc.coverpoint(self.b, bins={
"b" : vsc.bin_array([], 1, 2, 4, 8)
})

I c…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by mballance
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants