OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [ada/] [acats/] [support/] [f390a00.a] - Blame information for rev 294

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 294 jeremybenn
-- F390A00.A
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
--
26
-- FOUNDATION DESCRIPTION:
27
--      This file declares the root type and primitive subprograms of an
28
--      alert system abstraction, to be used for tests covering tagged
29
--      types and type extensions.
30
--
31
-- CHANGE HISTORY:
32
--      06 Dec 94   SAIC    ACVC 2.0
33
--      04 Jun 96   SAIC    ACVC 2.1: Added pragma Elaborate for Ada.Calendar.
34
--
35
--!
36
 
37
with Ada.Calendar;
38
pragma Elaborate (Ada.Calendar);
39
 
40
package F390A00 is  -- Alert system abstraction.
41
 
42
 
43
   -- Declarations used by component Display_On and procedure Display.
44
 
45
   type Device_Enum      is (Null_Device, Teletype, Console, Big_Screen);
46
   type Display_Counters is array (Device_Enum) of Natural;
47
 
48
   Display_Count_For : Display_Counters := (others => 0);
49
 
50
 
51
   -- Declarations used by component Arrival_Time.
52
 
53
   Default_Time : constant Ada.Calendar.Time :=
54
                    Ada.Calendar.Time_Of (1901, 1, 1);
55
   Alert_Time   : constant Ada.Calendar.Time :=
56
                    Ada.Calendar.Time_Of (1991, 6, 15);
57
 
58
 
59
 
60
   type Alert_Type is tagged record                   -- Root tagged type.
61
      Arrival_Time : Ada.Calendar.Time := Default_Time;
62
      Display_On   : Device_Enum   := Null_Device;
63
   end record;
64
 
65
 
66
   procedure Display (A : in Alert_Type);             -- To be inherited by
67
                                                      -- all derivatives.
68
 
69
   procedure Handle (A : in out Alert_Type);          -- To be overridden by
70
                                                      -- all derivatives.
71
 
72
end F390A00;
73
 
74
 
75
     --==================================================================--
76
 
77
 
78
package body F390A00 is  -- Alert system abstraction.
79
 
80
 
81
   procedure Display (A : in Alert_Type) is
82
   begin
83
      Display_Count_For (A.Display_On) := Display_Count_For (A.Display_On) + 1;
84
   end Display;
85
 
86
 
87
   procedure Handle (A : in out Alert_Type) is
88
   begin
89
      A.Arrival_Time := Alert_Time;
90
      Display (A);
91
   end Handle;
92
 
93
 
94
end F390A00;

powered by: WebSVN 2.1.0

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