1 | -- |
---|
2 | -- MPTEST / SPECIFICATION |
---|
3 | -- |
---|
4 | -- DESCRIPTION: |
---|
5 | -- |
---|
6 | -- This package is the specification for Test 8 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 BSP_MPCI; |
---|
25 | with RTEMS; |
---|
26 | |
---|
27 | package 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 semaphores created |
---|
39 | -- by this test. |
---|
40 | -- |
---|
41 | |
---|
42 | SEMAPHORE_ID : array ( RTEMS.UNSIGNED32 range 1 .. 2 ) of RTEMS.ID; |
---|
43 | SEMAPHORE_NAME : array ( RTEMS.UNSIGNED32 range 1 .. 2 ) of RTEMS.NAME; |
---|
44 | |
---|
45 | -- |
---|
46 | -- This variable contains the ID of the remote task with which this |
---|
47 | -- test interacts. |
---|
48 | -- |
---|
49 | |
---|
50 | REMOTE_TID : RTEMS.ID; |
---|
51 | |
---|
52 | -- |
---|
53 | -- This variable contains the node on which the remote task with which |
---|
54 | -- this test interacts resides. |
---|
55 | -- |
---|
56 | |
---|
57 | REMOTE_NODE : RTEMS.UNSIGNED32; |
---|
58 | |
---|
59 | -- |
---|
60 | -- The number of events to process per dot printed out. |
---|
61 | -- |
---|
62 | |
---|
63 | PER_DOT : constant RTEMS.UNSIGNED32 := 100; |
---|
64 | |
---|
65 | -- |
---|
66 | -- INIT |
---|
67 | -- |
---|
68 | -- DESCRIPTION: |
---|
69 | -- |
---|
70 | -- This RTEMS task initializes the application. |
---|
71 | -- |
---|
72 | |
---|
73 | procedure INIT ( |
---|
74 | ARGUMENT : in RTEMS.TASK_ARGUMENT |
---|
75 | ); |
---|
76 | |
---|
77 | -- |
---|
78 | -- TEST_TASK |
---|
79 | -- |
---|
80 | -- DESCRIPTION: |
---|
81 | -- |
---|
82 | -- This is the body of the RTEMS tasks which constitute this test. |
---|
83 | -- |
---|
84 | |
---|
85 | procedure TEST_TASK ( |
---|
86 | ARGUMENT : in RTEMS.TASK_ARGUMENT |
---|
87 | ); |
---|
88 | |
---|
89 | -- |
---|
90 | -- This is the Driver Address Table for this test. |
---|
91 | -- |
---|
92 | |
---|
93 | DEVICE_DRIVERS : aliased RTEMS.DRIVER_ADDRESS_TABLE( 1 .. 1 ) := |
---|
94 | (1=> |
---|
95 | ( |
---|
96 | CLOCK_DRIVER.INITIALIZE'ACCESS, -- Initialization |
---|
97 | RTEMS.NO_DRIVER_ENTRY, -- Open |
---|
98 | RTEMS.NO_DRIVER_ENTRY, -- Close |
---|
99 | RTEMS.NO_DRIVER_ENTRY, -- Read |
---|
100 | RTEMS.NO_DRIVER_ENTRY, -- Write |
---|
101 | RTEMS.NO_DRIVER_ENTRY -- Control |
---|
102 | ) |
---|
103 | ); |
---|
104 | |
---|
105 | -- |
---|
106 | -- This is the Initialization Tasks Table for this test. |
---|
107 | -- |
---|
108 | |
---|
109 | INITIALIZATION_TASKS : aliased RTEMS.INITIALIZATION_TASKS_TABLE( 1 .. 1 ) := |
---|
110 | (1=> |
---|
111 | ( |
---|
112 | RTEMS.BUILD_NAME( 'U', 'I', '1', ' ' ), -- task name |
---|
113 | 2048, -- stack size |
---|
114 | 1, -- priority |
---|
115 | RTEMS.DEFAULT_ATTRIBUTES, -- attributes |
---|
116 | MPTEST.INIT'ACCESS, -- entry point |
---|
117 | RTEMS.NO_PREEMPT, -- initial mode |
---|
118 | 0 -- argument list |
---|
119 | ) |
---|
120 | ); |
---|
121 | |
---|
122 | ---------------------------------------------------------------------------- |
---|
123 | ---------------------------------------------------------------------------- |
---|
124 | -- BEGIN SUBPACKAGE -- |
---|
125 | ---------------------------------------------------------------------------- |
---|
126 | ---------------------------------------------------------------------------- |
---|
127 | |
---|
128 | -- |
---|
129 | -- MPTEST.PER_NODE_CONFIGURATION / SPECIFICATION |
---|
130 | -- |
---|
131 | -- DESCRIPTION: |
---|
132 | -- |
---|
133 | -- This package is the specification for the subpackage |
---|
134 | -- which will define the per node configuration parameters. |
---|
135 | -- |
---|
136 | |
---|
137 | package PER_NODE_CONFIGURATION is |
---|
138 | |
---|
139 | -- |
---|
140 | -- LOCAL_NODE_NUMBER |
---|
141 | -- |
---|
142 | -- DESCRIPTION: |
---|
143 | -- |
---|
144 | -- This function returns the node number for this node. |
---|
145 | -- |
---|
146 | |
---|
147 | function LOCAL_NODE_NUMBER |
---|
148 | return RTEMS.UNSIGNED32; |
---|
149 | |
---|
150 | pragma INLINE ( LOCAL_NODE_NUMBER ); |
---|
151 | |
---|
152 | end PER_NODE_CONFIGURATION; |
---|
153 | |
---|
154 | ---------------------------------------------------------------------------- |
---|
155 | ---------------------------------------------------------------------------- |
---|
156 | -- END SUBPACKAGE -- |
---|
157 | ---------------------------------------------------------------------------- |
---|
158 | ---------------------------------------------------------------------------- |
---|
159 | |
---|
160 | -- |
---|
161 | -- This is the Multiprocessor Configuration Table for this test. |
---|
162 | -- |
---|
163 | |
---|
164 | MULTIPROCESSING_CONFIGURATION : aliased RTEMS.MULTIPROCESSING_TABLE := ( |
---|
165 | MPTEST.PER_NODE_CONFIGURATION.LOCAL_NODE_NUMBER, |
---|
166 | 2, -- maximum # nodes in system |
---|
167 | 32, -- maximum # global objects |
---|
168 | 32 -- maximum # proxies |
---|
169 | ); |
---|
170 | |
---|
171 | -- |
---|
172 | -- This is the Configuration Table for this test. |
---|
173 | -- |
---|
174 | |
---|
175 | CONFIGURATION : aliased RTEMS.CONFIGURATION_TABLE := ( |
---|
176 | RTEMS.NULL_ADDRESS, -- will be replaced by BSP |
---|
177 | 64 * 1024, -- executive RAM size |
---|
178 | 10, -- maximum # tasks |
---|
179 | 1, -- maximum # timers |
---|
180 | 1, -- maximum # semaphores |
---|
181 | 0, -- maximum # message queues |
---|
182 | 0, -- maximum # messages |
---|
183 | 0, -- maximum # partitions |
---|
184 | 0, -- maximum # regions |
---|
185 | 0, -- maximum # dp memory areas |
---|
186 | 0, -- maximum # periods |
---|
187 | 0, -- maximum # user extensions |
---|
188 | RTEMS.MILLISECONDS_TO_MICROSECONDS(10), -- # us in a tick |
---|
189 | 50 -- # ticks in a timeslice |
---|
190 | ); |
---|
191 | |
---|
192 | end MPTEST; |
---|