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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.2.2/] [gcc/] [testsuite/] [ada/] [acats/] [support/] [impdef.a] - Blame information for rev 154

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
-- IMPDEF.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
-- DESCRIPTION:
27
--     This package provides tailorable entities for a particular
28
--     implementation.  Each entity may be modified to suit the needs
29
--     of the implementation.  Default values are provided to act as
30
--     a guide.
31
--
32
--     The entities in this package are those which are used in at least
33
--     one core test. Entities which are used exclusively in tests for
34
--     annexes C-H are located in annex-specific child units of this package.
35
--
36
-- CHANGE HISTORY:
37
--     12 DEC 93   SAIC    Initial PreRelease version
38
--     02 DEC 94   SAIC    Second  PreRelease version
39
--     16 May 95   SAIC    Added constants specific to tests of the random
40
--                         number generator.
41
--     16 May 95   SAIC    Added Max_RPC_Call_Time constant.
42
--     17 Jul 95   SAIC    Added Non_State_String constant.
43
--     21 Aug 95   SAIC    Created from existing IMPSPEC.ADA and IMPBODY.ADA
44
--                         files.
45
--     30 Oct 95   SAIC    Added external name string constants.
46
--     24 Jan 96   SAIC    Added alignment constants.
47
--     29 Jan 96   SAIC    Moved entities not used in core tests into annex-
48
--                         specific child packages. Adjusted commentary.
49
--                         Renamed Validating_System_Programming_Annex to
50
--                         Validating_Annex_C. Added similar Validating_Annex_?
51
--                         constants for the other non-core annexes (D-H).
52
--     01 Mar 96   SAIC    Added external name string constants.
53
--     21 Mar 96   SAIC    Added external name string constants.
54
--     02 May 96   SAIC    Removed constants for draft test CXA5014, which was
55
--                         removed from the tentative ACVC 2.1 suite.
56
--                         Added constants for use with FXACA00.
57
--     06 Jun 96   SAIC    Added constants for wide character test files.
58
--     11 Dec 96   SAIC    Updated constants for wide character test files.
59
--     13 Dec 96   SAIC    Added Address_Value_IO
60
--     13 Sep 99   RLB     Added more external name string constants.
61
--     16 Sep 99   RLB     Corrected definition of Non_State_String constant.
62
--
63
--!
64
 
65
with Report;
66
with Ada.Text_IO;
67
with System.Storage_Elements;
68
 
69
package ImpDef is
70
 
71
--=====-=====-=====-=====-=====-=====-=====-=====-=====-=====-=====-=====--
72
 
73
   -- The following boolean constants indicate whether this validation will
74
   -- include any of annexes C-H. The values of these booleans affect the
75
   -- behavior of the test result reporting software.
76
   --
77
   --    True  means the associated annex IS included in the validation.
78
   --    False means the associated annex is NOT included.
79
 
80
   Validating_Annex_C : constant Boolean := True;
81
   --                                       ^^^^^ --- MODIFY HERE AS NEEDED
82
 
83
   Validating_Annex_D : constant Boolean := True;
84
   --                                       ^^^^^ --- MODIFY HERE AS NEEDED
85
 
86
   Validating_Annex_E : constant Boolean := True;
87
   --                                       ^^^^^ --- MODIFY HERE AS NEEDED
88
 
89
   Validating_Annex_F : constant Boolean := True;
90
   --                                       ^^^^^ --- MODIFY HERE AS NEEDED
91
 
92
   Validating_Annex_G : constant Boolean := True;
93
   --                                       ^^^^^ --- MODIFY HERE AS NEEDED
94
 
95
   Validating_Annex_H : constant Boolean := True;
96
   --                                       ^^^^^ --- MODIFY HERE AS NEEDED
97
 
98
--=====-=====-=====-=====-=====-=====-=====-=====-=====-=====-=====-=====--
99
 
100
   -- This is the minimum time required to allow another task to get
101
   -- control.  It is expected that the task is on the Ready queue.
102
   -- A duration of 0.0 would normally be sufficient but some number
103
   -- greater than that is expected.
104
 
105
   Minimum_Task_Switch : constant Duration := 0.001;
106
   --                                         ^^^ --- MODIFY HERE AS NEEDED
107
 
108
--=====-=====-=====-=====-=====-=====-=====-=====-=====-=====-=====-=====--
109
 
