with ... select syntax

  • Thread starter Hernán Sánchez
  • Start date
H

Hernán Sánchez

Guest
Hi.

I have 2 bit signals, s_a and s_b.

I want to use both signals in just one "with .. select" statement, making a
vector with both signals:

with "s_a s_b" select
o <= "xx" when "10", ... ;

Is it possible ?

Thanks

Hernán Sánchez
 
Hi.

I think the answer is:

with bit_vector'( s_a, s_b ) select
o <= "xx" when "10", ...

Creers,

Hernán Sánchez


"Hernán Sánchez" <hernan.sanchez@iname.com> escribió en el mensaje
news:bth3r0$5fvad$1@ID-169358.news.uni-berlin.de...
Hi.

I have 2 bit signals, s_a and s_b.

I want to use both signals in just one "with .. select" statement, making
a
vector with both signals:

with "s_a s_b" select
o <= "xx" when "10", ... ;

Is it possible ?

Thanks

Hernán Sánchez
 
i just write the select statement without the bit_vector'() attribute ....

like this:


WITH digit SELECT
segs <= "1110111" when "0000",
"0010010" when "0001",
"1011101" when "0010",
"1011011" when "0011",
"0111010" when "0100",
"1101011" when "0101",
"0101111" when "0110",
"1010010" when "0111",
"1111111" when "1000",
"1111010" when "1001",
"1101101" when others;


"Hernán Sánchez" <hernan.sanchez@iname.com> wrote in message news:bthns9$7c2t1$1@ID-169358.news.uni-berlin.de...
Hi.

I think the answer is:

with bit_vector'( s_a, s_b ) select
o <= "xx" when "10", ...

Creers,

Hernán Sánchez


"Hernán Sánchez" <hernan.sanchez@iname.com> escribió en el mensaje
news:bth3r0$5fvad$1@ID-169358.news.uni-berlin.de...
Hi.

I have 2 bit signals, s_a and s_b.

I want to use both signals in just one "with .. select" statement, making
a
vector with both signals:

with "s_a s_b" select
o <= "xx" when "10", ... ;

Is it possible ?

Thanks

Hernán Sánchez
 
You are both right.

The expression in a case statement must be
locally static. Hence for something like digit
that is the name of a signal or variable, the
type is already locally static.

With concatenation, of bit, the type is not locally
static and, hence, a type qualifier is required.

Cheers,
Jim
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Jim Lewis
Director of Training mailto:Jim@SynthWorks.com
SynthWorks Design Inc. http://www.SynthWorks.com
1-503-590-4787

Expert VHDL Training for Hardware Design and Verification
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


Yttrium wrote:
i just write the select statement without the bit_vector'() attribute ...

like this:


WITH digit SELECT
segs <= “1110111” when “0000”,
“0010010” when “0001”,
“1011101” when “0010”,
“1011011” when “0011”,
“0111010” when “0100”,
“1101011” when “0101”,
“0101111” when “0110”,
“1010010” when “0111”,
“1111111” when “1000”,
“1111010” when “1001”,
“1101101” when others;


"Hernán Sánchez" <hernan.sanchez@iname.com
mailto:hernan.sanchez@iname.com>> wrote in message
news:bthns9$7c2t1$1@ID-169358.news.uni-berlin.de...
Hi.

I think the answer is:

with bit_vector'( s_a, s_b ) select
o <= "xx" when "10", ...

Creers,

Hernán Sánchez


"Hernán Sánchez" <hernan.sanchez@iname.com
mailto:hernan.sanchez@iname.com>> escribió en el mensaje
news:bth3r0$5fvad$1@ID-169358.news.uni-berlin.de...
Hi.

I have 2 bit signals, s_a and s_b.

I want to use both signals in just one "with .. select" statement,
making
a
vector with both signals:

with "s_a s_b" select
o <= "xx" when "10", ... ;

Is it possible ?

Thanks

Hernán Sánchez
 

Welcome to EDABoard.com

Sponsor

Back
Top