blob: 8541a70c01c1e1b231c1454122a02888900b6479 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
use std.textio.all;
entity ent is
end entity;
architecture a of ent is
begin
main : process
type binary_file is file of character;
file fptr_text : text;
file fptr_binary : binary_file;
begin
file_open(fptr_text, "file.txt", write_mode);
write(fptr_text, string'("a"));
write(fptr_text, string'("b"));
file_close(fptr_text);
file_open(fptr_binary, "file.raw", write_mode);
write(fptr_binary, character'('a'));
write(fptr_binary, character'('b'));
file_close(fptr_binary);
write(output, string'("a"));
write(output, string'("b"));
wait;
end process;
end architecture;
|