110
   -- This is the time required to activate another task and allow it
111
   -- to run to its first accept statement.  We are considering a simple task
112
   -- with very few Ada statements before the accept.  An implementation is
113
   -- free to specify a delay of several seconds, or even minutes if need be.
114
   -- The main effect of specifying a longer delay than necessary will be an
115
   -- extension of the time needed to run the associated tests.
116
 
117
   Switch_To_New_Task : constant Duration := 0.001;
118
   --                                        ^^^ -- MODIFY HERE AS NEEDED
119
 
120
--=====-=====-=====-=====-=====-=====-=====-=====-=====-=====-=====-=====--
121
 
122
   -- This is the time which will clear the queues of other tasks
123
   -- waiting to run.  It is expected that this will be about five
124
   -- times greater than Switch_To_New_Task.
125
 
126
   Clear_Ready_Queue : constant Duration := 1.1;
127
   --                                       ^^^ --- MODIFY HERE AS NEEDED
128
 
129
--=====-=====-=====-=====-=====-=====-=====-=====-=====-=====-=====-=====--
130
 
131
   -- Some implementations will boot with the time set to 1901/1/1/0.0
132
   -- When a delay of Delay_For_Time_Past is given, the implementation
133
   -- guarantees that a subsequent call to Ada.Calendar.Time_Of(1901,1,1)
134
   -- will yield a time that has already passed (for example, when used in
135
   -- a delay_until statement).
136
 
137
   Delay_For_Time_Past : constant Duration := 0.001;
138
   --                                         ^^^ --- MODIFY HERE AS NEEDED
139
 
140
--=====-=====-=====-=====-=====-=====-=====-=====-=====-=====-=====-=====--
141
 
142
   -- Minimum time interval between calls to the time dependent Reset
143
   -- procedures in Float_Random and Discrete_Random packages that is
144
   -- guaranteed to initiate different sequences.  See RM A.5.2(45).
145
 
146
   Time_Dependent_Reset : constant Duration := 0.001;
147
   --                                          ^^^ --- MODIFY HERE AS NEEDED
148
 
149
--=====-=====-=====-=====-=====-=====-=====-=====-=====-=====-=====-=====--
150
 
151
   -- Test CXA5013 will loop, trying to generate the required sequence
152
   -- of random numbers.  If the RNG is faulty, the required sequence
153
   -- will never be generated.  Delay_Per_Random_Test is a time-out value
154
   -- which allows the test to run for a period of time after which the
155
   -- test is failed if the required sequence has not been produced.
156
   -- This value should be the time allowed for the test to run before it
157
   -- times out.  It should be long enough to allow multiple (independent)
158
   -- runs of the testing code, each generating up to 1000 random
159
   -- numbers.
160
 
161
   Delay_Per_Random_Test : constant Duration := 0.001;
162
   --                                           ^^^ --- MODIFY HERE AS NEEDED
163
 
164
--=====-=====-=====-=====-=====-=====-=====-=====-=====-=====-=====-=====--
165
 
166
   -- The time required to execute this procedure must be greater than the
167
   -- time slice unit on implementations which use time slicing.  For
168
   -- implementations which do not use time slicing the body can be null.
169
 
170
   procedure Exceed_Time_Slice;
171
 
172
--=====-=====-=====-=====-=====-=====-=====-=====-=====-=====-=====-=====--
173
 
174
   -- This constant must not depict a random number generator state value.
175
   -- Using this string in a call to function Value from either the
176
   -- Discrete_Random or Float_Random packages will result in
177
   -- Constraint_Error or Program_Error (expected result in test CXA5012).
178
   -- If there is no such string, set it to "**NONE**".
179
 
180
   Non_State_String : constant String := "By No Means A State";
181
   --           MODIFY HERE AS NEEDED --- ^^^^^^^^^^^^^^^^^^^
182
 
183
--=====-=====-=====-=====-=====-=====-=====-=====-=====-=====-=====-=====--
184
 
185
   -- This string constant must be a legal external tag value as used by
186
   -- CD10001 for the type Some_Tagged_Type in the representation
187
   -- specification for the value of 'External_Tag.
188
 
189
   External_Tag_Value : constant String := "implementation_defined";
190
   --             MODIFY HERE AS NEEDED --- ^^^^^^^^^^^^^^^^^^^^^^
191
 
192
--=====-=====-=====-=====-=====-=====-=====-=====-=====-=====-=====-=====--
193
 
