Transitional functional point bin is used to examine the legal transitions of a value. SystemVerilog allows to specifies one or more sets of ordered value transitions of the coverage point.
Type of Transitions:
Single Value Transition
Sequence Of Transitions
Set Of Transitions
Consecutive Repetitions
Range Of Repetition
Goto Repetition
Non Consecutive Repetition
Single Value Transition
Single value transition is specified as:
value1 => value2
program main;
bit [0:3] y;
bit [0:2] values[$]= '{3,5,6};
cg cg_inst = new();
initial foreach(values[i])
begin y = values[i];
cg_inst.sample();
end
endprogram
In the above example, 2 bins are created for covering the transition of point "y" from 3 to 4 and other for 5 to 6. The variable y is given the values and only the transition 5 to 6 is occurring.
cg cg_inst = new();
initial foreach(values[i])
begin y = values[i];
cg_inst.sample();
end
endprogram
In the above example, 2 bins re created for covering the transition of point "y" from 3 to 4 to 5 and other for 3 to 5 to 6. The variable y is given the values and only the transition 3 to 5 to 6 is occurring.
The goto repetition is specified using: trans_item [-> repeat_range]. The required number of occurrences of a particular value is specified by the repeat_range. Any number of sample points can occur before the first occurrence of the specified value and any number of sample points can occur between each occurrence of the specified value. The transition following the goto repetition must immediately follow the last occurrence of the repetition.
For example:
3 [-> 3]
is the same as
...=>3...=>3...=>3
where the dots (...) represent any transition that does not contain the value 3.
A goto repetition followed by an additional value is represented as follows:
1 => 3 [ -> 3] => 5
is the same as
1...=>3...=>3...=>3 =>5
program main;
bit [0:3] y;
bit [0:2] values[$]= '{1,6,3,6,3,6,3,5};
The nonconsecutive repetition is specified using: trans_item [= repeat_range]. The required number of occurrences of a particular value is specified by the repeat_range. Any number of sample points can occur before the first occurrence of the specified value and any number of sample points can occur between each occurrence of the specified value. The transition following the nonconsecutive repetition may occur after any number of sample points so long as the repetition value does not occur again.
For example:
3 [= 2]
is same as
...=>3...=>3
A nonconsecutive repetition followed by an additional value is represented as follows:
1 => 3 [=2] => 5
is the same as
1...=>3...=>3...=>5
program main;
bit [0:3] y;
bit [0:2] values[$]= '{1,6,3,6,3,6,5};