User guide
24-76
SystemVerilog Testbench Constructs
• A range of 1 to 2, each value in this range has a weight of 1. The
:= operator, when applied to a range, specifies applying the
weight to each value in the range.
• A range of 6 to 7 with a weight of 5. The :/ operator specifies
applying the weight to the range as a whole.
• 9 with a weight of 10, which is twice as much as the weight for 6.
The repeat loop repeats 1700 times so that we have a large enough
sample. The following table shows the various values of int1 during
simulation:
Implications
An implication is an expression that must be true before VCS applies
the constraint.
program prog;
class Bus;
randc bit randcvar;
bit norandvar;
value of int number of times int has this value fraction of the simulation time
1 105 1/17
298 1/17
30
40
50
6 248 2.5/17
7 251 2.5/17
80
9 998 10/17