User guide

24-39
SystemVerilog Testbench Constructs
if(i)
$display("Randomization Success");
else
$display("Randomization Fails");
end
endprogram
Notes
1. Empty array - If the array over which the aggregate operation is
defined has size 0, then the behavior is as follows:
- array.sum(): The expression is substituted by 0.
- array.product(): The expression is substituted by 1.
For all other aggregate methods there is a runtime error if
reference to the aggregate operation is in an ON constraint block.
2. Array types - The array aggregate methods and the foreach loop
support the fixed size array, dynamic array, associative array,
and SmartQ types of arrays in every context.
Unsupported features in Array aggregates:
Using virtual interfaces to refer to variables inside array
constraints.
Array aggregates of SV style (and, xor, or, etc.)
Array aggregates outside constraint blocks (and, xor, or, etc).
Array aggregates with usage as follows: array.cum with (item ==
item.index).