[6d4e604b] | 1 | -- |
---|
| 2 | -- MPTEST / SPECIFICATION |
---|
| 3 | -- |
---|
| 4 | -- DESCRIPTION: |
---|
| 5 | -- |
---|
| 6 | -- This package is the specification for Test 6 of the RTEMS |
---|
| 7 | -- Multiprocessor Test Suite. |
---|
| 8 | -- |
---|
| 9 | -- DEPENDENCIES: |
---|
| 10 | -- |
---|
| 11 | -- |
---|
| 12 | -- |
---|
[bf9ae83] | 13 | -- COPYRIGHT (c) 1989-1997. |
---|
[6d4e604b] | 14 | -- On-Line Applications Research Corporation (OAR). |
---|
[bf9ae83] | 15 | -- Copyright assigned to U.S. Government, 1994. |
---|
[6d4e604b] | 16 | -- |
---|
[bf9ae83] | 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. |
---|
[6d4e604b] | 20 | -- |
---|
[bf9ae83] | 21 | -- $Id$ |
---|
[6d4e604b] | 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 timers created |
---|
| 39 | -- by this test. |
---|
| 40 | -- |
---|
| 41 | |
---|
| 42 | TIMER_ID : array ( RTEMS.UNSIGNED32 range 1 .. 2 ) of RTEMS.ID; |
---|
| 43 | TIMER_NAME : array ( RTEMS.UNSIGNED32 range 1 .. 2 ) of RTEMS.NAME; |
---|
| 44 | |
---|
| 45 | -- |
---|
| 46 | -- This variable is set when the test should stop executing. |
---|
| 47 | -- |
---|
| 48 | STOP_TEST : RTEMS.BOOLEAN; |
---|
| 49 | |
---|
| 50 | -- |
---|
| 51 | -- This variable contains the ID of the remote task with which this |
---|
| 52 | -- test interacts. |
---|
| 53 | -- |
---|
| 54 | |
---|
| 55 | REMOTE_TID : RTEMS.ID; |
---|
| 56 | |
---|
| 57 | -- |
---|
| 58 | -- This variable contains the node on which the remote task with which |
---|
| 59 | -- this test interacts resides. |
---|
| 60 | -- |
---|
| 61 | |
---|
| 62 | REMOTE_NODE : RTEMS.UNSIGNED32; |
---|
| 63 | |
---|
| 64 | -- |
---|
| 65 | -- The number of signals to process per dot printed out. |
---|
| 66 | -- |
---|
| 67 | |
---|
| 68 | MAXIMUM_DOTS : constant RTEMS.UNSIGNED32 := 25; |
---|
| 69 | |
---|
| 70 | -- |
---|
| 71 | -- The following is a table of the event sets which consist of |
---|
| 72 | -- a single event. This test cycles through all of these |
---|
| 73 | -- events. |
---|
| 74 | -- |
---|
| 75 | |
---|
| 76 | EVENT_SET_TABLE : constant array ( 0 .. 30 ) of RTEMS.EVENT_SET := ( |
---|
| 77 | RTEMS.EVENT_0, |
---|
| 78 | RTEMS.EVENT_1, |
---|
| 79 | RTEMS.EVENT_2, |
---|
| 80 | RTEMS.EVENT_3, |
---|
| 81 | RTEMS.EVENT_4, |
---|
| 82 | RTEMS.EVENT_5, |
---|
| 83 | RTEMS.EVENT_6, |
---|
| 84 | RTEMS.EVENT_7, |
---|
| 85 | RTEMS.EVENT_8, |
---|
| 86 | RTEMS.EVENT_9, |
---|
| 87 | RTEMS.EVENT_10, |
---|
| 88 | RTEMS.EVENT_11, |
---|
| 89 | RTEMS.EVENT_12, |
---|
| 90 | RTEMS.EVENT_13, |
---|
| 91 | RTEMS.EVENT_14, |
---|
| 92 | RTEMS.EVENT_15, |
---|
| 93 | RTEMS.EVENT_16, |
---|
| 94 | RTEMS.EVENT_17, |
---|
| 95 | RTEMS.EVENT_18, |
---|
| 96 | RTEMS.EVENT_19, |
---|
| 97 | RTEMS.EVENT_20, |
---|
| 98 | RTEMS.EVENT_21, |
---|
| 99 | RTEMS.EVENT_22, |
---|
| 100 | RTEMS.EVENT_23, |
---|
| 101 | RTEMS.EVENT_24, |
---|
| 102 | RTEMS.EVENT_25, |
---|
| 103 | RTEMS.EVENT_26, |
---|
| 104 | RTEMS.EVENT_27, |
---|
| 105 | RTEMS.EVENT_28, |
---|
| 106 | RTEMS.EVENT_29, |
---|
| 107 | RTEMS.EVENT_30 |
---|
| 108 | ); |
---|
| 109 | |
---|
| 110 | -- |
---|
| 111 | -- INIT |
---|
| 112 | -- |
---|
| 113 | -- DESCRIPTION: |
---|
| 114 | -- |
---|
| 115 | -- This RTEMS task initializes the application. |
---|
| 116 | -- |
---|
| 117 | |
---|
| 118 | procedure INIT ( |
---|
| 119 | ARGUMENT : in RTEMS.TASK_ARGUMENT |
---|
| 120 | ); |
---|
| 121 | |
---|
| 122 | -- |
---|
| 123 | -- STOP_TEST_TSR |
---|
| 124 | -- |
---|
| 125 | -- DESCRIPTION: |
---|
| 126 | -- |
---|
| 127 | -- This subprogram is a TSR which sets the "stop test" flag. |
---|
| 128 | -- |
---|
| 129 | |
---|
| 130 | procedure STOP_TEST_TSR ( |
---|
| 131 | IGNORED1 : in RTEMS.ID; |
---|
| 132 | IGNORED2 : in RTEMS.ADDRESS |
---|
| 133 | ); |
---|
| 134 | |
---|
| 135 | -- |
---|
| 136 | -- TEST_TASK |
---|
| 137 | -- |
---|
| 138 | -- DESCRIPTION: |
---|
| 139 | -- |
---|
| 140 | -- This is the body of the RTEMS tasks which constitute this test. |
---|
| 141 | -- |
---|
| 142 | |
---|
| 143 | procedure TEST_TASK ( |
---|
| 144 | ARGUMENT : in RTEMS.TASK_ARGUMENT |
---|
| 145 | ); |
---|
| 146 | |
---|
| 147 | -- |
---|
| 148 | -- This is the Driver Address Table for this test. |
---|
| 149 | -- |
---|
| 150 | |
---|
| 151 | DEVICE_DRIVERS : aliased RTEMS.DRIVER_ADDRESS_TABLE( 1 .. 1 ) := |
---|
| 152 | (1=> |
---|
| 153 | ( |
---|
| 154 | CLOCK_DRIVER.INITIALIZE'ACCESS, -- Initialization |
---|
| 155 | RTEMS.NO_DRIVER_ENTRY, -- Open |
---|
| 156 | RTEMS.NO_DRIVER_ENTRY, -- Close |
---|
| 157 | RTEMS.NO_DRIVER_ENTRY, -- Read |
---|
| 158 | RTEMS.NO_DRIVER_ENTRY, -- Write |
---|
| 159 | RTEMS.NO_DRIVER_ENTRY -- Control |
---|
| 160 | ) |
---|
| 161 | ); |
---|
| 162 | |
---|
| 163 | -- |
---|
| 164 | -- This is the Initialization Tasks Table for this test. |
---|
| 165 | -- |
---|
| 166 | |
---|
| 167 | INITIALIZATION_TASKS : aliased RTEMS.INITIALIZATION_TASKS_TABLE( 1 .. 1 ) := |
---|
| 168 | (1=> |
---|
| 169 | ( |
---|
| 170 | RTEMS.BUILD_NAME( 'U', 'I', '1', ' ' ), -- task name |
---|
| 171 | 2048, -- stack size |
---|
| 172 | 1, -- priority |
---|
| 173 | RTEMS.DEFAULT_ATTRIBUTES, -- attributes |
---|
| 174 | MPTEST.INIT'ACCESS, -- entry point |
---|
| 175 | RTEMS.NO_PREEMPT, -- initial mode |
---|
| 176 | 0 -- argument list |
---|
| 177 | ) |
---|
| 178 | ); |
---|
| 179 | |
---|
| 180 | ---------------------------------------------------------------------------- |
---|
| 181 | ---------------------------------------------------------------------------- |
---|
| 182 | -- BEGIN SUBPACKAGE -- |
---|
| 183 | ---------------------------------------------------------------------------- |
---|
| 184 | ---------------------------------------------------------------------------- |
---|
| 185 | |
---|
| 186 | -- |
---|
| 187 | -- MPTEST.PER_NODE_CONFIGURATION / SPECIFICATION |
---|
| 188 | -- |
---|
| 189 | -- DESCRIPTION: |
---|
| 190 | -- |
---|
| 191 | -- This package is the specification for the subpackage |
---|
| 192 | -- which will define the per node configuration parameters. |
---|
| 193 | -- |
---|
| 194 | |
---|
| 195 | package PER_NODE_CONFIGURATION is |
---|
| 196 | |
---|
| 197 | -- |
---|
| 198 | -- LOCAL_NODE_NUMBER |
---|
| 199 | -- |
---|
| 200 | -- DESCRIPTION: |
---|
| 201 | -- |
---|
| 202 | -- This function returns the node number for this node. |
---|
| 203 | -- |
---|
| 204 | |
---|
| 205 | function LOCAL_NODE_NUMBER |
---|
| 206 | return RTEMS.UNSIGNED32; |
---|
| 207 | |
---|
| 208 | pragma INLINE ( LOCAL_NODE_NUMBER ); |
---|
| 209 | |
---|
| 210 | end PER_NODE_CONFIGURATION; |
---|
| 211 | |
---|
| 212 | ---------------------------------------------------------------------------- |
---|
| 213 | ---------------------------------------------------------------------------- |
---|
| 214 | -- END SUBPACKAGE -- |
---|
| 215 | ---------------------------------------------------------------------------- |
---|
| 216 | ---------------------------------------------------------------------------- |
---|
| 217 | |
---|
| 218 | -- |
---|
| 219 | -- This is the Multiprocessor Configuration Table for this test. |
---|
| 220 | -- |
---|
| 221 | |
---|
| 222 | MULTIPROCESSING_CONFIGURATION : aliased RTEMS.MULTIPROCESSING_TABLE := ( |
---|
| 223 | MPTEST.PER_NODE_CONFIGURATION.LOCAL_NODE_NUMBER, |
---|
| 224 | 2, -- maximum # nodes in system |
---|
| 225 | 32, -- maximum # global objects |
---|
| 226 | 32 -- maximum # proxies |
---|
| 227 | ); |
---|
| 228 | |
---|
| 229 | -- |
---|
| 230 | -- This is the Configuration Table for this test. |
---|
| 231 | -- |
---|
| 232 | |
---|
| 233 | CONFIGURATION : aliased RTEMS.CONFIGURATION_TABLE := ( |
---|
| 234 | RTEMS.NULL_ADDRESS, -- will be replaced by BSP |
---|
| 235 | 64 * 1024, -- executive RAM size |
---|
| 236 | 10, -- maximum # tasks |
---|
| 237 | 1, -- maximum # timers |
---|
| 238 | 2, -- maximum # semaphores |
---|
| 239 | 0, -- maximum # message queues |
---|
| 240 | 0, -- maximum # messages |
---|
| 241 | 0, -- maximum # partitions |
---|
| 242 | 0, -- maximum # regions |
---|
| 243 | 0, -- maximum # dp memory areas |
---|
| 244 | 0, -- maximum # periods |
---|
| 245 | 0, -- maximum # user extensions |
---|
| 246 | RTEMS.MILLISECONDS_TO_MICROSECONDS(10), -- # us in a tick |
---|
| 247 | 50 -- # ticks in a timeslice |
---|
| 248 | ); |
---|
| 249 | |
---|
| 250 | end MPTEST; |
---|