Closed ShreyanJabade closed 3 years ago
Hello, The unary ~ operator gives error is_signed unimplemented (<class 'vsc.model.expr_unary_model.ExprUnaryModel'>)
is_signed unimplemented (<class 'vsc.model.expr_unary_model.ExprUnaryModel'>)
I request you to look into this aspect. Thank you
import vsc import random # random.seed(0) @vsc.randobj class Test: def __init__(self): self.a = vsc.rand_bit_t(8) self.b = vsc.rand_bit_t(8) @vsc.constraint def test_c(self): self.a == ~self.b inst = Test() inst.randomize() print("a =", inst.a, "b =", inst.b) print("Binary representation of a:", f"{inst.a:b}") print("Binary representation of b:", f"{inst.b:b}")
Output is:
Failed with expression: (a == !(b)) is_signed unimplemented (<class 'vsc.model.expr_unary_model.ExprUnaryModel'>)
Corrected in 0.4.4. This bug was a side-effect from the improved expression-width tracking implemented for #81.
Hello, The unary ~ operator gives error
is_signed unimplemented (<class 'vsc.model.expr_unary_model.ExprUnaryModel'>)
I request you to look into this aspect. Thank you
Output is: