My code is below, I want to write the integers in AAA4.txt file, the file is opened but, there are nonsense characters in it... I am using Modelsim,
Does anyone know where the problem is...?
---------------CODE----------------------------
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_textio.all;
entity AATest is
end AAtest;
architecture behave of AATest is
begin
process
type myfile is file of integer;
file AAdata : myfile open write_mode is "AAA4.txt";
variable count : integer:= 0;
begin
for i in 0 to 15 loop
count:=count + 1;
Write(F =>AAData,
Value => count);
end loop;
wait ;
end process;
end behave;
----------------------------------------------------------
Does anyone know where the problem is...?
---------------CODE----------------------------
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_textio.all;
entity AATest is
end AAtest;
architecture behave of AATest is
begin
process
type myfile is file of integer;
file AAdata : myfile open write_mode is "AAA4.txt";
variable count : integer:= 0;
begin
for i in 0 to 15 loop
count:=count + 1;
Write(F =>AAData,
Value => count);
end loop;
wait ;
end process;
end behave;
----------------------------------------------------------