← ProblemsCircuits / Sequential Logic / Finite State Machines

Six-state FSM (2012 q2)

15%fsm

Implement the FSM described by the following state diagram (shown here as a table), with input w and Moore output z:

Present stateNext state if w=0Next state if w=1Output z
AAB0
BDC0
CDE0
DAF0
EDE1
FDC1

reset is synchronous, active-high, and forces the machine to state A. Use separate combinational always blocks for the next-state and output logic if you like, or a single clocked block plus an assign — any correct style is accepted.