Variables are showing abnormal values in Time simulation

Joined
Sep 23, 2008
Messages
2
Reaction score
0
I am new to VHDL and using Quartus II to synthesis my program. My functional simulation is ok but when I am doing time simulation the values of variables : queue_length and x10_queue are showing some values that do not follow my code.

---------------------------------------------------------------------------------------------------------------

if (clk'event and clk='1') then
if (x10_packet_in/=0) and (x10_packet_in/=prev_packet) and (queue_length/=10) then
x10_queue(rear):=x10_packet_in;
prev_packet:=x10_packet_in;
rear:=rear+1;
queue_length:=queue_length+1;
if rear = 10 then
rear:=0;
end if;
end if;

----------------------------------------------------------------------------------------------------------------

Values of queue_length variable should be incremented by 1 each time. But its sequence is like 0-1-2-3-2-7-3-8-5-10 …… .Why it is behaving like this??

queue_length and rear should be same but its showing difference.

And sometimes values of x10_queue variable is becoming 0 after inserting a value. I attached the vwf file here.

Can any one explain this for me? I don’t know what mistake I am doing here. Functional simulation is quite ok. Please help , I am totally stuck here. No way to proceed.

Thanks in advanced.

Raisul
 

Attachments

  • x10_receive_with_error.sim.zip
    6.5 KB · Views: 73
Last edited:

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,564
Members
45,039
Latest member
CasimiraVa

Latest Threads

Top