VHDL 2 dimension array

Oct 01, 2005 4 Replies

Hi,


I am just beginner of VHDL. I want to define a 2 dimensional input variable in entity. I think the syntax is something like this:



v : in std_logic_vector(2 downto 0)(11 downto 0);



Please advice. Thanks!



first you create a type.. then assign it... type v_typ is array (2 downto 0) of std_logic_vector(11 downto

0); signal v: v_typ

now you can access it as v(i)(j) Hi,

Simon he's asking about how to use multi-dimentional arrays in port declaration. not for signal/variable declaration.

Rgds, Karthik

Sim> first you create a type.. then assign it...

Karthikeyan Subramaniyam, Verification Engineer, TooMuch Semiconductor Solutions Pvt. Ltd. www.toomuchsemi.com A Bangalore based startup specialising on services in EDA & Verification.

The same theory works anywhere.. in the case of an entity.. you put the type in a header and use the "library" string :-)

I use the same thing in entities, processes and generates.

Simon

downto

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required