0

Verilog code that my question is about

In the code linked above, which is a standard Verilog FSM, I want to clear up exactly how the state transition works. The sequential portion of the code does the assigning for the next state, but my confusion is how does it go from that sequential section to selecting the proper next state from the combinational section of code?

Is it that at the clock edge, since the "current state" is being re-assigned a new value at the clock edge, it automatically triggers the sensitivity list in the combinational section of code, which is what then correctly selects the value of next state?

1 Answer 1

1

In your example, @(*) is equivalent to @(state or start or restart). So any change to one of those signals causes next_state to get re-evaluated.

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks for the response! So am I right in thinking that since the sequential section has the state assignment at each clock edge, so that "state" is forced to change, that triggers the @(*) sensitivity list so that it then calculates "next_state"?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.