1 |
d93979b7
|
Arnaud Dieumegard
|
|
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_19_wtfifo.vhd,v 1.3 2001-10-26 16:29:36 paw Exp $
|
23 |
|
|
-- $Revision: 1.3 $
|
24 |
|
|
--
|
25 |
|
|
-- ---------------------------------------------------------------------
|
26 |
|
|
|
27 |
|
|
library qsim;
|
28 |
|
|
|
29 |
|
|
package waiting_token_fifo_adt is
|
30 |
|
|
|
31 |
|
|
alias element_type is qsim.queue_types.waiting_token_type;
|
32 |
|
|
|
33 |
|
|
type fifo_record;
|
34 |
|
|
|
35 |
|
|
type fifo_type is access fifo_record;
|
36 |
|
|
|
37 |
|
|
function new_fifo return fifo_type;
|
38 |
|
|
|
39 |
|
|
procedure test_empty ( variable fifo : in fifo_type;
|
40 |
|
|
variable is_empty : out boolean );
|
41 |
|
|
|
42 |
|
|
procedure insert ( fifo : inout fifo_type;
|
43 |
|
|
element : in element_type );
|
44 |
|
|
|
45 |
|
|
procedure remove ( fifo : inout fifo_type;
|
46 |
|
|
element : out element_type );
|
47 |
|
|
|
48 |
|
|
-- private types
|
49 |
|
|
|
50 |
|
|
type fifo_entry_record;
|
51 |
|
|
|
52 |
|
|
type fifo_entry is access fifo_entry_record;
|
53 |
|
|
|
54 |
|
|
type fifo_entry_record is record
|
55 |
|
|
next_entry : fifo_entry;
|
56 |
|
|
element : element_type;
|
57 |
|
|
end record;
|
58 |
|
|
|
59 |
|
|
type fifo_record is record
|
60 |
|
|
head_entry, tail_entry : fifo_entry;
|
61 |
|
|
end record;
|
62 |
|
|
|
63 |
|
|
end package waiting_token_fifo_adt;
|