Subject: [sv-ec] Can an ordering constraint cause the solver to fail ?
From: Ryan, Ray (Ray_Ryan@mentorg.com)
Date: Tue Dec 02 2003 - 16:02:38 PST
In section 12.4.8 Variable ordering, referring to ordering constraints, the
LRM states that:
"The constraints provide a mechanism for ordering variables so that s can be
chosen independently of d."
This statement is referring to the constraint "solve s before d".
Since s is "chosen independently of d", can the choice for 's' result in a
constraint
for 'd' than that cannot be met. For example:
class B
rand bit[7:0] x, y;
constraint c1 { 2*y == x; }
constraint ord { solve x before y; }
end class
When 'x' is solved before 'y', if an even value is choosen for 'x', then
when 'y' is
solved there is a solution. However, if an odd value is choosen, then the
solver cannot
choose a value for 'y' that meets constraint 'c1'.
My expectation is case is unstable / over-constrainted and it is valid for
the
solver to sometimes fail.
Thanks,
Ray
This archive was generated by hypermail 2b28 : Tue Dec 02 2003 - 16:15:52 PST