[6d4e604b] | 1 | -- |
---|
| 2 | -- TMTEST / SPECIFICATION |
---|
| 3 | -- |
---|
| 4 | -- DESCRIPTION: |
---|
| 5 | -- |
---|
| 6 | -- This package is the specification for Test 27 of the RTEMS |
---|
| 7 | -- Timing 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 TIMER_DRIVER; |
---|
| 25 | with RTEMS; |
---|
| 26 | |
---|
| 27 | package TMTEST is |
---|
| 28 | |
---|
| 29 | -- |
---|
| 30 | -- This array contains the IDs of all RTEMS tasks created by this test. |
---|
| 31 | -- |
---|
| 32 | |
---|
| 33 | TASK_ID : array ( RTEMS.UNSIGNED32 range 1 .. 2 ) of RTEMS.ID; |
---|
| 34 | |
---|
| 35 | -- |
---|
| 36 | -- The following variable is set to the execution time returned |
---|
| 37 | -- by the timer. |
---|
| 38 | -- |
---|
| 39 | |
---|
| 40 | END_TIME : RTEMS.UNSIGNED32; |
---|
| 41 | |
---|
| 42 | -- |
---|
| 43 | -- The following variable indicates which interrupt case is |
---|
| 44 | -- currently being timed. |
---|
| 45 | -- |
---|
| 46 | |
---|
| 47 | INTERRUPT_NEST : RTEMS.UNSIGNED32; |
---|
| 48 | |
---|
| 49 | -- |
---|
| 50 | -- The following variables are set to the appropriate execution |
---|
| 51 | -- times by the ISR. This is done so the times will be available |
---|
| 52 | -- to be printed by a task. |
---|
| 53 | -- |
---|
| 54 | |
---|
| 55 | INTERRUPT_ENTER_TIME : RTEMS.UNSIGNED32; |
---|
| 56 | INTERRUPT_RETURN_TIME : RTEMS.UNSIGNED32; |
---|
| 57 | |
---|
| 58 | INTERRUPT_ENTER_NESTED_TIME : RTEMS.UNSIGNED32; |
---|
| 59 | INTERRUPT_RETURN_NESTED_TIME : RTEMS.UNSIGNED32; |
---|
| 60 | |
---|
| 61 | -- |
---|
| 62 | -- INIT |
---|
| 63 | -- |
---|
| 64 | -- DESCRIPTION: |
---|
| 65 | -- |
---|
| 66 | -- This RTEMS task initializes the application. |
---|
| 67 | -- |
---|
| 68 | |
---|
| 69 | procedure INIT ( |
---|
| 70 | ARGUMENT : in RTEMS.TASK_ARGUMENT |
---|
| 71 | ); |
---|
| 72 | |
---|
| 73 | -- |
---|
| 74 | -- TASK_1 |
---|
| 75 | -- |
---|
| 76 | -- DESCRIPTION: |
---|
| 77 | -- |
---|
| 78 | -- This RTEMS task reports the following execution times: |
---|
| 79 | -- |
---|
| 80 | -- + interrupt entry overhead for a nested interrupt |
---|
| 81 | -- + interrupt exit overhead for a nested interrupt |
---|
| 82 | -- + interrupt entry overhead when no preemption occurs |
---|
| 83 | -- + interrupt exit overhead when no preemption occurs |
---|
| 84 | -- |
---|
| 85 | |
---|
| 86 | procedure TASK_1 ( |
---|
| 87 | ARGUMENT : in RTEMS.TASK_ARGUMENT |
---|
| 88 | ); |
---|
| 89 | |
---|
| 90 | -- |
---|
| 91 | -- TASK_2 |
---|
| 92 | -- |
---|
| 93 | -- DESCRIPTION: |
---|
| 94 | -- |
---|
| 95 | -- This RTEMS task reports the following execution times: |
---|
| 96 | -- |
---|
| 97 | -- + interrupt entry overhead when preemption occurs |
---|
| 98 | -- + interrupt exit overhead when preemption occurs |
---|
| 99 | -- |
---|
| 100 | |
---|
| 101 | procedure TASK_2 ( |
---|
| 102 | ARGUMENT : in RTEMS.TASK_ARGUMENT |
---|
| 103 | ); |
---|
| 104 | |
---|
| 105 | -- |
---|
| 106 | -- ISR_HANDLER |
---|
| 107 | -- |
---|
| 108 | -- DESCRIPTION: |
---|
| 109 | -- |
---|
| 110 | -- This subprogram is the test ISR. It simply stops the |
---|
| 111 | -- timer and save the execution time for ISR_HANDLER_INNER. |
---|
| 112 | -- This is done to minimize the subroutine linkage overhead |
---|
| 113 | -- for this routine. |
---|
| 114 | -- |
---|
| 115 | |
---|
| 116 | procedure ISR_HANDLER ( |
---|
| 117 | VECTOR : in RTEMS.VECTOR_NUMBER |
---|
| 118 | ); |
---|
| 119 | |
---|
| 120 | -- |
---|
| 121 | -- ISR_HANDLER_INNER |
---|
| 122 | -- |
---|
| 123 | -- DESCRIPTION: |
---|
| 124 | -- |
---|
| 125 | -- This subprogram is responsible for storing the execution |
---|
| 126 | -- time for the case currently being timed. |
---|
| 127 | -- |
---|
| 128 | |
---|
| 129 | procedure ISR_HANDLER_INNER; |
---|
| 130 | |
---|
| 131 | end TMTEST; |
---|