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 | -- |
---|
13 | -- COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. |
---|
14 | -- On-Line Applications Research Corporation (OAR). |
---|
15 | -- All rights assigned to U.S. Government, 1994. |
---|
16 | -- |
---|
17 | -- This material may be reproduced by or for the U.S. Government pursuant |
---|
18 | -- to the copyright license under the clause at DFARS 252.227-7013. This |
---|
19 | -- notice must appear in all copies of this file and its derivatives. |
---|
20 | -- |
---|
21 | -- tmtest.ads,v 1.3 1995/07/12 19:44:30 joel Exp |
---|
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 | -- |
---|
132 | -- This is the Initialization Tasks Table for this test. |
---|
133 | -- |
---|
134 | |
---|
135 | INITIALIZATION_TASKS : aliased RTEMS.INITIALIZATION_TASKS_TABLE( 1 .. 1 ) := |
---|
136 | (1=> |
---|
137 | ( |
---|
138 | RTEMS.BUILD_NAME( 'U', 'I', '1', ' ' ), -- task name |
---|
139 | 2048, -- stack size |
---|
140 | 1, -- priority |
---|
141 | RTEMS.DEFAULT_ATTRIBUTES, -- attributes |
---|
142 | TMTEST.INIT'ACCESS, -- entry point |
---|
143 | RTEMS.NO_PREEMPT, -- initial mode |
---|
144 | 0 -- argument list |
---|
145 | ) |
---|
146 | ); |
---|
147 | |
---|
148 | -- |
---|
149 | -- This is the Configuration Table for this test. |
---|
150 | -- |
---|
151 | |
---|
152 | CONFIGURATION : aliased RTEMS.CONFIGURATION_TABLE := ( |
---|
153 | RTEMS.NULL_ADDRESS, -- will be replaced by BSP |
---|
154 | 256 * 1024, -- executive RAM size |
---|
155 | 111, -- maximum # tasks |
---|
156 | 0, -- maximum # timers |
---|
157 | 1, -- maximum # semaphores |
---|
158 | 0, -- maximum # message queues |
---|
159 | 0, -- maximum # messages |
---|
160 | 0, -- maximum # partitions |
---|
161 | 0, -- maximum # regions |
---|
162 | 0, -- maximum # dp memory areas |
---|
163 | 0, -- maximum # periods |
---|
164 | 0, -- maximum # user extensions |
---|
165 | RTEMS.MILLISECONDS_TO_MICROSECONDS(10), -- # us in a tick |
---|
166 | 0 -- # ticks in a timeslice |
---|
167 | ); |
---|
168 | |
---|
169 | end TMTEST; |
---|