Project

General

Profile

Download (2.14 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_20_fg_20_06.vhd,v 1.3 2001-11-03 23:19:37 paw Exp $
23
-- $Revision: 1.3 $
24
--
25
-- ---------------------------------------------------------------------
26

    
27
package mem_pkg is
28

    
29
  subtype word is bit_vector(0 to 31);
30
  type word_array is array (natural range <>) of word;
31

    
32
  procedure load_array ( words : out word_array;  file_name : string );
33

    
34
end package mem_pkg;
35

    
36
package body mem_pkg is
37

    
38
  procedure load_array ( words : out word_array;  file_name : string ) is
39
    -- words'path_name = ":project:mem_pkg:load_array:words"
40

    
41
    use std.textio.all;
42
    file load_file : text open read_mode is file_name;
43
    -- load_file'path_name = ":project:mem_pkg:load_array:load_file"
44

    
45
    procedure read_line is
46
      -- read_line'path_name = ":project:mem_pkg:load_array:read_line:"
47
      variable current_line : line;
48
      -- current_line'path_name =
49
      --    ":project:mem_pkg:load_array:read_line:current_line"
50
    begin
51
      -- . . .
52
      -- not in book
53
      report current_line'path_name;
54
      -- end not in book
55
    end procedure read_line;
56

    
57
  begin  -- load_array
58
    -- . . .
59
    -- not in book
60
    report mem_pkg'path_name;
61
    report words'path_name;
62
    report load_file'path_name;
63
    report read_line'path_name;
64
    read_line;
65
    -- end not in book
66
  end procedure load_array;
67

    
68
end package body mem_pkg;
(505-505/534)