R
rickman
Guest
On Dec 5, 5:20 pm, "carlob"
<carlo.beccia@n_o_s_p_a_m.n_o_s_p_a_m.libero.it> wrote:
defined at the same time as the next staate is defined, you can get
the outputs changing at the time as the state. It just means the
outputs will use similar logic to the state logic and will depend on
both the current state and the inputs, just as the state does. This
can all be in one process.
The only limitation of a one process FSM is that the outputs can only
respond to the inputs at a clock boundary. There are cases where the
output needs to change as soon as the input changes without waiting
for the next clock.
the state changes, then you aren't coding the output to depend on the
input, only the state.
logic between registers is combinatorial, it has nothing to do with
how you code your HDL.
as the state, that shouldn't be a problem. You don't need
combinatorial code to do that.
Rick
<carlo.beccia@n_o_s_p_a_m.n_o_s_p_a_m.libero.it> wrote:
No, something is wrong with your understanding. If your outputs areAnyway...probably I was wrong...I don't need to avoid registered output
(and a lot of you were right)...in fact I'm always assigning the "output"
of a FF...therefore I'm sure that when fsm reach a state the output will
change to the value that is required on that state on the same clock
front
and I don't have to wait for another clock front to have that value on
output...
This is not completely true...state change immediately if change condition
is met...output is still at values on previous state...on the next clock
front the output goes to the new state value...this is the effect of the
output FF...I'm sorry a misunderstanding....
defined at the same time as the next staate is defined, you can get
the outputs changing at the time as the state. It just means the
outputs will use similar logic to the state logic and will depend on
both the current state and the inputs, just as the state does. This
can all be in one process.
The only limitation of a one process FSM is that the outputs can only
respond to the inputs at a clock boundary. There are cases where the
output needs to change as soon as the input changes without waiting
for the next clock.
If you are finding your outputs to be changing one clock cycle after..the difference is now clear....I've just simulated the two
situations...(1 process, 2 process-no register)...and checked the
differences....
the state changes, then you aren't coding the output to depend on the
input, only the state.
An output can be synchronous and still be purely combinatorial. AllAnyway...since all input signals "should be sinchronous" to the raise front
of the clock and the produced output MUST be synch I think that the best
way to achieve that is registering output and evaluating input on clock
raise...my previous implementation was wrong because output is allowed to
change asynchronously...I have to correct...and I think that 1 process
style fit better the requirements...
logic between registers is combinatorial, it has nothing to do with
how you code your HDL.
But if you need your output registers to change at the same clock edgeIf in some cases I will need to unreg output I will use concurrent
statements outside of the process as pointed out in the discussion...
as the state, that shouldn't be a problem. You don't need
combinatorial code to do that.
Rick