eliminate concurrent statement

Discussion in 'VHDL' started by Aji, Jan 4, 2006.

  1. Aji

    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, Jan 4, 2006
    #1
    1. Advertising

  2. Aji

    Guest

    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';
    , Jan 4, 2006
    #2
    1. Advertising

  3. Aji

    Aji Guest

    <> a écrit dans le message de news:
    ...
    >
    > 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
    Aji, Jan 4, 2006
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Pep
    Replies:
    6
    Views:
    810
  2. Massi
    Replies:
    3
    Views:
    8,998
    jetq88
    Jan 15, 2007
  3. Daniel
    Replies:
    6
    Views:
    758
    Thomas Stanka
    Jan 30, 2008
  4. Philipp

    Illegal concurrent statement?

    Philipp, Jul 4, 2008, in forum: VHDL
    Replies:
    4
    Views:
    972
  5. Allan Herriman
    Replies:
    16
    Views:
    490
    Allan Herriman
    Feb 14, 2013
Loading...

Share This Page