def __init__(self): self.with_sample( dict(a=vsc.uint8_t(), b=vsc.uint8_t(), c=vsc.bool_t())) self.cp1 = vsc.coverpoint( self.a, bins={"a": vsc.bin_array([], 1, 2, 4, 8)}) self.cp2 = vsc.coverpoint( self.b, bins={"b": vsc.bin_array([], 1, 2, 4, 8)}) self.cr = vsc.cross([self.cp1, self.cp2], iff=self.c)
def __init__(self, a, b): super().__init__() self.cp1 = vsc.coverpoint( a, bins={"a": vsc.bin_array([], [1, 10])}) self.cp2 = vsc.coverpoint( b, bins={"b": vsc.bin_array([], [1, 10])}) self.cp1X2 = vsc.cross([self.cp1, self.cp2])
def __init__(self): super().__init__() self.a=None self.b=None self.cp1 = vsc.coverpoint(lambda:self.a, bins=dict( a = vsc.bin_array([], [0,15]) )) self.cp2 = vsc.coverpoint(lambda:self.b, bins=dict( b = vsc.bin_array([], [0,15]) )) self.cross = vsc.cross([self.cp1, self.cp2])
def __init__(self): # Define the parameters accepted by the sample function self.with_sample({ 'a' : vsc.bit_t(8), 'b' : vsc.bit_t(8) }) self.a_cp = vsc.coverpoint( self.a, bins={ # Create 4 bins across the space 0..255 'a_bins': vsc.bin_array([4], [0,255]) }) self.b_cp = vsc.coverpoint(self.b, bins={ # Create one bin for each value (1,2,4,8) 'b_bins': vsc.bin_array([], 1, 2, 4, 8) }) self.ab_cross = vsc.cross([self.a_cp, self.b_cp])
def __init__(self, v1, v2): self.cp1 = vsc.coverpoint(v1, cp_t=vsc.enum_t(my_e_1)) self.cp2 = vsc.coverpoint(v2, cp_t=vsc.enum_t(my_e_2)) self.cp1X2 = vsc.cross([self.cp1, self.cp2])