26.5k views
1 vote
draw a state diagram for an FSM with an input gcnt and three outputs x,y, and z. The xyz outputs generate a sequence called a Gray code in which exactly one of the three outputs changes from 0 to 1 or from 1 to 0. The Gray code sequence that the FSM should output is 000, 010, 011, 001, 101, 111, 110, 100, repeat. The output should change only on a rising clock edge when the input gcnt = 1. Make the initial state 000.

User Cmbarbu
by
8.4k points

1 Answer

6 votes

Final answer:

To draw a state diagram for an FSM with inputs gcnt and outputs x, y, and z, we need to define the states and transitions. The FSM should output a Gray code sequence where exactly one output changes from 0 to 1 or 1 to 0. The initial state is 000.

Step-by-step explanation:

To draw a state diagram for an FSM with inputs gcnt and outputs x, y, and z, we need to define the states and the transitions between them. In this case, the FSM should output a Gray code sequence, which means that exactly one output changes from 0 to 1 or from 1 to 0 for each transition. The initial state is 000.

Here is the state diagram:

The diagram shows three states: 000, 001, and 010. From state 000, when gcnt = 1, the FSM transitions to state 010, and the outputs x, y, and z change from 0 to 1, 0 to 1, and 0 to 0, respectively. From state 010, when gcnt = 1, the FSM transitions to state 011, and the outputs x, y, and z change from 0 to 0, 1 to 1, and 0 to 1, respectively. This pattern continues for the remaining transitions.

User Durdenk
by
8.1k points