summaryrefslogtreecommitdiff
path: root/testsuite/vests/vhdl-93/billowitch/compliant/tc2259.vhd
blob: cd8fcced011126a35909f8846cf2b35ecc2abb35 (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

-- 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: tc2259.vhd,v 1.2 2001-10-26 16:29:46 paw Exp $
-- $Revision: 1.2 $
--
-- ---------------------------------------------------------------------

ENTITY c07s02b06x00p05n01i02259ent IS
END c07s02b06x00p05n01i02259ent;

ARCHITECTURE c07s02b06x00p05n01i02259arch OF c07s02b06x00p05n01i02259ent IS
BEGIN
  TESTING: PROCESS
    constant mod11 : integer := (1 - 4) mod (1 - 4);
    constant mod12 : integer := (1 - 4) mod (2 - 4);
    constant mod13 : integer := (1 - 4) mod (3 - 4);
    constant mod15 : integer := (1 - 4) mod (5 - 4);
    constant mod16 : integer := (1 - 4) mod (6 - 4);
    constant mod17 : integer := (1 - 4) mod (7 - 4);
    constant mod18 : integer := (1 - 4) mod (8 - 4);
    constant mod19 : integer := (1 - 4) mod (9 - 4);
    constant mod41 : integer := (4 - 4) mod (1 - 4);
    constant mod42 : integer := (4 - 4) mod (2 - 4);
    constant mod43 : integer := (4 - 4) mod (3 - 4);
    constant mod45 : integer := (4 - 4) mod (5 - 4);
    constant mod46 : integer := (4 - 4) mod (6 - 4);
    constant mod47 : integer := (4 - 4) mod (7 - 4);
    constant mod48 : integer := (4 - 4) mod (8 - 4);
    constant mod49 : integer := (4 - 4) mod (9 - 4);
    constant mod61 : integer := (6 - 4) mod (1 - 4);
    constant mod62 : integer := (6 - 4) mod (2 - 4);
    constant mod63 : integer := (6 - 4) mod (3 - 4);
    constant mod65 : integer := (6 - 4) mod (5 - 4);
    constant mod66 : integer := (6 - 4) mod (6 - 4);
    constant mod67 : integer := (6 - 4) mod (7 - 4);
    constant mod68 : integer := (6 - 4) mod (8 - 4);
    constant mod69 : integer := (6 - 4) mod (9 - 4);

    variable four : integer := 4;

  BEGIN
    assert mod11 = (1 - four) mod (1 - four);
    assert mod12 = (1 - four) mod (2 - four);
    assert mod13 = (1 - four) mod (3 - four);
    assert mod15 = (1 - four) mod (5 - four);
    assert mod16 = (1 - four) mod (6 - four);
    assert mod17 = (1 - four) mod (7 - four);
    assert mod18 = (1 - four) mod (8 - four);
    assert mod19 = (1 - four) mod (9 - four);
    assert mod41 = (4 - four) mod (1 - four);
    assert mod42 = (4 - four) mod (2 - four);
    assert mod43 = (4 - four) mod (3 - four);
    assert mod45 = (4 - four) mod (5 - four);
    assert mod46 = (4 - four) mod (6 - four);
    assert mod47 = (4 - four) mod (7 - four);
    assert mod48 = (4 - four) mod (8 - four);
    assert mod49 = (4 - four) mod (9 - four);
    assert mod61 = (6 - four) mod (1 - four);
    assert mod62 = (6 - four) mod (2 - four);
    assert mod63 = (6 - four) mod (3 - four);
    assert mod65 = (6 - four) mod (5 - four);
    assert mod66 = (6 - four) mod (6 - four);
    assert mod67 = (6 - four) mod (7 - four);
    assert mod68 = (6 - four) mod (8 - four);
    assert mod69 = (6 - four) mod (9 - four);

    assert NOT((mod11 = (1 - four) mod (1 - four))   and
               ( mod12 = (1 - four) mod (2 - four))   and
               ( mod13 = (1 - four) mod (3 - four))   and
               ( mod15 = (1 - four) mod (5 - four))   and
               ( mod16 = (1 - four) mod (6 - four))   and
               ( mod17 = (1 - four) mod (7 - four))   and
               ( mod18 = (1 - four) mod (8 - four))   and
               ( mod19 = (1 - four) mod (9 - four))   and
               ( mod41 = (4 - four) mod (1 - four))   and
               ( mod42 = (4 - four) mod (2 - four))   and
               ( mod43 = (4 - four) mod (3 - four))   and
               ( mod45 = (4 - four) mod (5 - four))   and
               ( mod46 = (4 - four) mod (6 - four))   and
               ( mod47 = (4 - four) mod (7 - four))   and
               ( mod48 = (4 - four) mod (8 - four))   and
               ( mod49 = (4 - four) mod (9 - four))   and
               ( mod61 = (6 - four) mod (1 - four))   and
               ( mod62 = (6 - four) mod (2 - four))   and
               ( mod63 = (6 - four) mod (3 - four))   and
               ( mod65 = (6 - four) mod (5 - four))   and
               ( mod66 = (6 - four) mod (6 - four))   and
               ( mod67 = (6 - four) mod (7 - four))   and
               ( mod68 = (6 - four) mod (8 - four))   and
               ( mod69 = (6 - four) mod (9 - four))   )
      report "***PASSED TEST: c07s02b06x00p05n01i02259"
      severity NOTE;
    assert (( mod11 = (1 - four) mod (1 - four))   and
            ( mod12 = (1 - four) mod (2 - four))   and
            ( mod13 = (1 - four) mod (3 - four))   and
            ( mod15 = (1 - four) mod (5 - four))   and
            ( mod16 = (1 - four) mod (6 - four))   and
            ( mod17 = (1 - four) mod (7 - four))   and
            ( mod18 = (1 - four) mod (8 - four))   and
            ( mod19 = (1 - four) mod (9 - four))   and
            ( mod41 = (4 - four) mod (1 - four))   and
            ( mod42 = (4 - four) mod (2 - four))   and
            ( mod43 = (4 - four) mod (3 - four))   and
            ( mod45 = (4 - four) mod (5 - four))   and
            ( mod46 = (4 - four) mod (6 - four))   and
            ( mod47 = (4 - four) mod (7 - four))   and
            ( mod48 = (4 - four) mod (8 - four))   and
            ( mod49 = (4 - four) mod (9 - four))   and
            ( mod61 = (6 - four) mod (1 - four))   and
            ( mod62 = (6 - four) mod (2 - four))   and
            ( mod63 = (6 - four) mod (3 - four))   and
            ( mod65 = (6 - four) mod (5 - four))   and
            ( mod66 = (6 - four) mod (6 - four))   and
            ( mod67 = (6 - four) mod (7 - four))   and
            ( mod68 = (6 - four) mod (8 - four))   and
            ( mod69 = (6 - four) mod (9 - four))   )
      report "***FAILED TEST: c07s02b06x00p05n01i02259 - Constant integer type mod test failed."
      severity ERROR;
    wait;
  END PROCESS TESTING;

END c07s02b06x00p05n01i02259arch;