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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [ada/] [acats/] [tests/] [c3/] [c35a08b.ada] - Blame information for rev 316

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

Line No. Rev Author Line
1 294 jeremybenn
-- C35A08B.ADA
2
 
3
--                             Grant of Unlimited Rights
4
--
5
--     Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687,
6
--     F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained 
7
--     unlimited rights in the software and documentation contained herein.
8
--     Unlimited rights are defined in DFAR 252.227-7013(a)(19).  By making 
9
--     this public release, the Government intends to confer upon all 
10
--     recipients unlimited rights  equal to those held by the Government.  
11
--     These rights include rights to use, duplicate, release or disclose the 
12
--     released technical data and computer software in whole or in part, in 
13
--     any manner and for any purpose whatsoever, and to have or permit others 
14
--     to do so.
15
--
16
--                                    DISCLAIMER
17
--
18
--     ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR
19
--     DISCLOSED ARE AS IS.  THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED 
20
--     WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE
21
--     SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE 
22
--     OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A
23
--     PARTICULAR PURPOSE OF SAID MATERIAL.
24
--*
25
-- OBJECTIVE:
26
--     CHECK THAT THE MULTIPLICATION AND DIVISION OPERATORS FOR TWO
27
--     FIXED POINT OPERANDS ARE DECLARED IN STANDARD AND ARE DIRECTLY
28
--     VISIBLE.
29
 
30
-- HISTORY:
31
--     BCB 01/21/88  CREATED ORIGINAL TEST.
32
 
33
WITH REPORT; USE REPORT;
34
 
35
PROCEDURE C35A08B IS
36
 
37
     PACKAGE P IS
38
          TYPE T1 IS DELTA 2.0**(-4) RANGE -100.0 .. 100.0;
39
          TYPE T2 IS DELTA 2.0**(-4) RANGE -100.0 .. 100.0;
40
     END P;
41
     USE P;
42
 
43
     X1 : P.T1 := 6.0;
44
     X2 : P.T1 := 2.0;
45
     X3 : P.T1;
46
     X4 : P.T1;
47
     X5 : P.T1;
48
     X6 : P.T1;
49
 
50
     X7 : P.T2 := 2.0;
51
 
52
     FUNCTION IDENT_FIXED(X : P.T1) RETURN P.T1 IS
53
     BEGIN
54
          RETURN X * IDENT_INT(1);
55
     END IDENT_FIXED;
56
 
57
BEGIN
58
     TEST ("C35A08B", "CHECK THAT THE MULTIPLICATION AND DIVISION " &
59
                      "OPERATORS FOR TWO FIXED POINT OPERANDS ARE " &
60
                      "DECLARED IN STANDARD AND ARE DIRECTLY VISIBLE");
61
 
62
     X3 := P.T1 (X1 * X2);
63
     X4 := P.T1 (X1 / X2);
64
 
65
     X5 := P.T1 (STANDARD."*" (X1,X2));
66
     X6 := P.T1 (STANDARD."/" (X1,X2));
67
 
68
     IF X3 /= IDENT_FIXED (12.0) THEN
69
          FAILED ("IMPROPER VALUE FOR FIXED POINT MULTIPLICATION - 1");
70
     END IF;
71
 
72
     IF X4 /= IDENT_FIXED (3.0) THEN
73
          FAILED ("IMPROPER VALUE FOR FIXED POINT DIVISION - 1");
74
     END IF;
75
 
76
     X3 := P.T1 (X1 * X7);
77
     X4 := P.T1 (X1 / X7);
78
 
79
     X5 := P.T1 (STANDARD."*" (X1,X7));
80
     X6 := P.T1 (STANDARD."/" (X1,X7));
81
 
82
     IF X3 /= IDENT_FIXED (12.0) THEN
83
          FAILED ("IMPROPER VALUE FOR FIXED POINT MULTIPLICATION - 2");
84
     END IF;
85
 
86
     IF X4 /= IDENT_FIXED (3.0) THEN
87
          FAILED ("IMPROPER VALUE FOR FIXED POINT DIVISION - 2");
88
     END IF;
89
 
90
     RESULT;
91
END C35A08B;

powered by: WebSVN 2.1.0

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