source: rtems/c/src/ada-tests/sptests/sp20/sptest.ads @ bf9ae83

4.104.114.84.95
Last change on this file since bf9ae83 was bf9ae83, checked in by Joel Sherrill <joel.sherrill@…>, on 06/02/97 at 20:32:11

modified copyright notice to be the same as RTEMS 4.0.0.

changed the CVS ID string to be a "development" version.

  • Property mode set to 100644
File size: 4.4 KB
Line 
1--
2--  SPTEST / SPECIFICATION
3--
4--  DESCRIPTION:
5--
6--  This package is the specification for Test 20 of the RTEMS
7--  Single Processor Test Suite.
8--
9--  DEPENDENCIES:
10--
11-- 
12--
13--  COPYRIGHT (c) 1989-1997.
14--  On-Line Applications Research Corporation (OAR).
15--  Copyright assigned to U.S. Government, 1994.
16--
17--  The license and distribution terms for this file may in
18--  the file LICENSE in this distribution or at
19--  http://www.OARcorp.com/rtems/license.html.
20--
21--  $Id$
22--
23
24with CLOCK_DRIVER;
25with RTEMS;
26
27package SPTEST is
28
29--
30--  These arrays contain the IDs and NAMEs of all RTEMS tasks created
31--  by this test.
32--
33
34   TASK_ID   : array ( 1 .. 5 ) of RTEMS.ID;
35   TASK_NAME : array ( 1 .. 5 ) of RTEMS.NAME;
36
37--
38--  These arrays contain the parameters which define the execution
39--  characteristics and periods of each instantiation of the
40--  copies of the RTEMS task TASKS_1_THROUGH_5.
41--
42
43   PERIODS : constant array ( 1 .. 5 )
44     of RTEMS.UNSIGNED32 := ( 2, 2, 2, 2, 100 );
45
46   ITERATIONS : constant array ( 1 .. 5 )
47     of RTEMS.UNSIGNED32 := ( 50, 50, 50, 50, 1 );
48
49   PRIORITIES : constant array ( 1 .. 5 )
50     of RTEMS.UNSIGNED32 := ( 1, 1, 3, 4, 5 );
51
52--
53--  The following type defines the array used to manage the
54--  execution counts of each task's period.
55--
56
57   type COUNT_ARRAY is array ( 1 .. 5 ) of RTEMS.UNSIGNED32;
58
59--
60--  These arrays contains the number of periods successfully completed
61--  by each of the tasks.  At each of its periods, the fifth task
62--  will copy the contents of the COUNT array to TEMPORARY_COUNT,
63--  and clear the COUNT array.  The copy is performed to insure
64--  that no periods fire while it is verifying the correctness
65--  of the test's execution.
66--
67
68   COUNT           : SPTEST.COUNT_ARRAY;
69   TEMPORARY_COUNT : SPTEST.COUNT_ARRAY;
70
71--
72--  INIT
73--
74--  DESCRIPTION:
75--
76--  This RTEMS task initializes the application.
77--
78
79   procedure INIT (
80      ARGUMENT : in     RTEMS.TASK_ARGUMENT
81   );
82
83--
84--  TASK_1_THROUGH_5
85--
86--  DESCRIPTION:
87--
88--  These RTEMS tasks test the Rate Monotonic Manager.
89--
90
91   procedure TASK_1_THROUGH_5 (
92      ARGUMENT : in     RTEMS.TASK_ARGUMENT
93   );
94
95--
96--  GET_ALL_COUNTERS
97--
98--  DESCRIPTION:
99--
100--  This subprogram atomically copies the contents of COUNTER to
101--  TEMPORARY_COUNTER.
102--
103
104   procedure GET_ALL_COUNTERS;
105
106--
107--  This is the Driver Address Table for this test.
108--
109
110   DEVICE_DRIVERS : aliased RTEMS.DRIVER_ADDRESS_TABLE( 1 .. 1 ) :=
111   (1=>
112      (
113        CLOCK_DRIVER.INITIALIZE'ACCESS,              -- Initialization
114        RTEMS.NO_DRIVER_ENTRY,                       -- Open
115        RTEMS.NO_DRIVER_ENTRY,                       -- Close
116        RTEMS.NO_DRIVER_ENTRY,                       -- Read
117        RTEMS.NO_DRIVER_ENTRY,                       -- Write
118        RTEMS.NO_DRIVER_ENTRY                        -- Control
119      )
120   );
121
122--
123--  This is the Initialization Tasks Table for this test.
124--
125
126   INITIALIZATION_TASKS : aliased RTEMS.INITIALIZATION_TASKS_TABLE( 1 .. 1 ) :=
127   (1=>
128     (
129       RTEMS.BUILD_NAME( 'U', 'I', '1', ' ' ),        -- task name
130       2048,                                          -- stack size
131       10,                                            -- priority
132       RTEMS.DEFAULT_ATTRIBUTES,                      -- attributes
133       SPTEST.INIT'ACCESS,                            -- entry point
134       RTEMS.NO_PREEMPT,                              -- initial mode
135       0                                              -- argument list
136     )
137   );
138
139--
140--  This is the Configuration Table for this test.
141--
142
143   CONFIGURATION : aliased RTEMS.CONFIGURATION_TABLE := (
144      RTEMS.NULL_ADDRESS,        -- will be replaced by BSP
145      64 * 1024,                 -- executive RAM size
146      10,                        -- maximum # tasks
147      0,                         -- maximum # timers
148      0,                         -- maximum # semaphores
149      0,                         -- maximum # message queues
150      0,                         -- maximum # messages
151      0,                         -- maximum # partitions
152      0,                         -- maximum # regions
153      0,                         -- maximum # dp memory areas
154      10,                        -- maximum # periods
155      0,                         -- maximum # user extensions
156      RTEMS.MILLISECONDS_TO_MICROSECONDS(10), -- # us in a tick
157      50                         -- # ticks in a timeslice
158  );
159
160end SPTEST;
Note: See TracBrowser for help on using the repository browser.