Some of the FSM has been revised

Redrew the FSM, still need to add more states for the exception and
interrupt handling.