1 | -- |
---|
2 | -- MPTEST / SPECIFICATION |
---|
3 | -- |
---|
4 | -- DESCRIPTION: |
---|
5 | -- |
---|
6 | -- This package is the specification for Test 14 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 | |
---|
24 | with CLOCK_DRIVER; |
---|
25 | with BSP_MPCI; |
---|
26 | with RTEMS; |
---|
27 | |
---|
28 | package MPTEST is |
---|
29 | |
---|
30 | -- |
---|
31 | -- These arrays contain the IDs and NAMEs of all RTEMS tasks created |
---|
32 | -- by this test for passing event sets. |
---|
33 | -- |
---|
34 | |
---|
35 | TASK_ID : array ( RTEMS.UNSIGNED32 range 1 .. 4 ) of RTEMS.ID; |
---|
36 | TASK_NAME : array ( RTEMS.UNSIGNED32 range 1 .. 4 ) of RTEMS.NAME; |
---|
37 | -- |
---|
38 | -- These arrays contain the IDs and NAMEs of all RTEMS tasks created |
---|
39 | -- by this test for passing event sets. |
---|
40 | -- |
---|
41 | |
---|
42 | EVENT_TASK_ID : array ( RTEMS.UNSIGNED32 range 1 .. 4 ) of RTEMS.ID; |
---|
43 | EVENT_TASK_NAME : array ( RTEMS.UNSIGNED32 range 1 .. 4 ) of RTEMS.NAME; |
---|
44 | |
---|
45 | -- |
---|
46 | -- These arrays contain the IDs and NAMEs of all RTEMS tasks created |
---|
47 | -- by this test for manipulating semaphores. |
---|
48 | -- |
---|
49 | |
---|
50 | SEMAPHORE_TASK_ID : |
---|
51 | array ( RTEMS.UNSIGNED32 range 1 .. 4 ) of RTEMS.ID; |
---|
52 | SEMAPHORE_TASK_NAME : |
---|
53 | array ( RTEMS.UNSIGNED32 range 1 .. 4 ) of RTEMS.NAME; |
---|
54 | |
---|
55 | -- |
---|
56 | -- These arrays contain the IDs and NAMEs of all RTEMS tasks created |
---|
57 | -- by this test for passing messages. |
---|
58 | -- |
---|
59 | |
---|
60 | QUEUE_TASK_ID : array ( RTEMS.UNSIGNED32 range 1 .. 4 ) of RTEMS.ID; |
---|
61 | QUEUE_TASK_NAME : array ( RTEMS.UNSIGNED32 range 1 .. 4 ) of RTEMS.NAME; |
---|
62 | |
---|
63 | -- |
---|
64 | -- These arrays contain the IDs and NAMEs of all RTEMS tasks created |
---|
65 | -- by this test for manipulating the global partitions. |
---|
66 | -- |
---|
67 | |
---|
68 | PARTITION_TASK_ID : |
---|
69 | array ( RTEMS.UNSIGNED32 range 1 .. 4 ) of RTEMS.ID; |
---|
70 | PARTITION_TASK_NAME : |
---|
71 | array ( RTEMS.UNSIGNED32 range 1 .. 4 ) of RTEMS.NAME; |
---|
72 | |
---|
73 | -- |
---|
74 | -- These arrays contain the IDs and NAMEs of all RTEMS partitions |
---|
75 | -- created by this test. |
---|
76 | -- |
---|
77 | |
---|
78 | PARTITION_ID : array ( RTEMS.UNSIGNED32 range 1 .. 4 ) of RTEMS.ID; |
---|
79 | PARTITION_NAME : array ( RTEMS.UNSIGNED32 range 1 .. 4 ) of RTEMS.NAME; |
---|
80 | |
---|
81 | -- |
---|
82 | -- These arrays contain the IDs and NAMEs of all RTEMS semaphores |
---|
83 | -- created by this test. |
---|
84 | -- |
---|
85 | |
---|
86 | SEMAPHORE_ID : array ( RTEMS.UNSIGNED32 range 1 .. 4 ) of RTEMS.ID; |
---|
87 | SEMAPHORE_NAME : array ( RTEMS.UNSIGNED32 range 1 .. 4 ) of RTEMS.NAME; |
---|
88 | |
---|
89 | -- |
---|
90 | -- These arrays contain the IDs and NAMEs of all RTEMS message_queues |
---|
91 | -- created by this test. |
---|
92 | -- |
---|
93 | |
---|
94 | QUEUE_ID : array ( RTEMS.UNSIGNED32 range 1 .. 4 ) of RTEMS.ID; |
---|
95 | QUEUE_NAME : array ( RTEMS.UNSIGNED32 range 1 .. 4 ) of RTEMS.NAME; |
---|
96 | |
---|
97 | -- |
---|
98 | -- |
---|
99 | -- These arrays contain the IDs and NAMEs of all RTEMS timers |
---|
100 | -- created by this test. |
---|
101 | -- |
---|
102 | |
---|
103 | TIMER_ID : array ( RTEMS.UNSIGNED32 range 1 .. 4 ) of RTEMS.ID; |
---|
104 | TIMER_NAME : array ( RTEMS.UNSIGNED32 range 1 .. 4 ) of RTEMS.NAME; |
---|
105 | |
---|
106 | -- |
---|
107 | -- The following are message buffers used to contain the test messages |
---|
108 | -- and pointers to those buffers. |
---|
109 | -- |
---|
110 | |
---|
111 | BUFFER_AREAS : array ( RTEMS.UNSIGNED32 range 1 .. 4 ) of RTEMS.BUFFER; |
---|
112 | BUFFERS : |
---|
113 | array ( RTEMS.UNSIGNED32 range 1 .. 4 ) of RTEMS.BUFFER_POINTER; |
---|
114 | |
---|
115 | -- |
---|
116 | -- This is the area used for the partition. |
---|
117 | -- |
---|
118 | |
---|
119 | PARTITION_AREA : |
---|
120 | array ( RTEMS.UNSIGNED32 range 0 .. 16#7FFF# ) of RTEMS.UNSIGNED8; |
---|
121 | for PARTITION_AREA'ALIGNMENT use RTEMS.STRUCTURE_ALIGNMENT; |
---|
122 | |
---|
123 | -- |
---|
124 | -- The following constants control the flow of "dot" indicators |
---|
125 | -- from the various test componenents. |
---|
126 | -- |
---|
127 | |
---|
128 | EVENT_TASK_DOT_COUNT : constant RTEMS.UNSIGNED32 := 100; |
---|
129 | EVENT_SEND_DOT_COUNT : constant RTEMS.UNSIGNED32 := 100; |
---|
130 | DELAYED_EVENT_DOT_COUNT : constant RTEMS.UNSIGNED32 := 1000; |
---|
131 | MESSAGE_DOT_COUNT : constant RTEMS.UNSIGNED32 := 200; |
---|
132 | PARTITION_DOT_COUNT : constant RTEMS.UNSIGNED32 := 200; |
---|
133 | SEMAPHORE_DOT_COUNT : constant RTEMS.UNSIGNED32 := 200; |
---|
134 | |
---|
135 | -- |
---|
136 | -- These contain the IDs and NAMEs of the RTEMS timers used |
---|
137 | -- by this test to stop. |
---|
138 | -- |
---|
139 | |
---|
140 | STOP_TIMER_ID : RTEMS.ID; |
---|
141 | STOP_TIMER_NAME : RTEMS.NAME; |
---|
142 | |
---|
143 | -- |
---|
144 | -- This variable is set when the test should stop executing. |
---|
145 | -- |
---|
146 | |
---|
147 | STOP_TEST : RTEMS.BOOLEAN; |
---|
148 | |
---|
149 | -- |
---|
150 | -- EXIT_TEST |
---|
151 | -- |
---|
152 | -- DESCRIPTION: |
---|
153 | -- |
---|
154 | -- This subprogram is invoked to stop this test. |
---|
155 | -- |
---|
156 | |
---|
157 | procedure EXIT_TEST; |
---|
158 | |
---|
159 | -- |
---|
160 | -- DELAYED_SEND_EVENT |
---|
161 | -- |
---|
162 | -- DESCRIPTION: |
---|
163 | -- |
---|
164 | -- This subprogram is a timer service routine which sends an |
---|
165 | -- event set to a waiting task. |
---|
166 | -- |
---|
167 | |
---|
168 | procedure DELAYED_SEND_EVENT ( |
---|
169 | TIMER_ID : in RTEMS.ID; |
---|
170 | IGNORED_ADDRESS : in RTEMS.ADDRESS |
---|
171 | ); |
---|
172 | |
---|
173 | -- |
---|
174 | -- INIT |
---|
175 | -- |
---|
176 | -- DESCRIPTION: |
---|
177 | -- |
---|
178 | -- This RTEMS task initializes the application. |
---|
179 | -- |
---|
180 | |
---|
181 | procedure INIT ( |
---|
182 | ARGUMENT : in RTEMS.TASK_ARGUMENT |
---|
183 | ); |
---|
184 | |
---|
185 | -- |
---|
186 | -- TEST_TASK |
---|
187 | -- |
---|
188 | -- DESCRIPTION: |
---|
189 | -- |
---|
190 | -- This is one of the test tasks. |
---|
191 | -- |
---|
192 | |
---|
193 | procedure TEST_TASK ( |
---|
194 | ARGUMENT : in RTEMS.TASK_ARGUMENT |
---|
195 | ); |
---|
196 | |
---|
197 | -- |
---|
198 | -- DELAYED_EVENTS_TASK |
---|
199 | -- |
---|
200 | -- DESCRIPTION: |
---|
201 | -- |
---|
202 | -- This is one of the test tasks. |
---|
203 | -- |
---|
204 | |
---|
205 | procedure DELAYED_EVENTS_TASK ( |
---|
206 | ARGUMENT : in RTEMS.TASK_ARGUMENT |
---|
207 | ); |
---|
208 | |
---|
209 | -- |
---|
210 | -- MESSAGE_QUEUE_TASK |
---|
211 | -- |
---|
212 | -- DESCRIPTION: |
---|
213 | -- |
---|
214 | -- This is one of the test tasks. |
---|
215 | -- |
---|
216 | |
---|
217 | procedure MESSAGE_QUEUE_TASK ( |
---|
218 | INDEX : in RTEMS.TASK_ARGUMENT |
---|
219 | ); |
---|
220 | |
---|
221 | -- |
---|
222 | -- PARTITION_TASK |
---|
223 | -- |
---|
224 | -- DESCRIPTION: |
---|
225 | -- |
---|
226 | -- This is one of the test tasks. |
---|
227 | -- |
---|
228 | |
---|
229 | procedure PARTITION_TASK ( |
---|
230 | IGNORED : in RTEMS.TASK_ARGUMENT |
---|
231 | ); |
---|
232 | |
---|
233 | -- |
---|
234 | -- SEMAPHORE_TASK |
---|
235 | -- |
---|
236 | -- DESCRIPTION: |
---|
237 | -- |
---|
238 | -- This is one of the test tasks. |
---|
239 | -- |
---|
240 | |
---|
241 | procedure SEMAPHORE_TASK ( |
---|
242 | ARGUMENT : in RTEMS.TASK_ARGUMENT |
---|
243 | ); |
---|
244 | |
---|
245 | -- |
---|
246 | -- This is the Driver Address Table for this test. |
---|
247 | -- |
---|
248 | |
---|
249 | DEVICE_DRIVERS : aliased RTEMS.DRIVER_ADDRESS_TABLE( 1 .. 1 ) := |
---|
250 | (1=> |
---|
251 | ( |
---|
252 | CLOCK_DRIVER.INITIALIZE'ACCESS, -- Initialization |
---|
253 | RTEMS.NO_DRIVER_ENTRY, -- Open |
---|
254 | RTEMS.NO_DRIVER_ENTRY, -- Close |
---|
255 | RTEMS.NO_DRIVER_ENTRY, -- Read |
---|
256 | RTEMS.NO_DRIVER_ENTRY, -- Write |
---|
257 | RTEMS.NO_DRIVER_ENTRY -- Control |
---|
258 | ) |
---|
259 | ); |
---|
260 | |
---|
261 | -- |
---|
262 | -- This is the Initialization Tasks Table for this test. |
---|
263 | -- |
---|
264 | |
---|
265 | INITIALIZATION_TASKS : aliased RTEMS.INITIALIZATION_TASKS_TABLE( 1 .. 1 ) := |
---|
266 | (1=> |
---|
267 | ( |
---|
268 | RTEMS.BUILD_NAME( 'U', 'I', '1', ' ' ), -- task name |
---|
269 | 2048, -- stack size |
---|
270 | 1, -- priority |
---|
271 | RTEMS.DEFAULT_ATTRIBUTES, -- attributes |
---|
272 | MPTEST.INIT'ACCESS, -- entry point |
---|
273 | RTEMS.TIMESLICE, -- initial mode |
---|
274 | 0 -- argument list |
---|
275 | ) |
---|
276 | ); |
---|
277 | |
---|
278 | ---------------------------------------------------------------------------- |
---|
279 | ---------------------------------------------------------------------------- |
---|
280 | -- BEGIN SUBPACKAGE -- |
---|
281 | ---------------------------------------------------------------------------- |
---|
282 | ---------------------------------------------------------------------------- |
---|
283 | |
---|
284 | -- |
---|
285 | -- MPTEST.PER_NODE_CONFIGURATION / SPECIFICATION |
---|
286 | -- |
---|
287 | -- DESCRIPTION: |
---|
288 | -- |
---|
289 | -- This package is the specification for the subpackage |
---|
290 | -- which will define the per node configuration parameters. |
---|
291 | -- |
---|
292 | |
---|
293 | package PER_NODE_CONFIGURATION is |
---|
294 | |
---|
295 | -- |
---|
296 | -- LOCAL_NODE_NUMBER |
---|
297 | -- |
---|
298 | -- DESCRIPTION: |
---|
299 | -- |
---|
300 | -- This function returns the node number for this node. |
---|
301 | -- |
---|
302 | |
---|
303 | function LOCAL_NODE_NUMBER |
---|
304 | return RTEMS.UNSIGNED32; |
---|
305 | |
---|
306 | pragma INLINE ( LOCAL_NODE_NUMBER ); |
---|
307 | |
---|
308 | end PER_NODE_CONFIGURATION; |
---|
309 | |
---|
310 | ---------------------------------------------------------------------------- |
---|
311 | ---------------------------------------------------------------------------- |
---|
312 | -- END SUBPACKAGE -- |
---|
313 | ---------------------------------------------------------------------------- |
---|
314 | ---------------------------------------------------------------------------- |
---|
315 | |
---|
316 | -- |
---|
317 | -- This is the Multiprocessor Configuration Table for this test. |
---|
318 | -- |
---|
319 | |
---|
320 | MULTIPROCESSING_CONFIGURATION : aliased RTEMS.MULTIPROCESSING_TABLE := ( |
---|
321 | MPTEST.PER_NODE_CONFIGURATION.LOCAL_NODE_NUMBER, |
---|
322 | 2, -- maximum # nodes in system |
---|
323 | 32, -- maximum # global objects |
---|
324 | 32 -- maximum # proxies |
---|
325 | ); |
---|
326 | |
---|
327 | -- |
---|
328 | -- This is the Configuration Table for this test. |
---|
329 | -- |
---|
330 | |
---|
331 | CONFIGURATION : aliased RTEMS.CONFIGURATION_TABLE := ( |
---|
332 | RTEMS.NULL_ADDRESS, -- will be replaced by BSP |
---|
333 | 64 * 1024, -- executive RAM size |
---|
334 | 10, -- maximum # tasks |
---|
335 | 12, -- maximum # timers |
---|
336 | 1, -- maximum # semaphores |
---|
337 | 1, -- maximum # message queues |
---|
338 | 1, -- maximum # messages |
---|
339 | 1, -- maximum # partitions |
---|
340 | 0, -- maximum # regions |
---|
341 | 0, -- maximum # dp memory areas |
---|
342 | 0, -- maximum # periods |
---|
343 | 0, -- maximum # user extensions |
---|
344 | RTEMS.MILLISECONDS_TO_MICROSECONDS(10), -- # us in a tick |
---|
345 | 1 -- # ticks in a timeslice |
---|
346 | ); |
---|
347 | |
---|
348 | end MPTEST; |
---|