Project

General

Profile

Download (2.11 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_05_ch_05_20.vhd,v 1.2 2001-10-26 16:29:34 paw Exp $
23
-- $Revision: 1.2 $
24
--
25
-- ---------------------------------------------------------------------
26

    
27
package pk_05_20 is
28

    
29
  -- code from book:
30

    
31
  type FIFO_status is record
32
                        nearly_full, nearly_empty, full, empty : bit;
33
                      end record FIFO_status;
34

    
35
  -- end of code from book
36

    
37
end package pk_05_20;
38

    
39

    
40
----------------------------------------------------------------
41

    
42

    
43
use work.pk_05_20.all;
44

    
45
entity FIFO is
46
  port ( status : out FIFO_status;
47
         other_ports : out bit );
48
end entity FIFO;
49

    
50

    
51
----------------------------------------------------------------
52

    
53

    
54
entity ch_05_20 is
55

    
56
end entity ch_05_20;
57

    
58

    
59
----------------------------------------------------------------
60

    
61

    
62
use work.pk_05_20.all;
63

    
64
architecture test of ch_05_20 is
65

    
66
  signal start_flush, end_flush, DMA_buffer_full, DMA_buffer_empty : bit;
67

    
68
begin
69

    
70
  -- code from book:
71

    
72
  DMA_buffer : entity work.FIFO
73
    port map ( -- . . ., 
74
      status.nearly_full => start_flush,
75
      status.nearly_empty => end_flush,
76
      status.full => DMA_buffer_full,
77
      status.empty => DMA_buffer_empty, -- . . . );
78
      -- not in book
79
      other_ports => open );
80
  -- end not in book
81

    
82
  -- end of code from book
83

    
84

    
85
end architecture test;
(124-124/372)