[an error occurred while processing this directive]
|
пишу
type A_T is array(natural range <>) of std_logic_vector(9 downto 0);
constant A : A_T(1 downto 0) := ("0100010010","0100010011");
signal C : std_logic_vector(3 downto 0);
далее в процессе
case B is
when A(0) => C <= (0 => '1', others => '0');
when A(1) => C <= (1 => '1', others => '0');
when others => C <= (others => '0');
end case;
не работает, говорит: Choice Ar is not a locally static expression.
а если написать
constant a0 : std_logic_vector(9 downto 0) := "0100010010";
constant a1 : std_logic_vector(9 downto 0) := "0100010011";
и
case B is
when A0 => C <= (0 => '1', others => '0');
when A1 => C <= (1 => '1', others => '0');
when others => C <= (others => '0');
end case;
то все ок.
Почему так? Чем массив константа отличается от просто констант?
E-mail: info@telesys.ru