Forum Discussion
Altera_Forum
Honored Contributor
11 years ago --- Quote Start --- Hi, Apart from the typo (rang -> range) and also tmp being assigned as a signal rather than a variable, the source of the error message given by Quartus is probably that you define the return type as a bit_vector(15 downto 0). This is interpreted as an array of bit_vectors (thus the mentioning of indexed name type). If you remove (15 downto 0) from the return clauses this compilation error should be cleared. That is: ... Function SPI_ADC_wr_RD(Input_dat: bit_vector(15 downto 0); Input_clk: std_LOGIC) return bit_vector; END user_defs; PACKAGE BODY user_defs IS Function SPI_ADC_wr_RD(Input_dat: bit_vector(15 downto 0); Input_clk: std_LOGIC) return bit_vector is ... /J --- Quote End --- Thanks! you are right!