Re: 2D array


[ Follow Ups ] [ Post Followup ] [ ECE 532 Discussion Area ] [ FAQ ]

Posted by Michael van Dam on February 09, 1998 at 11:07:32:

In Reply to: 2D array posted by Kristin Hofstee on February 08, 1998 at 20:13:44:


: Hi,

: I'm would like to use an input of type
: STD_LOGIC_2D(7 downto 0, 7 downto 0) which
: means I have 8 'buses' (vectors) of size 8.

: MaxPlus2 help being what it is...
: I cannot find the proper format for assigning values
: to a variables of this type.

: Anyone know?

: Kristin


Someone else had a question about this near the beginning
of term. It seems that there is no 'convenient' way to
assign the values...

You cannot do (eg.):

vec (0, 7 downto 0) <= a_byte;

You can only do (eg.):

vec (0, 3) <= a_bit;

Needless to say this is a little tedious, but you can
automate this procedure somewhat by using a 'FOR' loop:

for i in 7 downto 0 loop
vec (0, i) <= a_byte (i);
end loop;



Follow Ups:


Post a Followup

Name:
E-Mail:

Subject:

Comments:

Optional Link URL:
Link Title:
Optional Image URL:


[ Follow Ups ] [ Post Followup ] [ ECE 532 Discussion Area ] [ FAQ ]