Problem related with a concurren statement.

V

vijay

Hi,

I am having a concurrent statement in when-else format . The concurrent
statement compares some bits and assigns it's outout to a pin say
"Error". The concurrent statement is as follows.

Error <= ( (Data(4) AND DATA(3)) OR
(Data(4) AND DATA(2)) OR
(Data(4) AND DATA(1)) OR
(Data(3) AND DATA(1)) OR
(Data(3) AND DATA(2)) OR
(Data(3) AND DATA(1))
) WHEN IP = '1' else '0';

My simulation code is working fine.

The above output "Error" is connected to an LED.

But on board when i am testing the output "Error" is not getting value.
There are no harware problems on board. The problem is purely due to
the above statement.

I also tried using with-select statement but the result is the same.

Please let me know if there are problem in the above concurrent
statement.

Thanks and Regards,
Vijay.
 
J

Jezwold

Assuming that you are correct and I dont see why it shouldnt work then.
Are you sinking or sourcing the current?
Have you got the output as open drain?
Have you looked at the output with a scope?
Have you got the correct resistor value?
if youve checked all that hten i dunno why its not working.
 
M

Mike Treseler

vijay said:
The above output "Error" is connected to an LED.
But on board when i am testing the output "Error" is not getting value.

Maybe the LED is pulsing at a low duty cycle.
Put a scope on it.
Error <= ( (Data(4) AND DATA(3)) OR
(Data(4) AND DATA(2)) OR
(Data(4) AND DATA(1)) OR
(Data(3) AND DATA(1)) OR
(Data(3) AND DATA(2)) OR
(Data(3) AND DATA(1))
) WHEN IP = '1' else '0';

My simulation code is working fine.

Maybe the simulation has good data, but
the board gets all zeros for data.

-- Mike Treseler
 
T

Tim Hubberstey

vijay said:
Hi,

I am having a concurrent statement in when-else format . The concurrent
statement compares some bits and assigns it's outout to a pin say
"Error". The concurrent statement is as follows.

Error <= ( (Data(4) AND DATA(3)) OR
(Data(4) AND DATA(2)) OR
(Data(4) AND DATA(1)) OR
(Data(3) AND DATA(1)) OR
(Data(3) AND DATA(2)) OR
-- (Data(3) AND DATA(1))

(Data(2) AND DATA(1))
-- I suspect this is what you really wanted
) WHEN IP = '1' else '0';

My simulation code is working fine.

The above output "Error" is connected to an LED.

But on board when i am testing the output "Error" is not getting value.
There are no harware problems on board. The problem is purely due to
the above statement.

I also tried using with-select statement but the result is the same.

Please let me know if there are problem in the above concurrent
statement.

As Mike said, it might be the dudy cycle on your output is too low to be
visible. Also, make sure your LED is turned on by a hi output, not a low.
 

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

No members online now.

Forum statistics

Threads
473,777
Messages
2,569,604
Members
45,227
Latest member
Daniella65

Latest Threads

Top