In SystemVerilog I can create a multidimensional array as follows:
reg [31:0] mem[0:127];
However, in VHDL all of the examples for create a similar multidimensional arrays online in the VHDL book show that I must first create a type before creating the array. Example:
type mem_t is array(0 to 127) of std_logic_vector(31 downto 0);
signal mem :mem_t;
Is it possible to do this all in one step in VHDL like in verilog without first creating a type for the array? Example:
signal mem :array(0 to 127) of std_logic_vector(31 downto 0);
--syntax error:GHDL: Type mark expected in a subtype indication
--syntax error:vsim: near "array": (vcom-1576) expecting STRING or IDENTIFIER or << or '('
The reason why i'm asking is because i'm trying to avoid the use of a package to declare an array type, when connecting IO with an array that is connected between to modules in VHDL.