1 | -- |
---|
2 | -- TMTEST / SPECIFICATION |
---|
3 | -- |
---|
4 | -- DESCRIPTION: |
---|
5 | -- |
---|
6 | -- This package is the specification for Timer Check Test of the RTEMS |
---|
7 | -- Timing Test Suite. |
---|
8 | -- |
---|
9 | -- DEPENDENCIES: |
---|
10 | -- |
---|
11 | -- |
---|
12 | -- |
---|
13 | -- COPYRIGHT (c) 1989-2011. |
---|
14 | -- On-Line Applications Research Corporation (OAR). |
---|
15 | -- |
---|
16 | -- The license and distribution terms for this file may in |
---|
17 | -- the file LICENSE in this distribution or at |
---|
18 | -- http://www.rtems.org/license/LICENSE. |
---|
19 | -- |
---|
20 | |
---|
21 | with RTEMS; |
---|
22 | with RTEMS.TASKS; |
---|
23 | |
---|
24 | package TMTEST is |
---|
25 | |
---|
26 | -- |
---|
27 | -- These arrays contain the IDs and NAMEs of all RTEMS tasks created |
---|
28 | -- by this test. |
---|
29 | -- |
---|
30 | |
---|
31 | TASK_ID : array ( RTEMS.UNSIGNED32 range 1 .. 3 ) of RTEMS.ID; |
---|
32 | TASK_NAME : array ( RTEMS.UNSIGNED32 range 1 .. 3 ) of RTEMS.NAME; |
---|
33 | |
---|
34 | -- |
---|
35 | -- The following variable is set to the execution time returned |
---|
36 | -- by the timer. |
---|
37 | -- |
---|
38 | |
---|
39 | END_TIME : RTEMS.UNSIGNED32; |
---|
40 | |
---|
41 | -- |
---|
42 | -- The following defines the number of iterations of each timed |
---|
43 | -- operation to perform. |
---|
44 | -- |
---|
45 | |
---|
46 | OPERATION_COUNT : constant RTEMS.UNSIGNED32 := 100000; |
---|
47 | |
---|
48 | -- |
---|
49 | -- The following array is used to determine how many times |
---|
50 | -- each time between 0 and 1000 microseconds was returned |
---|
51 | -- when simply starting and stopping the timer. |
---|
52 | |
---|
53 | DISTRIBUTION : array ( RTEMS.UNSIGNED32 range 0 .. 10000 ) of RTEMS.UNSIGNED32; |
---|
54 | |
---|
55 | -- |
---|
56 | -- INIT |
---|
57 | -- |
---|
58 | -- DESCRIPTION: |
---|
59 | -- |
---|
60 | -- This RTEMS task initializes the application. |
---|
61 | -- |
---|
62 | |
---|
63 | procedure INIT ( |
---|
64 | ARGUMENT : in RTEMS.TASKS.ARGUMENT |
---|
65 | ); |
---|
66 | pragma Convention (C, INIT); |
---|
67 | |
---|
68 | -- |
---|
69 | -- TASK_1 |
---|
70 | -- |
---|
71 | -- DESCRIPTION: |
---|
72 | -- |
---|
73 | -- This RTEMS task invokes CHECK_READ_TIMER before demonstrating |
---|
74 | -- that increasing the order of magnitude of the number of loop |
---|
75 | -- iterations performed has a corresponding impact on the time |
---|
76 | -- reported by the timer driver. |
---|
77 | -- |
---|
78 | |
---|
79 | procedure TASK_1 ( |
---|
80 | ARGUMENT : in RTEMS.TASKS.ARGUMENT |
---|
81 | ); |
---|
82 | pragma Convention (C, TASK_1); |
---|
83 | |
---|
84 | -- |
---|
85 | -- CHECK_READ_TIMER |
---|
86 | -- |
---|
87 | -- DESCRIPTION: |
---|
88 | -- |
---|
89 | -- This subprogram is used to determine the overhead associated |
---|
90 | -- with starting and stopping the timer. It is also useful |
---|
91 | -- for determining if unexpected times will be reported. |
---|
92 | -- |
---|
93 | |
---|
94 | procedure CHECK_READ_TIMER; |
---|
95 | |
---|
96 | end TMTEST; |
---|