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