I'm trying to make a program that uses matrices( 2d arrays) of integers in vhdl and i have never done that before.
First of all, is it possible to define a 2d array in the entity's signal definitions?What I mean is something like this;
entity Matrix is
Port ( CLK : in STD_LOGIC;
RESET : in STD_LOGIc;
Output : out array (integer range <> , integer range <> ) of integer);
end Matrix;
Also. What is the best way to actually initialize a matrix ? I thought of doing something like this;
type 2d_array is array(2 downto 0, 2 downto 0) of integer;
constant A2d : 2d_array :=((1,2,3),
(1,2,3),
(1,2,3));
Still, I'm not really sure if that is correct.
Last but not least, what would happen if i tried to rashape one of the output matrices into an 1-D array? Whould that solve my first problem, or would that create a new one ?