Adding functional coverage to a verification environment involves three steps.
( directly maps to your test plan )
2. Implementing the functional coverage monitors.
3. Running simulation to collect the functional coverage and functional coverage analysis.
Methodology of identifying functional coverage points and cross coverage points can be explained with a simple USB2.0 Bulk transfer example.
12 diffrent axis have been identified for a simple USB 2.0 bulk transfer. Total no of basic coverage points for this functional coverage group is 34 coverage points. Now we need to get the cross coverage points. So what is a cross coverage point ? Cross coverage is the valid combinations of the identified axis for example one cross coverage point can be
HS(speed) --> IN(direction) -->ACK(response) -->SMALL(length) --> No (data toggle error)
--> No (crc error) -->No ( pid error) --> SMALL (No of tokens per uframe)
--> No ( token error) --> ODD (payload) --> OFF (ping token)
We need to identify all the cross coverage points for this functional coverage group. Each of the cross coverage point is an test scenario. The way to find all the cross coverage point is to simply cross all the axis which will give you all the possible combinations, now eliminate the invalid combinations. Eliminating the invalid cross can be done using ignore construct or bad state construct in VERA/NTB.
example :: finding the cross coverage points for Axis1 and Axis2 alone. ( In the actual scenario all the axis should be taken in to account). possible cross coverage points
HS --> IN, HS -->OUT , FS --> IN , FS-->OUT
4 cross coverage points have been identifyed by crossing Axis 1 and Axis 2.
Now the identified functional coverage / cross coverage points need to be implemented in VERA/NTB/SV as a coverage group and integrated to the verification environment.