I don't really understand what is wrong :
I have an unconstrained type
type int_matrix_type is array (natural range <>, natural range <>) of integer;
that I'm using to create different sizes of matrices, even I want a matrix with the range (0 to 1, 0 to 0) which I consider will give a matrix of 2 lines and 1 column (right?), like in this example signal example2_matrix :
library ieee;
use ieee.std_logic_1164.all;
entity toto is
port (
clk : in std_logic
);
end entity;
architecture test of toto is
-- type declaration
type int_matrix_type is array (natural range <> ,natural range <>) of integer;
-- examples of matrix signals
signal example1_matrix : int_matrix_type (0 to 1, 0 to 1)
:= ((0, 1),
(2, 3)
);
signal example2_matrix : int_matrix_type (0 to 1, 0 to 0)
:= ((0), -- here line 20
(2) -- line 21
);
begin
end test;
But when I compile, Quartus returns errors
So what is wrong ?
Thanks in advance !

signal example2_matrix : int_matrix_type (0 to 1, 0 to 0) := (0 => (0 => 0),1 => (0 => 1));Note the second dimension (the subaggregates have only one element while the aggregate of the type has two. This can also be positionalsignal example2_matrix : int_matrix_type (0 to 1, 0 to 0) := ((0 => 0),(0 => 1));where the sub aggregate has a single element and must use named association (the name can beothers). - user16145658