Project

General

Profile

Statistics
| Branch: | Tag: | Revision:

lustrec-tests / vhdl_json / vhdl_files / 2-exportOK / ghdl / ghdl / testsuite / vests / vhdl-93 / ashenden / compliant / ch_19_tb-snk.vhd @ 3fd18385

History | View | Annotate | Download (2.09 KB)

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_19_tb-snk.vhd,v 1.3 2001-10-26 16:29:36 paw Exp $
23
-- $Revision: 1.3 $
24
--
25
-- ---------------------------------------------------------------------
26

    
27
library qsim;
28
library random;
29

    
30
use std.textio.all;
31

    
32
architecture sink of test_bench is
33

    
34
  use qsim.qsim_types.all;
35
  use random.random.all;
36

    
37
  signal a : arc_type;
38
  signal info_detail : info_detail_type := trace;
39

    
40
begin
41

    
42
  source1 : entity qsim.source(behavior)
43
    generic map ( name => "source1",
44
                  distribution => fixed,  mean_inter_arrival_time => 100 ns,
45
                  seed => sample_seeds(1),
46
                  time_unit => ns,
47
                  info_file_name => "source1.dat" )
48
    port map ( out_arc => a,
49
               info_detail => info_detail );
50

    
51
  sink1 : entity qsim.sink(behavior)
52
    generic map ( name => "sink1",
53
                  time_unit => ns,
54
                  info_file_name => "sink1.dat" )
55
    port map ( in_arc => a,
56
               info_detail => info_detail );
57

    
58
  monitor : process is
59

    
60
                      variable L : line;
61

    
62
  begin
63
    wait on a;
64
    write(L, string'("monitor: at "));
65
    write(L, now, unit => ns);
66
    write(L, string'(" received "));
67
    write(L, a.token, ns);
68
    writeline(output, L);
69
  end process monitor;
70

    
71
end architecture sink;