User guide
24-95
SystemVerilog Testbench Constructs
Semantics of solve-before construct without the hard modifier
The solve-before constraints that are not modified by the “hard”
directive will be used together in a partition. Thus, the non-hard
solve-before constraints will not affect the partitioning, but will affect
the order of variable assignment within a partition, very much like
they affect the order of variable assigning on the complete problem
prior to this release.
This is illustrated by the following example:
constraint b1 {
y inside {2,3};
x % y == 0;
x != y;
z == void(x * z);
solve y, z before x;
}
The sequence in which the constraints are solved is:
1. x, y are solved using the constraints y inside {2,3}; x%y
== 0; solve y before x;.
2. z is solved using the constraint z == x*y; Note that since x is
already solved at this point, the constraint solve z before x is
irrelevant and hence dropped.
Semantics for Array Constraints (Solving Array Sizes)
Either of the two constructs defined above can be used to determine
the partition to be solved when solving for the size of an array. The
following example is used to illustrate the semantics: