8 |
||||||
|
||||||
Finite state machine (FSM) coverage answers the question, "Did I reach all of the states and traverse all possible paths through a given state machine?" |
||||||
There are two types of coverage detail for FSMs that Covered can handle: |
||||||
|
||||||
Example |
Suppose the DUT comprised of the following finite state machine. |
|||||
module test( clock ); |
||||||
To help visualize this state machine, let's also display it as a digraph. |
||||||
|
||||||
This state machine has four states: IDLE, REQ, WAIT, GNT. During simulation, 75% of the states were hit (3 out of 4) including IDLE, REQ and GNT. You can see that the WAIT state was never hit during simulation since the gnt signal was asserted the clock period after the req signal asserted. |
||||||
Additionally, this state machine contains 7 state "arcs" which are represented in the digraph as arrowed lines. They are the following: |
||||||
|
||||||
Counting the number of traversed arcs during simulation, we can see that we have covered 4 out of 7 (or 57%) of the possible arcs in this state machine. |
||||||
Recommendations |
For a design to pass full coverage, it is recommended that the FSM coverage for all finite state machines in the design to receive 100% coverage for the state coverage and 100% for all achievable state transitions. Since Covered will not determine which state transitions are achievable, it is up to the verification engineer to examine the executed state transitions to determine if 100% of possible transitions occurred. |
|||||
[ 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 ] License: GPL This Manual was originally created with ManStyle. |