I want to read data from the ram and write it to a file as output. the following is the 'process' i am using.
file my_output: text open WRITE_MODE is "chk_file.out";
variable new_line: line;
variable temp: integer := 2**ADDR_WIDTH-1;
variable count: std_logic_vector (ADDR_WIDTH-1 downto 0) := (others=> '0');
begin
if (run = '1') then
if (clk'event and clk = '1') then
for temp in 15 downto 0 loop
addr_in <= count;
write (new_line,to_bitvector(d_out),left,DATA_WIDTH);
writeline (my_output,new_line);
count := count +1;
end loop;
end if;
end if;
end process;
but synthesising this on xilinx 12.1 gives the following error!
Second argument of write must have a constant value
any idea how to fix this?