194
   -- The following address constant must be a valid address to locate
195
   -- the C program CD30005_1.  It is shown here as a named number;
196
   -- the implementation may choose to type the constant as appropriate.
197
 
198
   function Cd30005_Proc (X : Integer) return Integer;
199
   pragma Import (C, Cd30005_Proc, "_cd30005_1");
200
 
201
   pragma Linker_Options ("ACATS4GNATDIR/support/cd300051.o");
202
 
203
   CD30005_1_Foreign_Address : constant System.Address:= Cd30005_Proc'Address;
204
 
205
   -- CD30005_1_Foreign_Address : constant System.Address:=
206
   --          System.Storage_Elements.To_Address ( 16#0000_0000# )
207
   --               --MODIFY HERE AS REQUIRED --- ^^^^^^^^^^^^^
208
 
209
--=====-=====-=====-=====-=====-=====-=====-=====-=====-=====-=====-=====--
210
 
211
   -- The following string constant must be the external name resulting
212
   -- from the C compilation of CD30005_1.  The string will be used as an
213
   -- argument to pragma Import.
214
 
215
   CD30005_1_External_Name : constant String := "_cd30005_1";
216
   --                  MODIFY HERE AS NEEDED --- ^^^^^^^^^
217
 
218
--=====-=====-=====-=====-=====-=====-=====-=====-=====-=====-=====-=====--
219
 
220
   -- The following constants should represent the largest default alignment
221
   -- value and the largest alignment value supported by the linker.
222
   -- See RM 13.3(35).
223
 
224
   Max_Default_Alignment : constant := Standard'Maximum_Alignment;
225
   --                                  ^ --- MODIFY HERE AS NEEDED
226
 
227
   Max_Linker_Alignment  : constant := Standard'Maximum_Alignment;
228
   --                                  ^ --- MODIFY HERE AS NEEDED
229
 
230
--=====-=====-=====-=====-=====-=====-=====-=====-=====-=====-=====-=====--
231
 
232
   -- The following string constants must be the external names resulting
233
   -- from the C compilation of CXB30040.C, CXB30060.C, CXB30130.C, and
234
   -- CXB30131.C.  The strings will be used as arguments to pragma Import.
235
 
236
   CXB30040_External_Name : constant String := "CXB30040";
237
   --                 MODIFY HERE AS NEEDED --- ^^^^^^^^
238
 
239
   CXB30060_External_Name : constant String := "CXB30060";
240
   --                 MODIFY HERE AS NEEDED --- ^^^^^^^^
241
 
242
   CXB30130_External_Name : constant String := "CXB30130";
243
   --                 MODIFY HERE AS NEEDED --- ^^^^^^^^
244
 
245
   CXB30131_External_Name : constant String := "CXB30131";
246
   --                 MODIFY HERE AS NEEDED --- ^^^^^^^^
247
 
248
--=====-=====-=====-=====-=====-=====-=====-=====-=====-=====-=====-=====--
249
 
250
   -- The following string constants must be the external names resulting
251
   -- from the COBOL compilation of CXB40090.CBL, CXB40091.CBL, and
252
   -- CXB40092.CBL.  The strings will be used as arguments to pragma Import.
253
 
254
   CXB40090_External_Name : constant String := "CXB40090";
255
   --                 MODIFY HERE AS NEEDED --- ^^^^^^^^
256
 
257
   CXB40091_External_Name : constant String := "CXB40091";
258
   --                 MODIFY HERE AS NEEDED --- ^^^^^^^^
259
 
260
   CXB40092_External_Name : constant String := "CXB40092";
261
   --                 MODIFY HERE AS NEEDED --- ^^^^^^^^
262
 
263
--=====-=====-=====-=====-=====-=====-=====-=====-=====-=====-=====-=====--
264
 
265
   -- The following string constants must be the external names resulting
266
   -- from the Fortran compilation of CXB50040.FTN, CXB50041.FTN,
267
   -- CXB50050.FTN, and CXB50051.FTN.
268
   --
269
   -- The strings will be used as arguments to pragma Import.
270
   --
271
   -- Note that the use of these four string constants will be split between
272
   -- two tests, CXB5004 and CXB5005.
273
 
274
   CXB50040_External_Name : constant String := "CXB50040";
275
   --                 MODIFY HERE AS NEEDED --- ^^^^^^^^
276
 
277
   CXB50041_External_Name : constant String := "CXB50041";
278
   --                 MODIFY HERE AS NEEDED --- ^^^^^^^^
279
 
280
   CXB50050_External_Name : constant String := "CXB50050";
281
   --                 MODIFY HERE AS NEEDED --- ^^^^^^^^
282
 
283
   CXB50051_External_Name : constant String := "CXB50051";
284
   --                 MODIFY HERE AS NEEDED --- ^^^^^^^^
285
 
286
--=====-=====-=====-=====-=====-=====-=====-=====-=====-=====-=====-=====--
287
 
288
   -- The following constants have been defined for use with the
289
   -- representation clause in FXACA00 of type Sales_Record_Type.
290
   --
291
   -- Char_Bits should be an integer at least as large as the number
292
   -- of bits needed to hold a character in an array.
293
   -- A value of 6 * Char_Bits will be used in a representation clause
294
   -- to reserve space for a six character string.
295
   --
296
   -- Next_Storage_Slot should indicate the next storage unit in the record
297
   -- representation clause that does not overlap the storage designated for
298
   -- the six character string.
299
 
300
   Char_Bits         : constant := 8;
301
   --     MODIFY HERE AS NEEDED ---^
302
 
303
   Next_Storage_Slot : constant := 6;
304
   --     MODIFY HERE AS NEEDED ---^
305
 
306
--=====-=====-=====-=====-=====-=====-=====-=====-=====-=====-=====-=====--
307
 
308
   -- The following string constant must be the path name for the .AW
309
   -- files that will be processed by the Wide Character processor to
310
   -- create the C250001 and C250002 tests.  The Wide Character processor
311
   -- will expect to find the files to process at this location.
312
 
313
   Test_Path_Root : constant String :=
314
     "ACATS4GNATDIR/tests/c2/";
315
   -- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ --- MODIFY HERE AS NEEDED
316
 
317
   -- The following two strings must not be modified unless the .AW file
318
   -- names have been changed.  The Wide Character processor will use
319
   -- these strings to find the .AW files used in creating the C250001
320
   -- and C250002 tests.
321
 
322
  Wide_Character_Test : constant String := Test_Path_Root & "c250001";
323
  Upper_Latin_Test    : constant String := Test_Path_Root & "c250002";
324
 
325
--=====-=====-=====-=====-=====-=====-=====-=====-=====-=====-=====-=====--
326
 
327
   -- The following instance of Integer_IO or Modular_IO must be supplied
328
   -- in order for test CD72A02 to compile correctly.
329
   -- Depending on the choice of base type used for the type
330
   -- System.Storage_Elements.Integer_Address; one of the two instances will
331
   -- be correct.  Comment out the incorrect instance.
332
 
333
   -- package Address_Value_IO is
334
   --     new Ada.Text_IO.Integer_IO(System.Storage_Elements.Integer_Address);
335
 
336
    package Address_Value_IO is
337
         new Ada.Text_IO.Modular_IO(System.Storage_Elements.Integer_Address);
338
 
339
--=====-=====-=====-=====-=====-=====-=====-=====-=====-=====-=====-=====--
340
 
341
   One_Second : constant Duration := 0.001;
342
   One_Long_Second : constant Duration := 0.1;
343
 
344
end ImpDef;
345
 
346
 
347
     --==================================================================--
348
 
349
 
350
package body ImpDef is
351
 
352
   -- NOTE: These are example bodies.  It is expected that implementors
353
   --       will write their own versions of these routines.
354
 
355
--=====-=====-=====-=====-=====-=====-=====-=====-=====-=====-=====-=====--
356
 
357
   -- The time required to execute this procedure must be greater than the
358
   -- time slice unit on implementations which use time slicing.  For
359
   -- implementations which do not use time slicing the body can be null.
360
 
361
   Procedure Exceed_Time_Slice is
362
      T : Integer := 0;
363
      Loop_Max : constant Integer := 4_000;
364
   begin
365
      for I in 1..Loop_Max loop
366
         T := Report.Ident_Int (1) * Report.Ident_Int (2);
367
      end loop;
368
   end Exceed_Time_Slice;
369
 
370
--=====-=====-=====-=====-=====-=====-=====-=====-=====-=====-=====-=====--
371
 
372
end ImpDef;

powered by: WebSVN 2.1.0

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