VHDL 中的参数化元素数组
Array of parametrized elements in VHDL
在 VHDL 中,可以通过以下方式创建可参数化范围的数组类型:
type t_array_type is array (natural range <>) of std_logic_vector(7 downto 0)
现在,是否可以创建可参数化元素数组? IE。有一个数组类型,在其中实例化信号时,可以定义 std_logic_vector
的范围?这样做的目的是不必为每个 std_logic_vector
范围声明单独的数组类型。
好的,我找到了。声明类型为:
type t_array_type is array (natural range <>) of std_logic_vector;
然后实例化为:
signal t_array_type(23 downto 0)(7 downto 0);
在 VHDL 中,可以通过以下方式创建可参数化范围的数组类型:
type t_array_type is array (natural range <>) of std_logic_vector(7 downto 0)
现在,是否可以创建可参数化元素数组? IE。有一个数组类型,在其中实例化信号时,可以定义 std_logic_vector
的范围?这样做的目的是不必为每个 std_logic_vector
范围声明单独的数组类型。
好的,我找到了。声明类型为:
type t_array_type is array (natural range <>) of std_logic_vector;
然后实例化为:
signal t_array_type(23 downto 0)(7 downto 0);