source: rtems/c/src/ada-tests/mptests/mp07/mptest.ads @ 6d4e604b

4.104.114.84.95
Last change on this file since 6d4e604b was 6d4e604b, checked in by Joel Sherrill <joel.sherrill@…>, on 06/02/97 at 20:19:03

Initial revision

  • Property mode set to 100644
File size: 5.9 KB
Line 
1--
2--  MPTEST / SPECIFICATION
3--
4--  DESCRIPTION:
5--
6--  This package is the specification for Test 7 of the RTEMS
7--  Multiprocessor 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--  mptest.ads,v 1.3 1995/07/12 19:39:23 joel Exp
22--
23
24with CLOCK_DRIVER;
25with BSP_MPCI;
26with RTEMS;
27
28package MPTEST is
29
30--
31--  These arrays contain the IDs and NAMEs of all RTEMS tasks created
32--  by this test.
33--
34
35   TASK_ID   : array ( RTEMS.UNSIGNED32 range 1 .. 3 ) of RTEMS.ID;
36   TASK_NAME : array ( RTEMS.UNSIGNED32 range 1 .. 3 ) of RTEMS.NAME;
37
38--
39--  These arrays contain the IDs and NAMEs of all RTEMS timers created
40--  by this test.
41--
42
43   TIMER_ID   : array ( RTEMS.UNSIGNED32 range 1 .. 2 ) of RTEMS.ID;
44   TIMER_NAME : array ( RTEMS.UNSIGNED32 range 1 .. 2 ) of RTEMS.NAME;
45
46--
47--  This variable is set when the test should stop executing.
48--
49   STOP_TEST : RTEMS.BOOLEAN;
50
51--
52--  This variable contains the ID of the remote task with which this
53--  test interacts.
54--
55
56   REMOTE_TID  : RTEMS.ID;
57
58--
59--  This variable contains the node on which the remote task with which
60--  this test interacts resides.
61--
62
63   REMOTE_NODE : RTEMS.UNSIGNED32;
64
65--
66--  The number of events to process per dot printed out.
67--
68
69   PER_DOT : constant RTEMS.UNSIGNED32 := 100;
70
71--
72--  INIT
73--
74--  DESCRIPTION:
75--
76--  This RTEMS task initializes the application.
77--
78
79   procedure INIT (
80      ARGUMENT : in     RTEMS.TASK_ARGUMENT
81   );
82
83--
84--  STOP_TEST_TSR
85--
86--  DESCRIPTION:
87--
88--  This subprogram is a TSR which sets the "stop test" flag.
89--
90 
91   procedure STOP_TEST_TSR (
92      IGNORED1 : in     RTEMS.ID;
93      IGNORED2 : in     RTEMS.ADDRESS
94   );
95
96--
97--  TEST_TASK
98--
99--  DESCRIPTION:
100--
101--  This is the body of the RTEMS tasks which constitute this test.
102--
103
104   procedure TEST_TASK (
105      ARGUMENT : in     RTEMS.TASK_ARGUMENT
106   );
107
108--
109--  This is the Driver Address Table for this test.
110--
111
112   DEVICE_DRIVERS : aliased RTEMS.DRIVER_ADDRESS_TABLE( 1 .. 1 ) :=
113   (1=>
114      (
115        CLOCK_DRIVER.INITIALIZE'ACCESS,              -- Initialization
116        RTEMS.NO_DRIVER_ENTRY,                       -- Open
117        RTEMS.NO_DRIVER_ENTRY,                       -- Close
118        RTEMS.NO_DRIVER_ENTRY,                       -- Read
119        RTEMS.NO_DRIVER_ENTRY,                       -- Write
120        RTEMS.NO_DRIVER_ENTRY                        -- Control
121      )
122   );
123
124--
125--  This is the Initialization Tasks Table for this test.
126--
127
128   INITIALIZATION_TASKS : aliased RTEMS.INITIALIZATION_TASKS_TABLE( 1 .. 1 ) :=
129   (1=>
130     (
131       RTEMS.BUILD_NAME( 'U', 'I', '1', ' ' ),        -- task name
132       2048,                                          -- stack size
133       1,                                             -- priority
134       RTEMS.DEFAULT_ATTRIBUTES,                      -- attributes
135       MPTEST.INIT'ACCESS,                            -- entry point
136       RTEMS.NO_PREEMPT,                              -- initial mode
137       0                                              -- argument list
138     )
139   );
140
141----------------------------------------------------------------------------
142----------------------------------------------------------------------------
143--                             BEGIN SUBPACKAGE                           --
144----------------------------------------------------------------------------
145----------------------------------------------------------------------------
146
147   --
148   --  MPTEST.PER_NODE_CONFIGURATION / SPECIFICATION
149   --
150   --  DESCRIPTION:
151   --
152   --  This package is the specification for the subpackage
153   --  which will define the per node configuration parameters.
154   --
155   
156   package PER_NODE_CONFIGURATION is
157
158   --
159   --  LOCAL_NODE_NUMBER
160   --
161   --  DESCRIPTION:
162   --
163   --  This function returns the node number for this node.
164   --
165
166      function LOCAL_NODE_NUMBER
167      return RTEMS.UNSIGNED32;
168 
169      pragma INLINE ( LOCAL_NODE_NUMBER );
170
171   end PER_NODE_CONFIGURATION;
172 
173----------------------------------------------------------------------------
174----------------------------------------------------------------------------
175--                              END SUBPACKAGE                            --
176----------------------------------------------------------------------------
177----------------------------------------------------------------------------
178
179--
180--  This is the Multiprocessor Configuration Table for this test.
181--
182
183   MULTIPROCESSING_CONFIGURATION : aliased RTEMS.MULTIPROCESSING_TABLE := (
184      MPTEST.PER_NODE_CONFIGURATION.LOCAL_NODE_NUMBER,
185      2,                         -- maximum # nodes in system
186      32,                        -- maximum # global objects
187      32                         -- maximum # proxies
188    );
189
190--
191--  This is the Configuration Table for this test.
192--
193
194   CONFIGURATION : aliased RTEMS.CONFIGURATION_TABLE := (
195      RTEMS.NULL_ADDRESS,        -- will be replaced by BSP
196      64 * 1024,                 -- executive RAM size
197      10,                        -- maximum # tasks
198      1,                         -- maximum # timers
199      2,                         -- maximum # semaphores
200      0,                         -- maximum # message queues
201      0,                         -- maximum # messages
202      0,                         -- maximum # partitions
203      0,                         -- maximum # regions
204      0,                         -- maximum # dp memory areas
205      0,                         -- maximum # periods
206      0,                         -- maximum # user extensions
207      RTEMS.MILLISECONDS_TO_MICROSECONDS(10), -- # us in a tick
208      50                         -- # ticks in a timeslice
209  );
210
211end MPTEST;
Note: See TracBrowser for help on using the repository browser.