
The following is the state transition table for a Moore state machine
with one input, one output, and four states. Implement this state
machine. Include a synchronous active high reset that resets the FSM to
state A.

  State | Next state in=0, Next state in=1 | Output
  A     | A, B                             | 0
  B     | C, B                             | 0
  C     | A, D                             | 0
  D     | C, B                             | 1

module TopModule (
  input clk,
  input in,
  input reset,
  output out
);

