Four dimensional array

Joined
Jun 5, 2007
Messages
51
Reaction score
0
Hi techies,

I am declaring constant value of four dimension array as below.

Type Ostates is array (0 to 1) of std_logic_vector (1 downto 0);
Type Outstates is array (0 to 1) of Ostates ;
Type VaryStates is array (0 to 1) of Outstates;
Type User is array (0 to 1) of VaryStates;

CONSTANT fourdarray : User := ( ( (("11","01"),
("10","11")),
(("11","01"),
("10","11")) ),
( (("11","01"),
("10","11")),
(("11","01"),
("10","11")) ) );

any of the value in constant is accessed by fourdarray (x)(x)(x)(x). for example, fourdarray (0)(0)(1)(1) access the value 11.

I am able to synthesize as well as implement the design in xilinx ISE tool.

But i wanna know whether this approach is correct??
 

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,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top