Open hardy-hq opened 1 year ago
Looks like you have two random variables here, but 'vc_bond_en' is always '0'. Variables 'a*n' are multidimensional arrays - please use just int as it is extremely difficult to debug.
But I want to constrain the array sum, isn't there a way to do that?
Constraints works on random variables - you defined random variables only "total_phynum" and "vc_bond_en".
I tried to add a random two-dimensional array (a1_en) to the constraint, but the domain of the add_rand function can only be a one-dimensional list?
self.a1_en = 0
self.add_rand("a1_en",np.random.randint(2,size=(4,4)))
Please have a look into documentation how to deal with such costraints: https://cocotb-coverage.readthedocs.io/en/latest/tutorials.html#randomization-order-and-performance-issues
@hardy-hq was your problem resolved?
hello!I want to implement a constraint as follows,but it can't find a suitable solution
this is my py code using crv,but “ Could not resolve constraints!” error is reported after execution.
Is there another way to write this to implement sv constraints?Thank you very much