User guide

24-89
SystemVerilog Testbench Constructs
The $void() function imposes an ordering among the variables. All
parameters to $void() function calls in a constraint are solved for
before the constraint is solved.
The support set of a constraint (that is, the set of variables that
participate in that constraint) is split into two sets, namely, those that
are $void() parameters, and those that are not $void()
parameters.
1. The constraint is not considered for solving when the function
parameters incident on it are solved, that is, the function
parameters are solved before the constraint is solved.
2. The constraint can be solved when any of the non-function
parameters incident on it are solved.
3. The constraint is solved when at least one non-function parameter
incident on it is solved, unless the constraint has no non-function
parameters incident on it. In that case, the constraint acts as a
checker.
4. When the constraint is solved, all previously unsolved
non-function parameters incident on it get solved.
5. The ordering directives derived from the use of void in constraints
in OFF constraint blocks are ignored, and do not affect partitioning
in any way.
Consider the following constraint block in example:
constraint b1{
y inside {2,3};
x % $void(y) == 0;
x != (y+r);
z == $void(x*y)
r == 5;