鉴于我有一个类型
type sFoo is record
A : std_logic;
B : std_logic_vector(2 downto 0);
C : std_logic;
end record;
我有sFoo的矢量形式,sFoo_Vector
type sFoo_Vector is array (natural range <>) of sFoo;
和一个空常量cNull_Foo
constant cNull_Foo: sFoo := (A => '0', B => (others => '0'), C => '0');
此外,我在sBar
中创建了sFoos的记录type sBar is record
A : sFoo;
B : sFoo;
C : sFoo;
end record;
我可以初始化一个常量,如:
constant Var1 : sBar := (others => cNull_Foo);
但是,如果我创建另一个包含sFoo和sFoo_Vector的记录sBaz,是否可以使用其他聚合来初始化多个数据类型(即sFoo和sFoo_Vector)?
type sBaz is record
A : sFoo;
B : sFoo;
C : sFoo;
D : sFoo_Vector;
end record;
constant Var2 : sBaz := (others => ???)