source: rtems/c/src/ada-tests/mptests/mp09/mptest.ads @ 1bce637

4.104.114.84.95
Last change on this file since 1bce637 was d0f426a1, checked in by Joel Sherrill <joel.sherrill@…>, on 06/03/97 at 00:34:04

* empty log message *

  • Property mode set to 100644
File size: 6.8 KB
Line 
1--
2--  MPTEST / SPECIFICATION
3--
4--  DESCRIPTION:
5--
6--  This package is the specification for Test 9 of the RTEMS
7--  Multiprocessor 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 BSP_MPCI;
25with RTEMS;
26
27package MPTEST 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 ( RTEMS.UNSIGNED32 range 1 .. 3 ) of RTEMS.ID;
35   TASK_NAME : array ( RTEMS.UNSIGNED32 range 1 .. 3 ) of RTEMS.NAME;
36
37--
38--  These arrays contain the IDs and NAMEs of all RTEMS message
39--  queues created by this test.
40--
41
42   QUEUE_ID   : array ( RTEMS.UNSIGNED32 range 1 .. 2 ) of RTEMS.ID;
43   QUEUE_NAME : array ( RTEMS.UNSIGNED32 range 1 .. 2 ) of RTEMS.NAME;
44
45--
46--  The following are message buffers used to contain the test messages
47--  and pointers to those buffers.
48--
49
50   RECEIVE_BUFFER_AREA : RTEMS.BUFFER;
51   BUFFER_AREA_1       : RTEMS.BUFFER;
52   BUFFER_AREA_2       : RTEMS.BUFFER;
53   BUFFER_AREA_3       : RTEMS.BUFFER;
54   BUFFER_AREA_4       : RTEMS.BUFFER;
55
56   RECEIVE_BUFFER : RTEMS.BUFFER_POINTER;
57   BUFFER_1       : RTEMS.BUFFER_POINTER;
58   BUFFER_2       : RTEMS.BUFFER_POINTER;
59   BUFFER_3       : RTEMS.BUFFER_POINTER;
60   BUFFER_4       : RTEMS.BUFFER_POINTER;
61
62--
63--  This variable contains the ID of the remote task with which this
64--  test interacts.
65--
66
67   REMOTE_TID  : RTEMS.ID;
68
69--
70--  This variable contains the node on which the remote task with which
71--  this test interacts resides.
72--
73
74   REMOTE_NODE : RTEMS.UNSIGNED32;
75
76--
77--  The number of events to process per dot printed out.
78--
79
80   PER_DOT : constant RTEMS.UNSIGNED32 := 100;
81
82--
83--  INIT
84--
85--  DESCRIPTION:
86--
87--  This RTEMS task initializes the application.
88--
89
90   procedure INIT (
91      ARGUMENT : in     RTEMS.TASK_ARGUMENT
92   );
93
94--
95--  SEND_MESSAGES
96--
97--  This subprogram prints and sends a sequence of three test messages.
98--  One of the messages is sent, one is urgent, and one is broadcast.
99--  A one second pause is between each the sending of each message.
100--
101
102   procedure SEND_MESSAGES;
103
104--
105--  RECEIVE_MESSAGES
106--
107--  This subprogram receives and prints a sequence of three test messages.
108--
109
110   procedure RECEIVE_MESSAGES;
111
112--
113--  FILL_BUFFER
114--
115--  DESCRIPTION:
116--
117--  This subprogram takes the SOURCE input string and places
118--  up to the first sixteen characters of that string into
119--  the message BUFFER.
120--
121 
122   procedure FILL_BUFFER (
123      SOURCE : in     STRING;
124      BUFFER :    out RTEMS.BUFFER
125   );
126 
127--
128--  PUT_BUFFER
129--
130--  DESCRIPTION:
131--
132--  This subprogram prints the specified message BUFFER.
133--
134 
135   procedure PUT_BUFFER (
136      BUFFER : in     RTEMS.BUFFER
137   );
138
139--
140--  TEST_TASK
141--
142--  DESCRIPTION:
143--
144--  This is the body of the RTEMS tasks which constitute this test.
145--
146
147   procedure TEST_TASK (
148      ARGUMENT : in     RTEMS.TASK_ARGUMENT
149   );
150
151--
152--  This is the Driver Address Table for this test.
153--
154
155   DEVICE_DRIVERS : aliased RTEMS.DRIVER_ADDRESS_TABLE( 1 .. 1 ) :=
156   (1=>
157      (
158        CLOCK_DRIVER.INITIALIZE'ACCESS,              -- Initialization
159        RTEMS.NO_DRIVER_ENTRY,                       -- Open
160        RTEMS.NO_DRIVER_ENTRY,                       -- Close
161        RTEMS.NO_DRIVER_ENTRY,                       -- Read
162        RTEMS.NO_DRIVER_ENTRY,                       -- Write
163        RTEMS.NO_DRIVER_ENTRY                        -- Control
164      )
165   );
166
167--
168--  This is the Initialization Tasks Table for this test.
169--
170
171   INITIALIZATION_TASKS : aliased RTEMS.INITIALIZATION_TASKS_TABLE( 1 .. 1 ) :=
172   (1=>
173     (
174       RTEMS.BUILD_NAME( 'U', 'I', '1', ' ' ),        -- task name
175       2048,                                          -- stack size
176       1,                                             -- priority
177       RTEMS.DEFAULT_ATTRIBUTES,                      -- attributes
178       MPTEST.INIT'ACCESS,                            -- entry point
179       RTEMS.NO_PREEMPT,                              -- initial mode
180       0                                              -- argument list
181     )
182   );
183
184----------------------------------------------------------------------------
185----------------------------------------------------------------------------
186--                             BEGIN SUBPACKAGE                           --
187----------------------------------------------------------------------------
188----------------------------------------------------------------------------
189
190   --
191   --  MPTEST.PER_NODE_CONFIGURATION / SPECIFICATION
192   --
193   --  DESCRIPTION:
194   --
195   --  This package is the specification for the subpackage
196   --  which will define the per node configuration parameters.
197   --
198   
199   package PER_NODE_CONFIGURATION is
200
201   --
202   --  LOCAL_NODE_NUMBER
203   --
204   --  DESCRIPTION:
205   --
206   --  This function returns the node number for this node.
207   --
208
209      function LOCAL_NODE_NUMBER
210      return RTEMS.UNSIGNED32;
211 
212      pragma INLINE ( LOCAL_NODE_NUMBER );
213
214   end PER_NODE_CONFIGURATION;
215 
216----------------------------------------------------------------------------
217----------------------------------------------------------------------------
218--                              END SUBPACKAGE                            --
219----------------------------------------------------------------------------
220----------------------------------------------------------------------------
221
222--
223--  This is the Multiprocessor Configuration Table for this test.
224--
225
226   MULTIPROCESSING_CONFIGURATION : aliased RTEMS.MULTIPROCESSING_TABLE := (
227      MPTEST.PER_NODE_CONFIGURATION.LOCAL_NODE_NUMBER,
228      2,                         -- maximum # nodes in system
229      32,                        -- maximum # global objects
230      32                         -- maximum # proxies
231    );
232
233--
234--  This is the Configuration Table for this test.
235--
236
237   CONFIGURATION : aliased RTEMS.CONFIGURATION_TABLE := (
238      RTEMS.NULL_ADDRESS,        -- will be replaced by BSP
239      64 * 1024,                 -- executive RAM size
240      10,                        -- maximum # tasks
241      0,                         -- maximum # timers
242      0,                         -- maximum # semaphores
243      1,                         -- maximum # message queues
244      1,                         -- maximum # messages
245      0,                         -- maximum # partitions
246      0,                         -- maximum # regions
247      0,                         -- maximum # dp memory areas
248      0,                         -- maximum # periods
249      0,                         -- maximum # user extensions
250      RTEMS.MILLISECONDS_TO_MICROSECONDS(10), -- # us in a tick
251      50                         -- # ticks in a timeslice
252  );
253
254end MPTEST;
Note: See TracBrowser for help on using the repository browser.