Issues with getting into state

OP #3642060
Rate this post
useful
not useful
I am having som problems with my code.


I've written some code which changes the state when the switches i press 
matches the sequence i check it for..
The sequence is in an array, and for reason is the array very weird (for 
me to understand)..
But for some reason , even when i press the correct sequence does it not 
enter the next state.

I tried simulating it, and i haven't been able to see where i am Going 
wrong so this is my last chance to find out where i am going wrong.

Please help..
Attached files:
Moderator (Company: Titel) #3643217
Rate this post
useful
not useful
John Mayer wrote:
> I've written some code
1
    if switch /= "0000" then
2
  if switch = LISTEN(pointer+1) and (pointer-1) < top_pointer  then
You MUST NOT use external asynchronous signals without synching them to 
the FPGAs clock with two flipflops. Otherwise you will experience 
strange and unexpected behaviour now and then...

John Mayer wrote:
> I tried simulating it,
With what simulator?
If it is ISIM its clear:
> and i haven't been able to see where i am Going wrong
You cannot trace variables with ISIM.
> so this is my last chance to find out where i am going wrong.
No, it isn't the last chance to let others do your work without saying 
WHAT you expect and WHAT you get.
> even when i press the correct sequence
What ist "the correct sequence"? Where can "the correct sequence" be 
found in your test bench? Why do you post the complete projekt when it 
would be enough to see the two questionable vhdl files?

So my conclusion is: use signals instead of all those variables!
You do not need those variables and without them you will not get in 
troubles with the behaviour of variables. And additionally you will be 
able to SEE and TRACE the signal in the simulator.

Reply

Please log in before posting.

or

Log in with Google account

Registration is free and takes only a minute.

Register now