Altera_Forum
Honored Contributor
8 years agoARRAY with a dynamic range
Hi All,
I am tying to create an ARRAY dynamic size with range of 1-64 (XXX). (I will use it for creating a dynamic data delay that can be configured) Modelsim compile it with no errors , but i don't see a change in the array size in the wave window. Can you help? ENTITY a2d IS PORT ( reset_n :in std_logic; clk :in std_logic; REG_CAN_DATA_A_DLY :in std_logic_vector (7 downto 0) --:="0000000000000001"; --:integer := 50; ); END; signal XXX :integer range 1 to 64; type delay_array is array(1 to XXX) of std_logic_vector(15 downto 0); signal data_delay_array : delay_array; begin XXX <= to_integer(unsigned(REG_CAN_DATA_A_DLY)); process ( reset_n,clk) begin if ( reset_n = '0') then elsif (clk'event and clk = '1') then data_delay_array <= data_in & data_delay_array( 1 to delay_array'high-1) ; data_in_delay <= data_delay_array(data_delay_array'high); end if; end process; END a2d;