I have this multiple fields that need to be constrained in this manner:
struct my_struct {
a : uint;
b : uint;
c : uint;
d : uint;
keep 3*a + 4*b + 5*c + 6*d == 206 and a + b + c + d == 50;
my_method() @clk_event is {
while (TRUE) {
if (ctr == 0) {
gen a;
gen b;
gen c;
gen d;
};
if (ctr == 50) {
ctr = 0;
} else {
ctr += 1;
};
wait cycle;
};
};
};
I basically want to generate a new set of values for a
, b
, c
, and d
periodically. The above code is not working as their values did not change in my simulation. Any idea how to do it?