Vhdl 大数组初始化为0

Vhdl 大数组初始化为0,vhdl,Vhdl,有没有一种方法可以初始化二维数组而不逐个给出所有值 我有这样的信号声明: type t_id_data is array (integer range <> ) of integer; type t_image_data is array (integer range <>) of t_id_data; signal s_image_data : t_image_data ( 0 to 30) (0 to 720); type t_id_data是整数的数

有没有一种方法可以初始化二维数组而不逐个给出所有值

我有这样的信号声明:

  type t_id_data is array (integer range <> ) of integer; 
  type t_image_data is array (integer range <>) of t_id_data;
  signal s_image_data : t_image_data ( 0 to 30) (0 to 720);
type t_id_data是整数的数组(整数范围);
类型t_image_data是t_id_数据的数组(整数范围);
信号s_图像_数据:t_图像_数据(0至30)(0至720);
我想将其初始化为0。它是一个整数数组

谢谢,是的。您使用聚合。为了清晰起见,让我们缩小阵列的大小:

type t_id_data is array (integer range <> ) of integer; 
type t_image_data is array (integer range <>) of t_id_data;

-- this sets element 0 to {0, 10, 100} and elements 1,2 to {0, 11, 0} 
-- using NAMED ASSOCIATION
signal s_image_data : t_image_data ( 0 to 2) (0 to 2) 
  := (0 => (0 => 0, 1 => 10, 2 => 100), 
      others => (1 => 11, others => 0));  

-- this sets all the elements to 0
signal another_signal : t_image_data ( 0 to 2) (0 to 2)
  := (others => (others => 0));  

-- this sets element 0 to {0, 10, 100} and elements 1,2 to {0, 11, 0} 
-- using POSITIONAL ASSOCIATION
signal yet_another : t_image_data ( 0 to 2) (0 to 2) 
  := ((0, 10, 100), others => (0, 11, 0));  
type t_id_data是整数的数组(整数范围);
类型t_image_data是t_id_数据的数组(整数范围);
--这将元素0设置为{0,10,100},元素1,2设置为{0,11,0}
--使用命名关联
信号s_图像_数据:t_图像_数据(0到2)(0到2)
:= (0 => (0 => 0, 1 => 10, 2 => 100), 
其他=>(1=>11,其他=>0));
--这会将所有元素设置为0
信号另一个_信号:t_图像_数据(0到2)(0到2)
:=(其他=>(其他=>0));
--这将元素0设置为{0,10,100},元素1,2设置为{0,11,0}
--使用位置关联
另一个信号:图像数据(0到2)(0到2)
:=((0,10100),其他=>(0,11,0));

谢谢,这很有帮助。