[an error occurred while processing this directive]
|
Не получается описать счетчик на VHDL. Max ругается на оба варианта приведенных ниже. Где я не прав или это глюки MaxPlus? Пишет ошибку: can't interpret subprogram call. для строки с вызовом conv_unsigned/ conv_integer, хотя в help обе функции описаны как поддкрживаемые.
1)
addr_counter: process (clk,nRst) is
variable count_t:unsigned ;
begin
if nRst='0' then
count_out<= (others=>'0');
elsif rising_edge(clk) then
if count_load='1' then
count_out<= t_data_in(ASYNC_RAM_SIZE+1 downto 2) ;
else
count_t := 1 + conv_unsigned( count_out );
count_out<= conv_std_logic_vector( count_t ,ASYNC_RAM_SIZE);
end if;
end if;
end process addr_counter;
2)
addr_counter: process (clk,nRst) is
begin
if nRst='0' then
count_o<= 0;
elsif rising_edge(clk) then
if count_load='1' then
count_o<= conv_integer( t_data_in(ASYNC_RAM_SIZE+1 downto 2) ) ;
else
count_o<= count_o + 1;
end if;
end if;
count_out <= conv_std_logic_vector(count_o,ASYNC_RAM_SIZE);
end process addr_counter;
Подскажите, как правильно написать счетчик. Спасибо за ответы.
E-mail: info@telesys.ru