eliminate concurrent statement

A

Aji

Guest
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.
 
Aji wrote:
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';
 
<charles.elias@wpafb.af.mil> a écrit dans le message de news:
1136378859.288069.44860@z14g2000cwz.googlegroups.com...
Aji wrote:
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';

Thank you Charles, I'll try this.

Aji
 

Welcome to EDABoard.com

Sponsor

Back
Top