entity test1 is
end entity;
library ieee;
use ieee.std_logic_1164.all;
architecture a1 of test1 is
type array1x1D is array (0 to 10) of std_logic_vector(0 to 10); -- Array of arrays
type array2D is array (0 to 10, 0 to 5) of std_logic; -- Real 2D array
signal s1 : array1x1D;
begin
name : process is
begin
report "array1x1D(0)'length:" & integer'image(s1(0)'length);
report "array2D'length(1):" & integer'image(array2D'length(1));
report "array2D'length(2):" & integer'image(array2D'length(2));
wait;
end process name;
end architecture a1;
生成:
# run -all
# ** Note: array1x1D(0)'length:11
# Time: 0 ns Iteration: 0 Instance: /test1
# ** Note: array2D'length(1):11
# Time: 0 ns Iteration: 0 Instance: /test1
# ** Note: array2D'length(2):6
# Time: 0 ns Iteration: 0 Instance: /test1
#
そのタイプの中間信号/定数/変数なしでは、1次元配列のベクトル要素の長さを把握する方法がすぐにはわかりません...