User guide
24-92
SystemVerilog Testbench Constructs
• A void() function being applied to a sub-expression of the
parameter of another void() function (for example, constraint
b1{x==$void(y + $void(z));}
- the runtime will ignore the nested $void() specifications (that
is, same as x==$void(y+z).
Whenever the compile is not able to detect such conditions, no
warning is issued at runtime.
solve-before hard. The solve-before construct allows for an optional
hard modifier.
Example 24-3
constraint b1{
y inside (2,3};
x%y == 0;
solve y before x hard;
}
The use of hard solve-before imposes an ordering mechanism
between the variables. You can use ordering to assign a priority
order to each variable. A higher priority indicates that the variable
should be solved earlier.
Array Variable: If the argument to solve before hard is an array, the
array is expanded into its individual elements before ordering is
imposed which is similar to solve-before operation. See page 97 for
examples on how this happens.
The set of variables incident on a constraint is split into two sets –
those at the lowest priority among the incident variables and those
not at the lowest priority. Then the following semantic rules apply:
1. The constraint is not considered when any but the lowest priority
variables incident on it are solved (that is, the higher priority
variables are solved before the constraint is solved.