Exemple #1
0
            def __init__(self):
                self.with_sample(dict(a=vsc.uint8_t(), b=vsc.uint8_t()))

                self.a_cp = vsc.coverpoint(
                    self.a, bins=dict(a_bins=vsc.bin_array([], [1, 16])))
                self.b_cp = vsc.coverpoint(
                    self.b, bins=dict(b_bins=vsc.bin_array([], [1, 16])))
Exemple #2
0
 def __init__(self, sample_c):
     self.with_sample(dict(a=vsc.uint8_t(), b=vsc.uint8_t()))
     self.cp1 = vsc.coverpoint(self.a,
                               iff=sample_c,
                               bins={
                                   "a": vsc.bin_array([], 1, 2, 4),
                                   "b": vsc.bin_array([4], [8, 16])
                               })
Exemple #3
0
 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)
Exemple #4
0
            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),
                                          })
                self.cp2 = vsc.coverpoint(
                    self.b, bins={"b": vsc.bin_array([], 1, 2, 4, 8)})
Exemple #5
0
            def __init__(self):
                self.with_sample(dict(a=vsc.uint8_t(), b=vsc.uint8_t()))

                self.cp1 = vsc.coverpoint(self.a,
                                          bins={
                                              "a": vsc.bin_array([], 1, 2, 4,
                                                                 8),
                                          },
                                          options=dict(weight=1))
                self.cp2 = vsc.coverpoint(
                    self.b,
                    bins={"b": vsc.bin_array([], 1, 2, 4, 8)},
                    options=dict(weight=0))
Exemple #6
0
 def __init__(self, 
              name="",
              size_in_bytes=-1,
              xwr=0):
     self.name = name
     self.size_in_bytes = vsc.uint32_t(i=size_in_bytes)
     self.xwr = xwr = vsc.uint8_t(i=xwr)
Exemple #7
0
 def __init__(self):
     self.comment = ""
     self.exception = vsc.rand_enum_t(illegal_instr_type_e)
     self.reserved_c = vsc.rand_enum_t(reserved_c_instr_e)
     self.instr_bin = vsc.rand_bit_t(32)
     self.opcode = vsc.rand_bit_t(7)
     self.compressed = vsc.rand_bit_t(1)
     self.func3 = vsc.rand_bit_t(3)
     self.func7 = vsc.rand_bit_t(7)
     self.has_func3 = vsc.rand_bit_t(1)
     self.has_func7 = vsc.rand_bit_t(1)
     self.c_op = vsc.rand_bit_t(2)
     self.c_msb = vsc.rand_bit_t(3)
     self.csrs = []
     # Default legal self.opcode for RV32I instructions
     self.legal_opcode = vsc.list_t(vsc.bit_t(7))
     self.legal_opcode = [3, 15, 19, 23, 35, 55, 99, 51, 103, 115, 111]
     # Default legal self.opcode for RV32C instructions
     self.legal_c00_opcode = vsc.list_t(vsc.bit_t(3))
     self.legal_c00_opcode = [0, 2, 6]
     self.legal_c10_opcode = vsc.list_t(vsc.bit_t(3))
     self.legal_c10_opcode = [0, 2, 4, 6]
     self.xlen = vsc.uint8_t(0)
     self.xlen = rcs.XLEN
     self.temp_1 = vsc.bit_t(6)
Exemple #8
0
 def __init__(self):
     self.with_sample(dict(a=vsc.uint8_t()))
     self.cp_val = vsc.coverpoint(
         self.a,
         bins=dict(rng_1=vsc.bin_array([4], [1, 3], [4, 6], [7, 9],
                                       [10, 12])),
         ignore_bins=dict(invalid_value=vsc.bin(4)))
Exemple #9
0
            def __init__(self):
                super().__init__()
                self.a = vsc.rand_bit_t(8)
                self.b = vsc.rand_bit_t(8)
                self.l = vsc.list_t(vsc.uint8_t())

                for i in range(4):
                    self.l.append(i)
Exemple #10
0
 def __init__(self):
     self.addr = rand_bit_t(16)
     self.read_write = rand_enum_t(ubus_read_write_enum)
     self.size = rand_bit_t(32)
     self.data = vsc.randsz_list_t(vsc.uint8_t())
     self.wait_state = vsc.randsz_list_t(vsc.bit_t(4))
     self.error_pos = rand_bit_t(32)
     self.transmit_delay = rand_bit_t(32)
     self.master = ""
     self.slave = ""
 def __init__(self):
     self.has_rs1 = vsc.uint8_t(1)
     self.has_rs2 = vsc.uint8_t(1)
     self.has_rd = vsc.uint8_t(1)
     self.avail_regs = vsc.rand_list_t(vsc.uint8_t(0), 10)
     self.reserved_rd = vsc.rand_list_t(vsc.uint8_t(0), 10)
     self.reserved_regs = vsc.rand_list_t(vsc.uint8_t(0), 10)
     self.rd = vsc.rand_uint8_t(0)
     self.rs1 = vsc.rand_uint8_t(0)
     self.rs2 = vsc.rand_uint8_t(0)
     self.format = vsc.uint8_t(2)
