with ... select syntax

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

Hernán Sánchez

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
 
H

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
 
Y

Yttrium

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;
 
J

Jim Lewis

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:[email protected]
SynthWorks Design Inc. http://www.SynthWorks.com
1-503-590-4787

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

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,763
Messages
2,569,562
Members
45,039
Latest member
CasimiraVa

Latest Threads

Top