aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite/vests/vhdl-93/billowitch/compliant/tc2257.vhd
blob: edd65cd56424fbd02c2bb1313f1327bff4835e80 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
-- Copyright (C) 2001 Bill Billowitch.

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

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

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

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

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

-- ---------------------------------------------------------------------
--
-- $Id: tc2257.vhd,v 1.2 2001-10-26 16:29:46 paw Exp $
-- $Revision: 1.2 $
--
-- ---------------------------------------------------------------------

ENTITY c07s02b06x00p05n01i02257ent IS
END c07s02b06x00p05n01i02257ent;

ARCHITECTURE c07s02b06x00p05n01i02257arch OF c07s02b06x00p05n01i02257ent IS

BEGIN
  TESTING: PROCESS
    constant div11 : integer := (1 - 4) / (1 - 4);
    constant div12 : integer := (1 - 4) / (2 - 4);
    constant div13 : integer := (1 - 4) / (3 - 4);
    constant div15 : integer := (1 - 4) / (5 - 4);
    constant div16 : integer := (1 - 4) / (6 - 4);
    constant div17 : integer := (1 - 4) / (7 - 4);
    constant div18 : integer := (1 - 4) / (8 - 4);
    constant div19 : integer := (1 - 4) / (9 - 4);
    constant div41 : integer := (4 - 4) / (1 - 4);
    constant div42 : integer := (4 - 4) / (2 - 4);
    constant div43 : integer := (4 - 4) / (3 - 4);
    constant div45 : integer := (4 - 4) / (5 - 4);
    constant div46 : integer := (4 - 4) / (6 - 4);
    constant div47 : integer := (4 - 4) / (7 - 4);
    constant div48 : integer := (4 - 4) / (8 - 4);
    constant div49 : integer := (4 - 4) / (9 - 4);
    constant div61 : integer := (6 - 4) / (1 - 4);
    constant div62 : integer := (6 - 4) / (2 - 4);
    constant div63 : integer := (6 - 4) / (3 - 4);
    constant div65 : integer := (6 - 4) / (5 - 4);
    constant div66 : integer := (6 - 4) / (6 - 4);
    constant div67 : integer := (6 - 4) / (7 - 4);
    constant div68 : integer := (6 - 4) / (8 - 4);
    constant div69 : integer := (6 - 4) / (9 - 4);

    variable four : integer := 4;

  BEGIN

    assert div11 = (1 - four) / (1 - four);
    assert div12 = (1 - four) / (2 - four);
    assert div13 = (1 - four) / (3 - four);
    assert div15 = (1 - four) / (5 - four);
    assert div16 = (1 - four) / (6 - four);
    assert div17 = (1 - four) / (7 - four);
    assert div18 = (1 - four) / (8 - four);
    assert div19 = (1 - four) / (9 - four);
    assert div41 = (4 - four) / (1 - four);
    assert div42 = (4 - four) / (2 - four);
    assert div43 = (4 - four) / (3 - four);
    assert div45 = (4 - four) / (5 - four);
    assert div46 = (4 - four) / (6 - four);
    assert div47 = (4 - four) / (7 - four);
    assert div48 = (4 - four) / (8 - four);
    assert div49 = (4 - four) / (9 - four);
    assert div61 = (6 - four) / (1 - four);
    assert div62 = (6 - four) / (2 - four);
    assert div63 = (6 - four) / (3 - four);
    assert div65 = (6 - four) / (5 - four);
    assert div66 = (6 - four) / (6 - four);
    assert div67 = (6 - four) / (7 - four);
    assert div68 = (6 - four) / (8 - four);
    assert div69 = (6 - four) / (9 - four);

    assert NOT((div11 = (1 - four) / (1 - four))   and
               ( div12 = (1 - four) / (2 - four))   and
               ( div13 = (1 - four) / (3 - four))   and
               ( div15 = (1 - four) / (5 - four))   and
               ( div16 = (1 - four) / (6 - four))   and
               ( div17 = (1 - four) / (7 - four))   and
               ( div18 = (1 - four) / (8 - four))   and
               ( div19 = (1 - four) / (9 - four))   and
               ( div41 = (4 - four) / (1 - four))   and
               ( div42 = (4 - four) / (2 - four))   and
               ( div43 = (4 - four) / (3 - four))   and
               ( div45 = (4 - four) / (5 - four))   and
               ( div46 = (4 - four) / (6 - four))   and
               ( div47 = (4 - four) / (7 - four))   and
               ( div48 = (4 - four) / (8 - four))   and
               ( div49 = (4 - four) / (9 - four))   and
               ( div61 = (6 - four) / (1 - four))   and
               ( div62 = (6 - four) / (2 - four))   and
               ( div63 = (6 - four) / (3 - four))   and
               ( div65 = (6 - four) / (5 - four))   and
               ( div66 = (6 - four) / (6 - four))   and
               ( div67 = (6 - four) / (7 - four))   and
               ( div68 = (6 - four) / (8 - four))   and
               ( div69 = (6 - four) / (9 - four))   )
      report "***PASSED TEST: c07s02b06x00p05n01i02257"
      severity NOTE;
    assert (( div11 = (1 - four) / (1 - four))   and
            ( div12 = (1 - four) / (2 - four))   and
            ( div13 = (1 - four) / (3 - four))   and
            ( div15 = (1 - four) / (5 - four))   and
            ( div16 = (1 - four) / (6 - four))   and
            ( div17 = (1 - four) / (7 - four))   and
            ( div18 = (1 - four) / (8 - four))   and
            ( div19 = (1 - four) / (9 - four))   and
            ( div41 = (4 - four) / (1 - four))   and
            ( div42 = (4 - four) / (2 - four))   and
            ( div43 = (4 - four) / (3 - four))   and
            ( div45 = (4 - four) / (5 - four))   and
            ( div46 = (4 - four) / (6 - four))   and
            ( div47 = (4 - four) / (7 - four))   and
            ( div48 = (4 - four) / (8 - four))   and
            ( div49 = (4 - four) / (9 - four))   and
            ( div61 = (6 - four) / (1 - four))   and
            ( div62 = (6 - four) / (2 - four))   and
            ( div63 = (6 - four) / (3 - four))   and
            ( div65 = (6 - four) / (5 - four))   and
            ( div66 = (6 - four) / (6 - four))   and
            ( div67 = (6 - four) / (7 - four))   and
            ( div68 = (6 - four) / (8 - four))   and
            ( div69 = (6 - four) / (9 - four))   )
      report "***FAILED TEST: c07s02b06x00p05n01i02257 - Constant integer type division test failed."
      severity ERROR;
    wait;
  END PROCESS TESTING;

END c07s02b06x00p05n01i02257arch;