Exemple #12
0
            def __init__(self, n_cp):
                var_names = ["a", "b", "c", "d"]

                # Create a variable for all possible variables
                parameters = dict()
                parameters.update(map(lambda n: (n, vsc.uint8_t()), var_names))
                self.with_sample(parameters)

                self.coverpoints = []
                for i in range(n_cp):
                    self.coverpoints.append(
                        vsc.coverpoint(
                            getattr(self, var_names[i]),
                            bins=dict(values=bin_array([], [1, 15]))))
Exemple #13
0
            def __init__(self):
                self.with_sample(dict(a=vsc.uint8_t(), b=vsc.uint8_t()))

                self.a_cp = vsc.coverpoint(self.a,
                                           bins={"a": bin_array([], [0, 15])})
Exemple #14
0
 def __init__(self):
     self.with_sample(dict(a=vsc.uint8_t()))
     self.a_cp = vsc.coverpoint(
         self.a, bins=dict(a1=vsc.bin_array([4], (0, 16))))
Exemple #15
0
 def __init__(self):
     self.en_one = vsc.uint8_t()
     self.en_two = vsc.uint8_t()
     self.a = vsc.rand_uint8_t()
Exemple #16
0
 def __init__(self):
     self.a = vsc.rand_uint8_t()
     self.b = vsc.uint8_t()
Exemple #17
0
 def __init__(self):
     self.a = vsc.uint8_t(1)
     self.b = vsc.uint8_t(2)
     self.c = vsc.uint8_t(2)
     self.arr = vsc.rand_list_t(vsc.uint8_t(), 10)
Exemple #18
0
 def __init__(self):
     self.with_sample(dict(a=vsc.uint8_t()))
     self.cp = vsc.coverpoint(self.a)
Exemple #19
0
 def __init__(self):
     self.l = vsc.randsz_list_t(vsc.uint8_t())
     self.a = vsc.rand_uint8_t()
Exemple #20
0
 def __init__(self):
     super().__init__()
     self.num_of_nested_loop = vsc.rand_bit_t(8)
     self.loop_init_val = vsc.randsz_list_t(vsc.uint8_t())
Exemple #21
0
 def __init__(self):
     self.my_arr = vsc.rand_list_t(vsc.uint8_t(), 16)
Exemple #22
0
 def __init__(self):
     self.temp = vsc.randsz_list_t(vsc.uint8_t())
     self.a = vsc.list_t(vsc.uint8_t(), init=[1, 2, 3, 5, 6, 7, 8])
Exemple #23
0
 def __init__(self):
     self.a_list = vsc.rand_list_t(vsc.uint8_t(),7)
     self.temp_list = vsc.rand_list_t(vsc.uint8_t(),7)
     self.c = 0
Exemple #24
0
 def __init__(self, name):
     self.with_sample(dict(a=vsc.uint8_t()))
     self.set_name(name)
     self.cp = vsc.coverpoint(self.a)
Exemple #25
0
 def __init__(self, name):
     self.with_sample(dict(a=vsc.uint8_t()))
     self.options.name = name
     self.cp = vsc.coverpoint(self.a)
Exemple #26
0
 def __init__(self):
     super().__init__()
     self.vals = vsc.rand_list_t(vsc.uint8_t(), sz=16)
Exemple #27
0
 def __init__(self):
     self.l = vsc.rand_list_t(vsc.uint8_t(), sz=5)
     self.a = vsc.rand_uint8_t()
Exemple #28
0
 def __init__(self):
     self.main_program = vsc.rand_uint8_t()
     self.total = vsc.rand_uint8_t()
     self.sub_program = vsc.rand_list_t(vsc.uint8_t(), sz=10)
Exemple #29
0
 def __init__(self):
     self.a = vsc.rand_uint8_t()
     self.b = vsc.rand_uint8_t()
     self.temp = vsc.list_t(vsc.uint8_t())
     self.temp = [1, 3, 4, 12, 13, 14]
Exemple #30
0
            def __init__(self, a, b):

                self.a_cp = vsc.coverpoint(a, cp_t=vsc.uint8_t())
                self.b_cp = vsc.coverpoint(b, cp_t=vsc.uint8_t())