Instead of asking Edaboard members, why don't you use your simulator or synthesis tool to check for syntax errors?
Apart from syntax errors, the summing loop is obviously wrong. What's the idea behind adding two array elements? I guess, you want to sum all array elements to the variable sum. Thus something like
Code:
sum := sum + some_array (index);
over all array elements will be needed, including suitable initialization.
It would be also straightforward to use an arithmetic data type if you are doing arithmetic.
In case you are intending synthesized hardware, I presume you know that the summing method can only work for registers but not for block RAM.
function sum ( some_array : type_array_data_word_1 ) return unsigned is
variable output : unsigned ( constant_configuration_depth_memory_1 - 1 downto 0 ) := ( others => '0' ) ;
begin
for index in 0 to constant_configuration_depth_memory_1 - 1
loop
output := output + some_array ( index ) ;
end loop ;
return output ;
end function sum ;