source: rtems/c/src/ada-tests/mptests/mp09/mptest.ads @ 190f5c23

4.104.114.84.95
Last change on this file since 190f5c23 was 190f5c23, checked in by Joel Sherrill <joel.sherrill@…>, on Aug 26, 2002 at 2:27:21 PM

2002-08-26 Joel Sherrill <joel@…>

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