@@ -332,6 +332,41 @@ compose the coverpoint cross.
332332
333333 self.cp1X2 = vsc.cross([self.cp1, self.cp2])
334334
335+ Coverpoint Cross Ignore Bins
336+ ............................
337+
338+ Coverpoint cross-bins to ignore may be specified as follows.
339+
340+ .. code-block :: python3
341+ def filter(a, b):
342+ v_set = (1, 2, 4, 8)
343+ for i,v in enumerate(v_set):
344+ b_set = v_set[i+1:]
345+ if len(b_set) and a.intersect(v) and b.intersect(b_set):
346+ print("Intersect: a: %s ; b: %s" % (str(a.range), str(b.range)))
347+ return True
348+ return False
349+
350+
351+ @vsc.covergroup
352+ class cg_t(object):
353+ def __init__(self):
354+ self.with_sample(dict(
355+ a=vsc.int8_t(),
356+ b=vsc.int8_t()))
357+ self.cp_a = vsc.coverpoint(self.a,
358+ bins=dict(rng=vsc.bin_array([], 1, 2, 4, 8)))
359+ self.cp_b = vsc.coverpoint(self.b,
360+ bins=dict(rng=vsc.bin_array([], 1, 2, 4, 8)))
361+ self.cr = vsc.cross([self.cp_a, self.cp_b], ignore_bins=dict(b1=filter))
362+
363+ The `ignore_bins ` argument must be a dictionary of bin-name and filter-method.
364+ The filter function is invoked with a bin specification for each coverpoint
365+ in the cross-point. The function returns `True ` if the specified bin
366+ combination should be ignored and `False`` otherwise. In this case,
367+ bins where (b>a) are ignored.
368+
369+
335370Specifying Coverpoint Sampling Conditions
336371-----------------------------------------
337372A sampling condition can be specified on both coverpoints and coverpoint
0 commit comments