我想要做2个矩阵的乘法,并且我想在VHDL中创建一个std_logic_vectors数组。VHDL中的多维数组
package matrice is
type t11 is array (32 downto 0,0 downto 19) of unsigned(7 downto 0);<
type t1 is array (0 downto 19) of t11;
type t2 is array (0 downto 194) of unsigned(7 downto 0);
entity matrice_test is
Port (clk : in STD_LOGIC;a : in t1;b : in t2;multi :out t2);
end matrice_test;
architecture Behavioral of matrice_test is
type t11 is array (M_MAX-1 downto 0,0 downto O_MAX-1) of unsigned(N-1 downto 0);
type t1 is array (0 downto O_MAX-1) of t11;
type t2 is array (0 downto N_MAX-1) of unsigned(N-1 downto 0);
的错误,我越来越:
indexed name prefix type t11 expects 2 dimensions
这似乎是一个合成sis错误(错误:HDLCompiler:540)。提供[最小,完整和可验证的示例](https://stackoverflow.com/help/mcve)。另请注意,体系结构声明区域中的重载类型声明名称t11,t1和t2与包矩阵(可能用于端口a和b,缺少上下文子句)中的那些不兼容和隐藏。 VHDL中的每个声明都是唯一的,它们不是同一类型。考虑先模拟你的设计。显示完整的错误消息。 – user1155120
参见IEEE Std 1076-2008 5.3.2.2索引约束和离散范围,第4段“...如果任何离散范围定义了一个空范围,那么这样约束的任何数组就是一个* null数组*,没有元素... 。“ – user1155120