Project

General

Profile

Statistics
| Branch: | Tag: | Revision:

lustrec-tests / vhdl_json / vhdl_files / 2-exportOK / ghdl / ghdl / testsuite / vests / vhdl-93 / billowitch / compliant / tc1907.vhd @ 3fd18385

History | View | Annotate | Download (3.21 KB)

1

    
2
-- Copyright (C) 2001 Bill Billowitch.
3

    
4
-- Some of the work to develop this test suite was done with Air Force
5
-- support.  The Air Force and Bill Billowitch assume no
6
-- responsibilities for this software.
7

    
8
-- This file is part of VESTs (Vhdl tESTs).
9

    
10
-- VESTs is free software; you can redistribute it and/or modify it
11
-- under the terms of the GNU General Public License as published by the
12
-- Free Software Foundation; either version 2 of the License, or (at
13
-- your option) any later version. 
14

    
15
-- VESTs is distributed in the hope that it will be useful, but WITHOUT
16
-- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
17
-- FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
18
-- for more details. 
19

    
20
-- You should have received a copy of the GNU General Public License
21
-- along with VESTs; if not, write to the Free Software Foundation,
22
-- Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
23

    
24
-- ---------------------------------------------------------------------
25
--
26
-- $Id: tc1907.vhd,v 1.2 2001-10-26 16:29:43 paw Exp $
27
-- $Revision: 1.2 $
28
--
29
-- ---------------------------------------------------------------------
30

    
31
ENTITY c07s01b00x00p11n01i01907ent IS
32
END c07s01b00x00p11n01i01907ent;
33

    
34
ARCHITECTURE c07s01b00x00p11n01i01907arch OF c07s01b00x00p11n01i01907ent IS
35

    
36
BEGIN
37
  TESTING: PROCESS
38
    -- Local declarations.
39
    variable b1a, b2a, b3a, b4a : BOOLEAN;
40
    variable b1o, b2o, b3o, b4o : BOOLEAN;
41
    variable b1x, b2x, b3x, b4x : BOOLEAN;
42
  BEGIN
43
    -- Test that the following operators can be used associatively.
44
    -- 1. AND.
45
    b1a := TRUE;
46
    b2a := TRUE;
47
    b3a := FALSE;
48
    assert (NOT (b1a AND b2a AND b3a))
49
      report "AND operator cannot be used associatively.";
50
    b4a := TRUE;
51
    assert (b1a AND b2a AND b4a)
52
      report "AND operator cannot be used associatively.";
53

    
54
    -- 2. OR.
55
    b1o := FALSE;
56
    b2o := FALSE;
57
    b3o := TRUE;
58
    assert (b1o OR b2o OR b3o)
59
      report "OR operator cannot be used associatively.";
60
    b4o := FALSE;
61
    assert (NOT (b1o OR b2o OR b4o))
62
      report "OR operator cannot be used associatively.";
63
    
64
    -- 3. XOR.
65
    b1x := TRUE;
66
    b2x := TRUE;
67
    b3x := FALSE;
68
    assert (NOT (b1x XOR b2x XOR b3x))
69
      report "XOR operator cannot be used associatively.";
70
    b4x := TRUE;
71
    assert (b1x XOR b2x XOR b4x)
72
      report "XOR operator cannot be used associatively.";
73

    
74
    wait for 5 ns;
75

    
76
    assert NOT(    (NOT (b1a AND b2a AND b3a))    and
77
                   (b1a AND b2a AND b4a)      and
78
                   (b1o OR b2o OR b3o)      and
79
                   (NOT (b1o OR b2o OR b4o))   and
80
                   (NOT (b1x XOR b2x XOR b3x))   and
81
                   (b1x XOR b2x XOR b4x)      )
82
      report "***PASSED TEST: /src/ch07/sc01/p012/s010101.vhd"
83
      severity NOTE;
84
    assert (    (NOT (b1a AND b2a AND b3a))    and
85
                (b1a AND b2a AND b4a)      and
86
                (b1o OR b2o OR b3o)      and
87
                (NOT (b1o OR b2o OR b4o))   and
88
                (NOT (b1x XOR b2x XOR b3x))   and
89
                (b1x XOR b2x XOR b4x)      )
90
      report "***FAILED TEST: c07s01b00x00p11n01i01907 - Associative test for and or and xor failed."
91
      severity ERROR;
92
    wait;
93
  END PROCESS TESTING;
94

    
95
END c07s01b00x00p11n01i01907arch;