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!
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_typnow 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...
Very Thanks!
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
Have something to add? Share your thoughts — no account required.
Ask the community — no account required