Specify bit position in array of vectors

S

Shannon

Gosh, it didn't take long for me to need help again! I promise this
is my last question for awhile.

I have four books on VHDL and Google didn't help.

How do I specify a bit position in an array of std_logic_vectors?

TYPE arraytype IS ARRAY (0 TO 8) OF STD_LOGIC_VECTOR(7 DOWNTO 0);
SIGNAL foo : std_logic;
SIGNAL big_array : arraytype;

....


foo <= big_array(5,2); -- yes I know this is wrong. What is the
syntax to pick bit #2 of big_array(5)?

Thanks again!

Shannon
 
W

weber

Gosh, it didn't take long for me to need help again! I promise this
is my last question for awhile.

I have four books on VHDL and Google didn't help.

How do I specify a bit position in an array of std_logic_vectors?

TYPE arraytype IS ARRAY (0 TO 8) OF STD_LOGIC_VECTOR(7 DOWNTO 0);
SIGNAL foo : std_logic;
SIGNAL big_array : arraytype;

...

foo <= big_array(5,2); -- yes I know this is wrong. What is the
syntax to pick bit #2 of big_array(5)?

Thanks again!

Shannon

Isn't it big_array(5)(2) ?
Can't imagine another way!
Cheers
weber
 
S

Shannon

Isn't it big_array(5)(2) ?
Can't imagine another way!
Cheers
weber- Hide quoted text -

- Show quoted text -

Yep. That did it. (I imagined all kinds of ways! None of them
correct...hehehe)

Thanks,
Shannon
 

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,997
Messages
2,570,239
Members
46,827
Latest member
DMUK_Beginner

Latest Threads

Top