Can we use current_state/next_state signals for particular output signal generation?

Status
Not open for further replies.

bharat_in

Member level 4
Joined
Oct 5, 2006
Messages
78
Helped
9
Reputation
18
Reaction score
7
Trophy points
1,288
Activity points
1,716
Just a concern about output signal generation from FSM...

Can we use current_state and next_state signals for particular output signal generation?

// cosider below FSM is based on one-hot encoding :|
e.g. fsm_out = ( !cur_state[7] && next_state[7]);

Is it bad coding style? If Yes, then why?
 

FSM outputs

This sort of makes a "mealy" kind of state machine.

It is not necessary bad, but you should be aware that this signal is generated asynchronously and directly depends on inputs (if next state depends on inputs)
 

    bharat_in

    Points: 2
    Helpful Answer Positive Rating
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…