What is difference between index(9) and index(9 downto 9) in vhdl?

Viewed 343
logic index : unsigned(9 downto 0) ;  
type fft_data  is array (3 downto 0) of unsigned(16 downto 0);  
signal tmp,signal fmax_data :fft_data;  
tmp = fmax_data(to_integer(index(9)));

Above part of the code gives following compilation error; "subprogram call or operator argument type mismatch 87"

if I do following modification it works.

logic index : unsigned(9 downto 0) ;  
type fft_data  is array (3 downto 0) of unsigned(16 downto 0);  
signal tmp,signal fmax_data :fft_data;;  
tmp = fmax_data(to_integer(index(**9 downto 9**)));

Can anyone please explain what is the difference between above two implementation? I am using vhdl-93 std and ncvhdl. Thank you

1 Answers
Related