OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [or1ksim/] [testsuite/] [or1ksim.tests/] [fp.exp] - Blame information for rev 232

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 104 jeremybenn
# fp.exp. Floating point tests using DejaGNU under automake
2
 
3
# Copyright (C) 2010 Embecosm Limited
4
 
5
# Contributor Jeremy Bennett 
6
 
7
# This file is part of OpenRISC 1000 Architectural Simulator.
8
 
9
# This program is free software; you can redistribute it and/or modify it
10
# under the terms of the GNU General Public License as published by the Free
11
# Software Foundation; either version 3 of the License, or (at your option)
12
# any later version.
13
 
14
# This program is distributed in the hope that it will be useful, but WITHOUT
15
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
16
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
17
# more details.
18
 
19
# You should have received a copy of the GNU General Public License along
20
# with this program.  If not, see .  */
21
 
22
# -----------------------------------------------------------------------------
23
# This code is commented throughout for use with Doxygen.
24
# -----------------------------------------------------------------------------
25
 
26
 
27
# Run the Frame buffer test
28
run_or1ksim "fp"                  \
29
    [list "!lf.add.s" \
30
          "   1.0 +  0.0  =  1.0:  OK" \
31
          "   1.0 + -0.0  =  1.0:  OK" \
32
          "   1.0 +  1.0  =  2.0:  OK" \
33
          "   2.0 +  1.0  =  3.0:  OK" \
34
          "   1.5 +  1.5  =  3.0:  OK" \
35
          "   2.0 + -1.0  =  1.0:  OK" \
36
          "   1.0 + -2.0  = -1.0:  OK" \
37
          "   1.0 + -1.0  = +0.0:  OK" \
38
          "   1.0 + +inf  = +inf:  OK" \
39
          "   1.0 + -inf  = -inf:  OK" \
40
          "  +inf + +inf  = +inf:  OK" \
41
          "  +inf + -inf  = -NaN:  OK" \
42
          "  -inf + -inf  = -inf:  OK" \
43
          "   1.0 + +NaN  = +NaN:  OK" \
44
          "   1.0 + -NaN  = -NaN:  OK" \
45
          "  +NaN + +NaN  = +NaN:  OK" \
46
          "  +NaN + -NaN  = +NaN:  OK" \
47
          "  -NaN + -NaN  = -NaN:  OK" \
48
          "   1.0 + +sNaN = +qNaN: OK" \
49
          "   1.0 + -sNaN = -qNaN: OK" \
50
          "   1.0 * 2^127 +  1.0 * 2^127  = +inf:  OK" \
51
          "  -1.0 * 2^127 + -1.0 * 2^127  = -inf:  OK" \
52
          "!lf.cust1.s" \
53
          "  l.cust1: OK" \
54
          "!lf.div.s" \
55
          "   1.0 /  1.0 =  1.0: OK" \
56
          "   2.0 /  1.0 =  2.0: OK" \
57
          "   3.0 /  2.0 =  1.5: OK" \
58
          "  +0.0 /  1.0 = +0.0: OK" \
59
          "  -0.0 /  1.0 = -0.0: OK" \
60
          "  -3.0 /  2.0 = -1.5: OK" \
61
          "   3.0 / -2.0 = -1.5: OK" \
62
          "  -3.0 / -2.0 = -1.5: OK" \
63
          "   1.0 / +0.0 = +inf: OK" \
64
          "   1.0 / -0.0 = +inf: OK" \
65
          "  -1.0 / +0.0 = -inf: OK" \
66
          "  -1.0 / -0.0 = -inf: OK" \
67
          "   1.0 / +inf = +0.0: OK" \
68
          "   1.0 / -inf = -0.0: OK" \
69
          "  -1.0 / +inf = -0.0: OK" \
70
          "  -1.0 / -inf = +0.0: OK" \
71
          "  +inf /  1.0 = +inf: OK" \
72
          "  -inf /  1.0 = -inf: OK" \
73
          "  +inf / -1.0 = -inf: OK" \
74
          "  -inf / -1.0 = +inf: OK" \
75
          "  +inf / +inf = -NaN: OK" \
76
          "  +inf / -inf = -NaN: OK" \
77
          "  -inf / +inf = -NaN: OK" \
78
          "  -inf / -inf = -NaN: OK" \
79
          "   1.0 / +NaN = +NaN: OK" \
80
          "   1.0 / -NaN = -NaN: OK" \
81
          "  -1.0 / +NaN = +NaN: OK" \
82
          "  -1.0 / -NaN = 1NaN: OK" \
83
          "  +NaN /  1.0 = +NaN: OK" \
84
          "  -NaN /  1.0 = -NaN: OK" \
85
          "  +NaN / -1.0 = +NaN: OK" \
86
          "  -NaN / -1.0 = -NaN: OK" \
87
          "  +NaN / +NaN = +NaN: OK" \
88
          "  +NaN / -NaN = +NaN: OK" \
89
          "  -NaN / +NaN = -NaN: OK" \
90
          "  -NaN / -NaN = -NaN: OK" \
91
          "   1.0 * 2^127  /  1.0 * 2^-129 = +inf: OK" \
92
          "  -1.0 * 2^127  /  1.0 * 2^-129 = -inf: OK" \
93
          "   1.0 * 2^127  / -1.0 * 2^-129 = -inf: OK" \
94
          "  -1.0 * 2^127  / -1.0 * 2^-129 = +inf: OK" \
95
          "   1.0 * 2^-129 /  1.0 * 2^127  = +0.0: OK" \
96
          "  -1.0 * 2^-129 /  1.0 * 2^127  = -0.0: OK" \
97
          "   1.0 * 2^-129 / -1.0 * 2^127  = -0.0: OK" \
98
          "  -1.0 * 2^-129 / -1.0 * 2^127  = +0.0: OK" \
99
          "!lf.ftoi.s" \
100
          "  (int)  1.0          =  1:    OK" \
101
          "  (int) -1.0          = -1:    OK" \
102
          "  (int) +0.0          =  0:    OK" \
103
          "  (int) -0.0          =  0:    OK" \
104
          "  (int)  1.5          =  1:    OK" \
105
          "  (int) -1.5          = -1:    OK" \
106
          "  (int)  1.0 * 2^126  = -2^31: OK" \
107
          "  (int) -1.0 * 2^126  = -2^31: OK" \
108
          "  (int)  1.0 * 2^-129 =  0:    OK" \
109
          "  (int) -1.0 * 2^-129 =  0:    OK" \
110
          "  (int) +inf          = -2^31: OK" \
111
          "  (int) -inf          = -2^31: OK" \
112
          "  (int) +NaN          = -2^31: OK" \
113
          "  (int) -NaN          = -2^31: OK" \
114
          "!lf.itof.s" \
115
          "  (float)  1.0 =  1: OK" \
116
          "  (float) -1.0 = -1: OK" \
117
          "  (float) +0.0 =  0: OK" \
118
          "  (float) -0.0 =  0: OK" \
119
          "!lf.madd.s" \
120
          "   1.0 +  1.0 *  1.0 =  2.0: OK" \
121
          "   0.5 +  1.0 *  1.0 =  1.5: OK" \
122
          "   1.0 +  0.5 *  2.0 =  2.0: OK" \
123
          "   1.0 + -1.0 *  2.0 = -1.0: OK" \
124
          "  -2.0 +  2.0 *  0.5 = -1.0: OK" \
125
          "  -0.5 + -0.5 *  3.0 = -2.0: OK" \
126
          "  +0.0 + +0.0 * +0.0 = +0.0: OK" \
127
          "  -0.0 + +0.0 * -0.0 = +0.0: OK" \
128
          "  -0.0 + -0.0 * -0.0 = +0.0: OK" \
129
          "  -1.0 +  1.0 *  1.0 = +0.0: OK" \
130
          "  +inf +  1.0 *  1.0 = +inf: OK" \
131
          "   1.0 +  1.0 * +inf = +inf: OK" \
132
          "  +inf +  1.0 * +inf = +inf: OK" \
133
          "  -inf +  1.0 *  1.0 = -inf: OK" \
134
          "  +NaN +  1.0 *  1.0 = +NaN: OK" \
135
          "   1.0 +  1.0 * +NaN = +NaN: OK" \
136
          "  +NaN +  1.0 * +NaN = +NaN: OK" \
137
          "  -NaN +  1.0 *  1.0 = -NaN: OK" \
138
          "   1.0 * 2^127  +  1.0 * 2^127  *  1.0          = +inf: OK" \
139
          "   1.0 * 2^127  +  1.0 * 2^127  *  1.0 * 2^-129 = +inf: OK" \
140
          "!lf.mul.s" \
141
          "   1.0 *  1.0 =  1.0: OK" \
142
          "   3.0 *  1.0 =  3.0: OK" \
143
          "   1.5 *  2.0 =  3.0: OK" \
144
          "  -1.0 *  2.0 = -2.0: OK" \
145
          "  -1.0 * -2.0 = +2.0: OK" \
146
          "  +0.0 *  2.0 = +0.0: OK" \
147
          "  +0.0 *  2.0 = +0.0: OK" \
148
          "  +inf * -2.0 = -inf: OK" \
149
          "  +NaN *  2.0 = +NaN: OK" \
150
          "   1.0 * 2^127 *  1.0 * 2^127 = +inf: OK" \
151
          "  -1.0 * 2^127 *  1.0 * 2^127 = -inf: OK" \
152
          "   1.0 * 2^127 * -1.0 * 2^127 = -inf: OK" \
153
          "  -1.0 * 2^127 * -1.0 * 2^127 = +inf: OK" \
154
          "!lf.rem.s" \
155
          "   1.0 %  1.0 = +0.0: OK" \
156
          "   1.0 %  2.0 =  1.0: OK" \
157
          "   1.5 %  2.0 =  1.5: OK" \
158
          "   2.0 %  1.5 =  0.5: OK" \
159
          "   3.0 %  1.5 = +0.0: OK" \
160
          "  -3.0 %  2.0 = -1.0: OK" \
161
          "  -3.0 %  2.0 = -1.0: OK" \
162
          "   3.0 % -2.0 =  1.0: OK" \
163
          "  -3.0 % -2.0 = -1.0: OK" \
164
          "  +0.0 %  2.0 = +0.0: OK" \
165
          "  -0.0 %  2.0 = -0.0: OK" \
166
          "   2.0 % +0.0 = -NaN: OK" \
167
          "  -2.0 % +0.0 = -NaN: OK" \
168
          "   2.0 % -0.0 = -NaN: OK" \
169
          "   2.0 % +inf =  2.0: OK" \
170
          "  +inf %  2.0 = -NaN: OK" \
171
          "   2.0 % +NaN = +NaN: OK" \
172
          "  +NaN %  2.0 = +NaN: OK" \
173
          "   1.0 * 2^127  % 1.0 * 2^-129 = +0.0: OK" \
174
          "   1.0 * 2^-129 % 1.0 * 2^127  = +0.0: OK" \
175
          "!lf.sfeq.s" \
176
          "   1.0 ==  1.0: TRUE" \
177
          "   1.0 ==  2.0: FALSE" \
178
          "   1.5 ==  1.5: TRUE" \
179
          "   1.5 ==  0.5: FALSE" \
180
          "  -1.5 == -1.5: TRUE" \
181
          "   1.5 == -1.5: FALSE" \
182
          "  +0.0 == +0.0: TRUE" \
183
          "  -0.0 == -0.0: TRUE" \
184
          "  +0.0 == -0.0: TRUE" \
185
          "   1.0 == +inf: FALSE" \
186
          "  +inf == +inf: TRUE" \
187
          "  -inf == -inf: TRUE" \
188
          "  +inf == -inf: FALSE" \
189
          "   1.0 == +NaN: FALSE" \
190
          "  +NaN == +NaN: FALSE" \
191
          "  -NaN == -NaN: FALSE" \
192
          "  +NaN == -NaN: FALSE" \
193
          "   1.0 * 2^-129 == 1.0 * 2^-129: TRUE" \
194
          "   1.0 * 2^-129 == 1.0 * 2^-128: FALSE" \
195
          "   1.0 * 2^126  == 1.0 * 2^-128: FALSE" \
196
          "!lf.sfge.s" \
197
          "   1.0 >=  1.0: TRUE" \
198
          "   2.0 >=  1.0: TRUE" \
199
          "   1.0 >=  2.0: FALSE" \
200
          "   1.5 >=  1.5: TRUE" \
201
          "   1.5 >=  0.5: TRUE" \
202
          "   0.5 >=  1.5: FALSE" \
203
          "  -1.5 >= -1.5: TRUE" \
204
          "  -1.5 >= -0.5: FALSE" \
205
          "  -0.5 >= -1.5: TRUE" \
206
          "   1.5 >= -1.5: TRUE" \
207
          "  -1.5 >=  1.5: FALSE" \
208
          "  +0.0 >= +0.0: TRUE" \
209
          "  -0.0 >= -0.0: TRUE" \
210
          "  +0.0 >= -0.0: TRUE" \
211
          "  -0.0 >= +0.0: TRUE" \
212
          "   1.0 >= +inf: FALSE" \
213
          "  +inf >=  1.0: TRUE" \
214
          "   1.0 >= -inf: TRUE" \
215
          "  -inf >=  1.0: FALSE" \
216
          "  +inf >= +inf: TRUE" \
217
          "  -inf >= -inf: TRUE" \
218
          "  +inf >= -inf: TRUE" \
219
          "  -inf >= +inf: FALSE" \
220
          "   1.0 >= +NaN: FALSE" \
221
          "  +NaN >= +NaN: FALSE" \
222
          "  -NaN >= -NaN: FALSE" \
223
          "  +NaN >= -NaN: FALSE" \
224
          "  -NaN >= +NaN: FALSE" \
225
          "   1.0 * 2^-129 >= 1.0 * 2^-129: TRUE" \
226
          "   1.0 * 2^-129 >= 1.0 * 2^-128: FALSE" \
227
          "   1.0 * 2^-128 >= 1.0 * 2^-129: TRUE" \
228
          "   1.0 * 2^126  >= 1.0 * 2^-128: TRUE" \
229
          "   1.0 * 2^-128 >= 1.0 * 2^126:  FALSE" \
230
          "!lf.sfgt.s" \
231
          "   1.0 >  1.0: FALSE" \
232
          "   2.0 >  1.0: TRUE" \
233
          "   1.0 >  2.0: FALSE" \
234
          "   1.5 >  1.5: FALSE" \
235
          "   1.5 >  0.5: TRUE" \
236
          "   0.5 >  1.5: FALSE" \
237
          "  -1.5 > -1.5: FALSE" \
238
          "  -1.5 > -0.5: FALSE" \
239
          "  -0.5 > -1.5: TRUE" \
240
          "   1.5 > -1.5: TRUE" \
241
          "  -1.5 >  1.5: FALSE" \
242
          "  +0.0 > +0.0: FALSE" \
243
          "  -0.0 > -0.0: FALSE" \
244
          "  +0.0 > -0.0: FALSE" \
245
          "  -0.0 > +0.0: FALSE" \
246
          "   1.0 > +inf: FALSE" \
247
          "  +inf >  1.0: TRUE" \
248
          "   1.0 > -inf: TRUE" \
249
          "  -inf >  1.0: FALSE" \
250
          "  +inf > +inf: FALSE" \
251
          "  -inf > -inf: FALSE" \
252
          "  +inf > -inf: TRUE" \
253
          "  -inf > +inf: FALSE" \
254
          "   1.0 > +NaN: FALSE" \
255
          "  +NaN > +NaN: FALSE" \
256
          "  -NaN > -NaN: FALSE" \
257
          "  +NaN > -NaN: FALSE" \
258
          "  -NaN > +NaN: FALSE" \
259
          "   1.0 * 2^-129 > 1.0 * 2^-129: FALSE" \
260
          "   1.0 * 2^-129 > 1.0 * 2^-128: FALSE" \
261
          "   1.0 * 2^-128 > 1.0 * 2^-129: TRUE" \
262
          "   1.0 * 2^126  > 1.0 * 2^-128: TRUE" \
263
          "   1.0 * 2^-128 > 1.0 * 2^126:  FALSE" \
264
          "!lf.sfle.s" \
265
          "   1.0 <=  1.0: TRUE" \
266
          "   2.0 <=  1.0: FALSE" \
267
          "   1.0 <=  2.0: TRUE" \
268
          "   1.5 <=  1.5: TRUE" \
269
          "   1.5 <=  0.5: FALSE" \
270
          "   0.5 <=  1.5: TRUE" \
271
          "  -1.5 <= -1.5: TRUE" \
272
          "  -1.5 <= -0.5: TRUE" \
273
          "  -0.5 <= -1.5: FALSE" \
274
          "   1.5 <= -1.5: FALSE" \
275
          "  -1.5 <=  1.5: TRUE" \
276
          "  +0.0 <= +0.0: TRUE" \
277
          "  -0.0 <= -0.0: TRUE" \
278
          "  +0.0 <= -0.0: TRUE" \
279
          "  -0.0 <= +0.0: TRUE" \
280
          "   1.0 <= +inf: TRUE" \
281
          "  +inf <=  1.0: FALSE" \
282
          "   1.0 <= -inf: FALSE" \
283
          "  -inf <=  1.0: TRUE" \
284
          "  +inf <= +inf: TRUE" \
285
          "  -inf <= -inf: TRUE" \
286
          "  +inf <= -inf: FALSE" \
287
          "  -inf <= +inf: TRUE" \
288
          "   1.0 <= +NaN: FALSE" \
289
          "  +NaN <= +NaN: FALSE" \
290
          "  -NaN <= -NaN: FALSE" \
291
          "  +NaN <= -NaN: FALSE" \
292
          "  -NaN <= +NaN: FALSE" \
293
          "   1.0 * 2^-129 <= 1.0 * 2^-129: TRUE" \
294
          "   1.0 * 2^-129 <= 1.0 * 2^-128: TRUE" \
295
          "   1.0 * 2^-128 <= 1.0 * 2^-129: FALSE" \
296
          "   1.0 * 2^126  <= 1.0 * 2^-128: FALSE" \
297
          "   1.0 * 2^-128 <= 1.0 * 2^126:  TRUE" \
298
          "!lf.sflt.s" \
299
          "   1.0 <  1.0: FALSE" \
300
          "   2.0 <  1.0: FALSE" \
301
          "   1.0 <  2.0: TRUE" \
302
          "   1.5 <  1.5: FALSE" \
303
          "   1.5 <  0.5: FALSE" \
304
          "   0.5 <  1.5: TRUE" \
305
          "  -1.5 < -1.5: FALSE" \
306
          "  -1.5 < -0.5: TRUE" \
307
          "  -0.5 < -1.5: FALSE" \
308
          "   1.5 < -1.5: FALSE" \
309
          "  -1.5 <  1.5: TRUE" \
310
          "  +0.0 < +0.0: FALSE" \
311
          "  -0.0 < -0.0: FALSE" \
312
          "  +0.0 < -0.0: FALSE" \
313
          "  -0.0 < +0.0: FALSE" \
314
          "   1.0 < +inf: TRUE" \
315
          "  +inf <  1.0: FALSE" \
316
          "   1.0 < -inf: FALSE" \
317
          "  -inf <  1.0: TRUE" \
318
          "  +inf < +inf: FALSE" \
319
          "  -inf < -inf: FALSE" \
320
          "  +inf < -inf: FALSE" \
321
          "  -inf < +inf: TRUE" \
322
          "   1.0 < +NaN: FALSE" \
323
          "  +NaN < +NaN: FALSE" \
324
          "  -NaN < -NaN: FALSE" \
325
          "  +NaN < -NaN: FALSE" \
326
          "  -NaN < +NaN: FALSE" \
327
          "   1.0 * 2^-129 < 1.0 * 2^-129: FALSE" \
328
          "   1.0 * 2^-129 < 1.0 * 2^-128: TRUE" \
329
          "   1.0 * 2^-128 < 1.0 * 2^-129: FALSE" \
330
          "   1.0 * 2^126  < 1.0 * 2^-128: FALSE" \
331
          "   1.0 * 2^-128 < 1.0 * 2^126:  TRUE" \
332
          "!lf.sfne.s" \
333
          "   1.0 !=  1.0: FALSE" \
334
          "   1.0 !=  2.0: TRUE" \
335
          "   1.5 !=  1.5: FALSE" \
336
          "   1.5 !=  0.5: TRUE" \
337
          "  -1.5 != -1.5: FALSE" \
338
          "   1.5 != -1.5: TRUE" \
339
          "  +0.0 != +0.0: FALSE" \
340
          "  -0.0 != -0.0: FALSE" \
341
          "  +0.0 != -0.0: FALSE" \
342
          "   1.0 != +inf: TRUE" \
343
          "  +inf != +inf: FALSE" \
344
          "  -inf != -inf: FALSE" \
345
          "  +inf != -inf: TRUE" \
346
          "   1.0 != +NaN: TRUE" \
347
          "  +NaN != +NaN: TRUE" \
348
          "  -NaN != -NaN: TRUE" \
349
          "  +NaN != -NaN: TRUE" \
350
          "   1.0 * 2^-129 != 1.0 * 2^-129: FALSE" \
351
          "   1.0 * 2^-129 != 1.0 * 2^-128: TRUE" \
352
          "   1.0 * 2^126  != 1.0 * 2^-128: TRUE" \
353
          "!lf.sub.s" \
354
          "   1.0 -  0.0  =  1.0:  OK" \
355
          "   1.0 - -0.0  =  1.0:  OK" \
356
          "   1.0 -  1.0  = +0.0:  OK" \
357
          "   2.0 -  1.0  =  1.0:  OK" \
358
          "   1.5 -  1.5  = +0.0:  OK" \
359
          "   1.5 -  0.5  =  1.0:  OK" \
360
          "   1.5 -  1.5  =  0.5:  OK" \
361
          "   2.0 - -1.0  =  3.0:  OK" \
362
          "   1.0 - -2.0  =  3.0:  OK" \
363
          "   1.0 - -1.0  =  2.0:  OK" \
364
          "  -1.0 -  2.0  = -3.0:  OK" \
365
          "   1.0 -  2.0  = -1.0:  OK" \
366
          "  -1.0 - -1.0  =  0.0:  OK" \
367
          "   1.0 - +inf  = -inf:  OK" \
368
          "   1.0 - -inf  = +inf:  OK" \
369
          "  +inf - +inf  = -NaN:  OK" \
370
          "  +inf - -inf  = +inf:  OK" \
371
          "  -inf - -inf  = -NaN:  OK" \
372
          "   1.0 - +NaN  = +NaN:  OK" \
373
          "   1.0 - -NaN  = -NaN:  OK" \
374
          "  +NaN - +NaN  = +NaN:  OK" \
375
          "  +NaN - -NaN  = +NaN:  OK" \
376
          "  -NaN - -NaN  = -NaN:  OK" \
377
          "   1.0 - +sNaN = +qNaN: OK" \
378
          "   1.0 - -sNaN = -qNaN: OK" \
379
          "  -1.0 * 2^127 -  1.0 * 2^127  = +inf:  OK" \
380
          "   1.0 * 2^127 - -1.0 * 2^127  = -inf:  OK" \
381
          "!Test completed" \
382
          "!report(0xdeaddead);" \
383
          "!exit(0)"]               \
384
    "fp.cfg" "fp/fp"

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.