Problem related with a concurren statement.

V

vijay

Guest
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.
 
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.
 
vijay wrote:

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
 
vijay wrote:
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.
--
Tim Hubberstey, P.Eng. . . . . . Hardware/Software Consulting Engineer
Marmot Engineering . . . . . . . VHDL, ASICs, FPGAs, embedded systems
Vancouver, BC, Canada . . . . . . . . . . . http://www.marmot-eng.com
 

Welcome to EDABoard.com

Sponsor

Back
Top