Initializing BRAM in a FPGA can be done using CORE generator, but I prefer to write VHDL so that the synthesis tool infers a BRAM or lookup table (LUT). Note, I never use Core Gen for creating/initializing RAM.
I'm not sure how the data is formatted, but here's a VHDL code snippet on how to read a text file where each line contains a binary string and creates a signal with the file contents. You'll have to know the format of the file beforehand and the length of it.
-- define a type for the lookup table (LUT)
type lut_type is array(0 to 2**12-1) of std_logic_vector(15 downto 0);
impure function init_lut_from_file(lut_file_name : in string)
return lut_type is
FILE lut_file : TEXT open READ_MODE is lut_file_name;
variable lut_line : line;
variable bv_temp : bit_vector(15 downto 0);
variable lut : lut_type;
begin
for i in lut_type'range loop
readline(lut_file, lut_line);
read(lut_line, bv_temp);
lut(i) := to_stdlogicvector(bv_temp);
end loop;
return lut;
end function;
signal lut : lut_type := init_lut_from_file("c:\data.txt");
The above impure function will read c:\data.txt
containing 16-bit binary strings on each line of the file into a LUT with 2^12 = 4096 entries.
You can then write additional code to read & write to lut
as usual.