VHDL bit_vector overload problem

#2576590
Rate this post
useful
not useful
Sorry for the german ...

Ok you wrote

when 0 =>
  if input = "0000000001" then
  next_state <= 1;
  else
        next_state <= 0;
  end if;

so it depends on the input - how ist the input connected? How long is 
the input provided? I mean, if the input is only for a very short time 
not 0, then it is most of the time 0. And then your next_state = 2 and 
also current_state, because current_state is updated every clock.

Edit:
The process depends on current_state and input.

So if we step along, say current_state=0 and input= "0000000001" then 
the process assigns next_state to 1.
BUT: in the next clockcycle, current_state is updated to next_state, in 
this case to 1.
Because current_state ist updated, the process runs again and now with 
input still "0000000001" it goes to

when 1 =>
and because input is not "0000000000" the next_state = 0.

And so on. Now current_state is updated to 0 and it begins again even if 
the input doesn't change.

I don't know if it helps, but i would test if it works woth only input 
in the sensitivity list

process(input)

Reply

Please log in before posting.

or

Log in with Google account

Registration is free and takes only a minute.

Register now