1 |
d93979b7
|
Arnaud Dieumegard
|
|
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: tc1986.vhd,v 1.2 2001-10-26 16:29:44 paw Exp $
|
27 |
|
|
-- $Revision: 1.2 $
|
28 |
|
|
--
|
29 |
|
|
-- ---------------------------------------------------------------------
|
30 |
|
|
|
31 |
|
|
ENTITY c07s02b02x00p02n01i01986ent IS
|
32 |
|
|
type omega is range (-100) to 100
|
33 |
|
|
units
|
34 |
|
|
o1;
|
35 |
|
|
o2 = 5 o1;
|
36 |
|
|
o3 = 10 o1;
|
37 |
|
|
end units;
|
38 |
|
|
END c07s02b02x00p02n01i01986ent;
|
39 |
|
|
|
40 |
|
|
ARCHITECTURE c07s02b02x00p02n01i01986arch OF c07s02b02x00p02n01i01986ent IS
|
41 |
|
|
|
42 |
|
|
BEGIN
|
43 |
|
|
TESTING: PROCESS
|
44 |
|
|
variable om1, om2, om3 : omega;
|
45 |
|
|
|
46 |
|
|
--alias in A of variable in A of E physical type
|
47 |
|
|
|
48 |
|
|
alias al1 : omega is om1;
|
49 |
|
|
alias al2 : omega is om2;
|
50 |
|
|
alias al3 : omega is om3;
|
51 |
|
|
BEGIN
|
52 |
|
|
om1 := 4 o1;
|
53 |
|
|
om2 := 5 o1;
|
54 |
|
|
om3 := 6 o1;
|
55 |
|
|
|
56 |
|
|
assert NOT( 5 o1 = 5 o1 and
|
57 |
|
|
5 o1 = abs(5 o1) and
|
58 |
|
|
5 o1 = abs(-5 o1) and
|
59 |
|
|
4 o1 /= 5 o1 and
|
60 |
|
|
4 o1 /= abs(5 o1) and
|
61 |
|
|
4 o1 /= abs(-5 o1) and
|
62 |
|
|
4 o1 <= 5 o1 and
|
63 |
|
|
4 o1 <= abs(5 o1) and
|
64 |
|
|
4 o1 <= abs(-5 o1) and
|
65 |
|
|
5 o1 <= abs(-5 o1) and
|
66 |
|
|
4 o1 < 5 o1 and
|
67 |
|
|
4 o1 < abs(5 o1) and
|
68 |
|
|
4 o1 < abs(-5 o1) and
|
69 |
|
|
6 o1 >= 5 o1 and
|
70 |
|
|
6 o1 >= abs(5 o1) and
|
71 |
|
|
6 o1 >= abs(-5 o1) and
|
72 |
|
|
5 o1 >= abs(-5 o1) and
|
73 |
|
|
6 o1 > 5 o1 and
|
74 |
|
|
6 o1 > abs(5 o1) and
|
75 |
|
|
6 o1 > abs(-5 o1) and
|
76 |
|
|
|
77 |
|
|
--relation operators with variables
|
78 |
|
|
|
79 |
|
|
om1 = om1 and
|
80 |
|
|
om2 = abs(om2) and
|
81 |
|
|
om2 = abs(-om2) and
|
82 |
|
|
om1 /= om2 and
|
83 |
|
|
om1 /= abs(om2) and
|
84 |
|
|
om1 /= abs(-om2) and
|
85 |
|
|
om1 <= om2 and
|
86 |
|
|
om1 <= abs(om2) and
|
87 |
|
|
om1 <= abs(-om2) and
|
88 |
|
|
om2 <= abs(-om2) and
|
89 |
|
|
om1 < om2 and
|
90 |
|
|
om1 < abs(om2) and
|
91 |
|
|
om1 < abs(-om2) and
|
92 |
|
|
om2 >= om1 and
|
93 |
|
|
om2 >= abs(om1) and
|
94 |
|
|
om2 >= abs(-om1) and
|
95 |
|
|
om2 >= abs(-om1) and
|
96 |
|
|
om2 > om1 and
|
97 |
|
|
om2 > abs(om1) and
|
98 |
|
|
om2 > abs(-om1) )
|
99 |
|
|
report "***PASSED TEST: c07s02b02x00p02n01i01986"
|
100 |
|
|
severity NOTE;
|
101 |
|
|
assert ( 5 o1 = 5 o1 and
|
102 |
|
|
5 o1 = abs(5 o1) and
|
103 |
|
|
5 o1 = abs(-5 o1) and
|
104 |
|
|
4 o1 /= 5 o1 and
|
105 |
|
|
4 o1 /= abs(5 o1) and
|
106 |
|
|
4 o1 /= abs(-5 o1) and
|
107 |
|
|
4 o1 <= 5 o1 and
|
108 |
|
|
4 o1 <= abs(5 o1) and
|
109 |
|
|
4 o1 <= abs(-5 o1) and
|
110 |
|
|
5 o1 <= abs(-5 o1) and
|
111 |
|
|
4 o1 < 5 o1 and
|
112 |
|
|
4 o1 < abs(5 o1) and
|
113 |
|
|
4 o1 < abs(-5 o1) and
|
114 |
|
|
6 o1 >= 5 o1 and
|
115 |
|
|
6 o1 >= abs(5 o1) and
|
116 |
|
|
6 o1 >= abs(-5 o1) and
|
117 |
|
|
5 o1 >= abs(-5 o1) and
|
118 |
|
|
6 o1 > 5 o1 and
|
119 |
|
|
6 o1 > abs(5 o1) and
|
120 |
|
|
6 o1 > abs(-5 o1) and
|
121 |
|
|
|
122 |
|
|
--relation operators with variables
|
123 |
|
|
|
124 |
|
|
om1 = om1 and
|
125 |
|
|
om2 = abs(om2) and
|
126 |
|
|
om2 = abs(-om2) and
|
127 |
|
|
om1 /= om2 and
|
128 |
|
|
om1 /= abs(om2) and
|
129 |
|
|
om1 /= abs(-om2) and
|
130 |
|
|
om1 <= om2 and
|
131 |
|
|
om1 <= abs(om2) and
|
132 |
|
|
om1 <= abs(-om2) and
|
133 |
|
|
om2 <= abs(-om2) and
|
134 |
|
|
om1 < om2 and
|
135 |
|
|
om1 < abs(om2) and
|
136 |
|
|
om1 < abs(-om2) and
|
137 |
|
|
om2 >= om1 and
|
138 |
|
|
om2 >= abs(om1) and
|
139 |
|
|
om2 >= abs(-om1) and
|
140 |
|
|
om2 >= abs(-om1) and
|
141 |
|
|
om2 > om1 and
|
142 |
|
|
om2 > abs(om1) and
|
143 |
|
|
om2 > abs(-om1) )
|
144 |
|
|
report "***FAILED TEST: c07s02b02x00p02n01i01986 - Relational operators truth table test for data type of Physical failed."
|
145 |
|
|
severity ERROR;
|
146 |
|
|
wait;
|
147 |
|
|
END PROCESS TESTING;
|
148 |
|
|
|
149 |
|
|
END c07s02b02x00p02n01i01986arch;
|