Project

General

Profile

Download (3.51 KB) Statistics
| Branch: | Tag: | Revision:
1

    
2
-- Copyright (C) 1996 Morgan Kaufmann Publishers, Inc
3

    
4
-- This file is part of VESTs (Vhdl tESTs).
5

    
6
-- VESTs is free software; you can redistribute it and/or modify it
7
-- under the terms of the GNU General Public License as published by the
8
-- Free Software Foundation; either version 2 of the License, or (at
9
-- your option) any later version. 
10

    
11
-- VESTs is distributed in the hope that it will be useful, but WITHOUT
12
-- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13
-- FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
14
-- for more details. 
15

    
16
-- You should have received a copy of the GNU General Public License
17
-- along with VESTs; if not, write to the Free Software Foundation,
18
-- Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
19

    
20
-- ---------------------------------------------------------------------
21
--
22
-- $Id: ch_18_ch_18_06.vhd,v 1.2 2001-10-26 16:29:36 paw Exp $
23
-- $Revision: 1.2 $
24
--
25
-- ---------------------------------------------------------------------
26

    
27
entity ch_18_06 is
28

    
29
end entity ch_18_06;
30

    
31

    
32
----------------------------------------------------------------
33

    
34

    
35
architecture test of ch_18_06 is
36

    
37
  type integer_file is file of integer;
38

    
39
begin
40

    
41

    
42
  process is
43

    
44
            -- code from book:
45

    
46
            file lookup_table_file, result_file : integer_file;
47

    
48
          -- end of code from book
49

    
50
  begin
51
    wait;
52
  end process;
53

    
54

    
55
  process is
56

    
57
            type element_type is (t1, t2, t3);
58

    
59
          -- code from book:
60

    
61
          type file_type is file of element_type;
62

    
63
          procedure file_open ( file f : file_type;
64
                                external_name : in string;
65
                                open_kind : in file_open_kind := read_mode );
66

    
67
          -- end of code from book
68

    
69
          procedure file_open ( file f : file_type;
70
                                external_name : in string;
71
                                open_kind : in file_open_kind := read_mode ) is
72
          begin
73
          end;
74

    
75
  begin
76
    wait;
77
  end process;
78

    
79

    
80
  process is
81

    
82
            -- code from book:
83

    
84
            file lookup_table_file : integer_file open read_mode is "lookup-values";
85

    
86
          -- end of code from book
87

    
88
  begin
89
    wait;
90
  end process;
91

    
92

    
93
  process is
94

    
95
            -- code from book:
96

    
97
            file lookup_table_file : integer_file;
98
          -- . . .
99

    
100
          -- end of code from book
101

    
102
  begin
103

    
104
    -- code from book:
105

    
106
    file_open ( lookup_table_file,
107
                external_name => "lookup-values", open_kind => read_mode );
108

    
109
    -- end of code from book
110

    
111
    wait;
112
  end process;
113

    
114

    
115
  process is
116

    
117
            type element_type is (t1, t2, t3);
118
          type file_type is file of element_type;
119

    
120
          -- code from book:
121

    
122
          type file_open_status is (open_ok, status_error, name_error, mode_error);
123

    
124
          procedure file_open ( status : out file_open_status;
125
                                file f : file_type;
126
                                external_name : in string;
127
                                open_kind : in file_open_kind := read_mode );
128

    
129
          procedure file_close ( file f : file_type );
130

    
131
          -- end of code from book
132

    
133
          procedure file_open ( status : out file_open_status;
134
                                file f : file_type;
135
                                external_name : in string;
136
                                open_kind : in file_open_kind := read_mode ) is
137
          begin
138
          end;
139

    
140
          procedure file_close ( file f : file_type ) is
141
          begin
142
          end;
143

    
144
  begin
145
    wait;
146
  end process;
147

    
148

    
149
end architecture test;
(388-388/510)