write function debugging

Status
Not open for further replies.

samitbanerji

Newbie level 1
Joined
Jun 3, 2010
Messages
1
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
Hamburg
Activity points
1,290
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?
 

AFAIK write function is not synthesizable.
--
Amr Ali
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…