I want to read the file test.jpg. This are 8bit hex-values. My first
try is to put it out on standard output.
Just the output is uncommanded. The error must com from read part.
red>ghdl -a -Wa,--32 tb_lesen2.vhd
red> ghdl -e -Wa,--32 -Wl,-m32 tb_read
red> ghdl -r tb_read --stop-time=3000ns
./tb_read:internal error: file: IO error
ghdl: compilation error
Rene
-----------------------------------------------------------------
LIBRARY ieee;
USE ieee.std_logic_1164.ALL;
--USE ieee.std_logic_unsigned.all;
USE ieee.numeric_std.ALL;
use STD.textio.all; -- basic I/O
ENTITY tb_read IS
END tb_read;
ARCHITECTURE behavior OF tb_read IS
subtype by_te is bit_vector(7 downto 0);
type f_byte is file of by_te;
BEGIN
process
file in_file: f_byte open read_mode is "test.jpg";
variable in_line,out_line: line;
variable good:boolean;
variable a:by_te;
begin
while not endfile(in_file) loop
read(in_file,a);
--write(out_line,a);
end loop;
--writeline(output,out_line);
wait;
end process;
END;
_______________________________________________
Ghdl-discuss mailing list
[email protected]
https://mail.gna.org/listinfo/ghdl-discuss