Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > VHDL > Specify bit position in array of vectors

Reply
Thread Tools

Specify bit position in array of vectors

 
 
Shannon
Guest
Posts: n/a
 
      02-09-2007
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 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

 
Reply With Quote
 
 
 
 
weber
Guest
Posts: n/a
 
      02-09-2007
On 9 fev, 15:31, "Shannon" <(E-Mail Removed)> wrote:
> 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 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

 
Reply With Quote
 
 
 
 
Shannon
Guest
Posts: n/a
 
      02-09-2007
On Feb 9, 12:05 pm, "weber" <(E-Mail Removed)> wrote:
> On 9 fev, 15:31, "Shannon" <(E-Mail Removed)> wrote:
>
>
>
>
>
> > 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 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- Hide quoted text -
>
> - Show quoted text -


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

Thanks,
Shannon

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
What is the point of having 16 bit colour if a computer monitor can only display 8 bit colour? How do you edit 16 bit colour when you can only see 8 bit? Scotius Digital Photography 6 07-13-2010 03:33 AM
c++ primer statement about vectors containing vectors pauldepstein@att.net C++ 3 03-26-2008 06:22 PM
Ruby, SWIG and C++: how to properly wrap vector of vectors of doubles (2D vectors)? Ruby 0 09-14-2005 05:47 PM
64 bit - Windows Liberty 64bit, Windows Limited Edition 64 Bit, Microsoft SQL Server 2000 Developer Edition 64 Bit, IBM DB2 64 bit - new ! vvcd Computer Support 0 09-17-2004 08:15 PM
64 bit - Windows Liberty 64bit, Windows Limited Edition 64 Bit,Microsoft SQL Server 2000 Developer Edition 64 Bit, IBM DB2 64 bit - new! Ionizer Computer Support 1 01-01-2004 07:27 PM



Advertisments