vhdl 程序中如何定义二维数组?要求存放40个数,每个数占16位?

2025-04-16 22:59:32
推荐回答(1个)
回答(1):

type array_type is (39 downto 0) of std_logic_vector(15 downto 0);
signal array : array_type;
这是定义40个16bit的数。

如果你的40个数是又是5行8列的,可以这么写
type array_1type is (4 downto 0) of std_logic_vector(15 downto 0);
type array_2type is (7 downto 0) of array_1type;

signal array: array_2type;