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: ap_a_ap_a_10.vhd,v 1.3 2001-10-26 16:29:33 paw Exp $
|
23
|
-- $Revision: 1.3 $
|
24
|
--
|
25
|
-- ---------------------------------------------------------------------
|
26
|
|
27
|
entity ap_a_10 is
|
28
|
end entity ap_a_10;
|
29
|
|
30
|
library ieee;
|
31
|
use ieee.std_logic_1164.all;
|
32
|
|
33
|
library stimulus;
|
34
|
use stimulus.stimulus_generators.all;
|
35
|
|
36
|
architecture test of ap_a_10 is
|
37
|
|
38
|
signal a, b, c, d : std_ulogic;
|
39
|
signal test_vector : std_ulogic_vector(1 to 4);
|
40
|
|
41
|
begin
|
42
|
|
43
|
b1 : block is
|
44
|
signal y : std_ulogic;
|
45
|
begin
|
46
|
-- code from book
|
47
|
|
48
|
y <= a or b or c or d;
|
49
|
|
50
|
-- end code from book
|
51
|
end block b1;
|
52
|
|
53
|
b2 : block is
|
54
|
signal y : std_ulogic;
|
55
|
begin
|
56
|
-- code from book
|
57
|
|
58
|
y <= ( a or b ) or ( c or d );
|
59
|
|
60
|
-- end code from book
|
61
|
end block b2;
|
62
|
|
63
|
b3 : block is
|
64
|
signal y : std_ulogic;
|
65
|
begin
|
66
|
-- code from book (syntax error)
|
67
|
|
68
|
-- y <= a or b or c and d;
|
69
|
|
70
|
-- end code from book
|
71
|
end block b3;
|
72
|
|
73
|
b4 : block is
|
74
|
signal y : std_ulogic;
|
75
|
begin
|
76
|
-- code from book
|
77
|
|
78
|
y <= ( a or b ) or ( c and d );
|
79
|
|
80
|
-- end code from book
|
81
|
end block b4;
|
82
|
|
83
|
stimulus : all_possible_values(test_vector, 10 ns);
|
84
|
|
85
|
(a, b, c, d) <= test_vector;
|
86
|
|
87
|
end architecture test;
|
88
|
|