eliminate concurrent statement

A

Aji

Hi,

I would like to do something like :

if a < b then c <= '1'; else c <= '0'; end fi;

where a and b are SIGNED vectors and c is std_logic.

I get the warning "Illegal concurrent statement" because it is not embedded
inside a process block.

I don't really need the if then else structure to implement what I want.
Basically, I just want the bit corresponding to the sign of a-b to be
connected to c. How can I do this without the if then else statement so that
I don't get the "Illegal concurrent statement" warning.

Thanks.

PS : I am a beginner.
 
C

charles.elias

Aji said:
Hi,

I would like to do something like :

if a < b then c <= '1'; else c <= '0'; end fi;

where a and b are SIGNED vectors and c is std_logic.

I get the warning "Illegal concurrent statement" because it is not embedded
inside a process block.

I don't really need the if then else structure to implement what I want.
Basically, I just want the bit corresponding to the sign of a-b to be
connected to c. How can I do this without the if then else statement so that
I don't get the "Illegal concurrent statement" warning.

Thanks.

PS : I am a beginner.

c <= '1' when a < b else '0';
 

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,769
Messages
2,569,578
Members
45,052
Latest member
LucyCarper

Latest Threads

Top