Project

General

Profile

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

    
27
entity tb_05_02 is
28
end entity tb_05_02;
29

    
30

    
31
architecture test of tb_05_02 is
32

    
33
  signal a1, a2, b1, b2, y : bit;
34

    
35
begin
36

    
37
  dut : entity work.and_or_inv(primitive)
38
    port map ( a1 => a1, a2 => a2, b1 => b1, b2 => b2,
39
	       y => y );
40

    
41
  stimulus : process is
42
                       subtype stim_vector_type is bit_vector(0 to 3);
43
                     type stim_vector_array is array ( natural range <> ) of stim_vector_type;
44
                     constant stim_vector : stim_vector_array
45
                       := ( "0000",
46
                            "0001",
47
                            "0010",
48
                            "0011",
49
                            "0100",
50
                            "0101",
51
                            "0110",
52
                            "0111",
53
                            "1000",
54
                            "1001",
55
                            "1010",
56
                            "1011",
57
                            "1100",
58
                            "1101",
59
                            "1110",
60
                            "1111" );
61
  begin
62
    for i in stim_vector'range loop
63
      (a1, a2, b1, b2) <= stim_vector(i);
64
      wait for 10 ns;
65
      assert y = not ( (stim_vector(i)(0) and stim_vector(i)(1))
66
	               or (stim_vector(i)(2) and stim_vector(i)(3)) );
67
    end loop;
68
    wait;
69
  end process stimulus;
70

    
71
end architecture test;
(34-34/171)