-
Hi @mballance, @vsc.covergroup
class fcvt_s_w_cg(object):
def __init__(self, precision, sign_typ):
super().__init__()
self.instr = None
self.cp_rs1 = vsc.coverpoint(lambda: self.instr.rs1,
cp_t=vsc.enum_t(riscv_reg_t))
self.cp_fd = vsc.coverpoint(lambda: self.instr.fd,
cp_t=vsc.enum_t(riscv_fpr_t))
self.cp_rs1_sign = vsc.coverpoint(lambda: self.instr.rs1_sign,
cp_t=vsc.enum_t(operand_sign_e))
# How can I specify weight option w.r.t sign_typ here?
self.cp_fd_sign = vsc.coverpoint(lambda: self.instr.fd_sign,
cp_t=vsc.enum_t(operand_sign_e))
self.cp_gpr_hazard = vsc.coverpoint(lambda: self.instr.gpr_hazard,
cp_t=vsc.enum_t(hazard_e))
I have tried adding there but was ended up with a syntax error. Thanks and Regards, |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hi @aneels3, pyvsc/ve/unit/test_covergroup_options.py Lines 58 to 75 in 612de9e I checked the documentation and realized that it was a bit out of date, so I've made a few updates there as well. Best Regards, |
Beta Was this translation helpful? Give feedback.
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:pyvsc/ve/unit/test_covergroup_options.py
Lines 58 to 75 in 612de9e
I c…