Array of std_logic_vector

  • Thread starter Willem Oosthuizen
  • Start date
W

Willem Oosthuizen

I have the following:

type AA is array(6 downto 0) of std_logic_vector(5 downto 0);
signal Thing: AA;

begin

Thing(0,0) <= '1';

......
The Synth complains about the assignment: "Indexing operation does not match
dimensionality of array"

Any suggestions?
 
M

Mario Trams

Willem said:
I have the following:

type AA is array(6 downto 0) of std_logic_vector(5 downto 0);
signal Thing: AA;

begin

Thing(0,0) <= '1';

.....
The Synth complains about the assignment: "Indexing operation does not
match dimensionality of array"

Any suggestions?

Of course, wrong indexing syntax.
It has to be

Thing(0)(0) <= '1';

(like indexing in C)

Regards,
Mario
 
T

Tim Hubberstey

Mario said:
Of course, wrong indexing syntax.
It has to be

Thing(0)(0) <= '1';

(like indexing in C)

More completely, it's not incorrect syntax but rather the wrong syntax
for this type of array. The thing(a,b) format is for multidimensional
arrays whereas thing(a)(b) is for an array of arrays, which is what you
have. For some reason, synthesizer makers have chosen to support arrays
of arrays but not multidimensional arrays. Multidimensional arrays are
perfectly legal for simulation.
 
Joined
Feb 26, 2010
Messages
1
Reaction score
0
For some reason, synthesizer makers have chosen to support arrays
of arrays but not multidimensional arrays. Multidimensional arrays are
perfectly legal for simulation.

I tested both multidimensional arrays and array of arrays. Both are synthesizeable. I am using an Altera D2 Board with Quartus II simulator
 

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

Forum statistics

Threads
473,769
Messages
2,569,578
Members
45,052
Latest member
LucyCarper

Latest Threads

Top