source: rtems/c/src/ada-tests/tmtests/tm27/tmtest.ads @ cf1ced66

4.104.114.84.95
Last change on this file since cf1ced66 was bf9ae83, checked in by Joel Sherrill <joel.sherrill@…>, on Jun 2, 1997 at 8:32:11 PM

modified copyright notice to be the same as RTEMS 4.0.0.

changed the CVS ID string to be a "development" version.

  • Property mode set to 100644
File size: 4.2 KB
Line 
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-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
24with TIMER_DRIVER;
25with RTEMS;
26
27package 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
169end TMTEST;
Note: See TracBrowser for help on using the repository browser.