test.aadl.out 9 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305







property set ARINC653 is
  Partition_Slots : list of Time
    applies to (processor);

  Slots_Allocation : list of reference (
virtual processor)
    applies to (processor);

  Module_Major_Frame : Time
    applies to (processor);

  Sampling_Refresh_Period : Time
    applies to (data port);

  Supported_Error_Code : type enumeration (Module_Config, Module_Init, Module_Scheduling, Partition_Scheduling, Partition_Config, Partition_Handler, Partition_Init, Deadline_Miss, Application_Error, Numeric_Error, Illegal_Request, Stack_Overflow, Memory_Violation, Hardware_Fault, Power_Fail);

  Supported_Partition_Recovery_Action : type enumeration (Ignore, Partition_Stop, Warm_Restart, Cold_Restart);

  Supported_Process_Recovery_Action : type enumeration (Ignore, Confirm, Partition_Stop, Process_Stop, Process_Stop_And_Start_Another, Process_Restart, Nothing, Cold_Restart, Warm_Restart);

  Supported_Module_Recovery_Action : type enumeration (Ignore, Stop, Reset);

  HM_Module_Recovery_Actions : list of ARINC653::Supported_Module_Recovery_Action
    applies to (processor);

  HM_Partition_Recovery_Actions : list of ARINC653::Supported_Partition_Recovery_Action
    applies to (virtual processor);

  HM_Process_Recovery_Actions : list of ARINC653::Supported_Process_Recovery_Action
    applies to (thread);

  Supported_Access_Type : type enumeration (read, write, read_write);

  Supported_Memory_Type : type enumeration (Data_Memory, Code_Memory, IO_Memory);

  HM_Errors : list of ARINC653::Supported_Error_Code
    applies to (processor, virtual processor, thread);

  HM_Callback : classifier (
subprogram classifier)
    applies to (thread, virtual processor, processor);

  Memory_Type : list of ARINC653::Supported_Memory_Type
    applies to (memory);

  Access_Type : ARINC653::Supported_Access_Type
    applies to (memory);

  Timeout : Time
    applies to (data port, event data port, event port, component access);

  Supported_DAL_Type : type enumeration (LEVEL_A, LEVEL_B, LEVEL_C, LEVEL_D, LEVEL_E);

  DAL : ARINC653::Supported_DAL_Type
    applies to (virtual processor);

  System_Overhead_Time : Time
    applies to (processor, virtual processor);

end ARINC653;

package PartitionedSystemExample
public
  with ARINC653;

  data integer
  end integer;

  data ordercmd
  end ordercmd;

  data protected_data
  properties
    Concurrency_Control_Protocol => Protected_Access;

  end protected_data;

  virtual processor partition1_rt
  properties
    Scheduling_Protocol => (EARLIEST_DEADLINE_FIRST_PROTOCOL);

  end partition1_rt;

  virtual processor implementation partition1_rt.impl
  end partition1_rt.impl;

  virtual processor partition2_rt
  properties
    Scheduling_Protocol => (RATE_MONOTONIC_PROTOCOL);

  end partition2_rt;

  virtual processor implementation partition2_rt.impl
  end partition2_rt.impl;

  subprogram sensor_temperature_spg
  end sensor_temperature_spg;

  subprogram sensor_receiveinput_spg
  end sensor_receiveinput_spg;

  subprogram commandboard_receiveinput_spg
  end commandboard_receiveinput_spg;

  subprogram commandboard_printinfos_spg
  end commandboard_printinfos_spg;

  thread sensor_temperature_thread
  features
    tempout : out data port integer;
    order : in event data port ordercmd;

  properties
    Initialize_Entrypoint => classifier (PartitionedSystemExample::sensor_temperature_spg);
    Priority => 42;
    Source_Stack_Size => 100 Kbyte;
    Period => 20 ms;
    Compute_Execution_Time => 10 ms .. 12 ms;
    Deadline => 40 ms;
    ARINC653::HM_Errors => (Deadline_Miss, Application_Error, Numeric_Error, Illegal_Request);
    ARINC653::HM_Process_Recovery_Actions => (Process_Stop, Process_Stop, Ignore, Ignore);

  end sensor_temperature_thread;

  thread implementation sensor_temperature_thread.impl
  end sensor_temperature_thread.impl;

  thread sensor_receiveinput_thread
  features
    commandin : in event data port integer;
    order : out event data port ordercmd;

  properties
    Initialize_Entrypoint => classifier (PartitionedSystemExample::sensor_receiveinput_spg);
    Priority => 10;
    Source_Stack_Size => 100 Kbyte;
    Period => 20 ms;
    Compute_Execution_Time => 8 ms .. 10 ms;
    Deadline => 40 ms;
    ARINC653::HM_Errors => (Deadline_Miss, Application_Error, Numeric_Error, Illegal_Request);
    ARINC653::HM_Process_Recovery_Actions => (Process_Stop, Process_Stop, Process_Stop, Process_Stop);

  end sensor_receiveinput_thread;

  thread implementation sensor_receiveinput_thread.impl
  end sensor_receiveinput_thread.impl;

  thread commandboard_receiveinput_thread
  features
    temp : in data port integer;
    tempavg : requires data access integer;
    newavg : out event port;
    need_semaphore : requires data access protected_data;

  properties
    Initialize_Entrypoint => classifier (PartitionedSystemExample::commandboard_receiveinput_spg);
    Priority => 42;
    Source_Stack_Size => 100 Kbyte;
    Period => 20 ms;
    Compute_Execution_Time => 5 ms .. 7 ms;
    Deadline => 40 ms;
    ARINC653::HM_Errors => (Deadline_Miss, Application_Error, Numeric_Error, Illegal_Request);
    ARINC653::HM_Process_Recovery_Actions => (Process_Stop, Process_Stop, Process_Stop, Process_Stop);

  end commandboard_receiveinput_thread;

  thread commandboard_printinfos_thread
  features
    ordersensor : out event data port integer;
    tempavg : requires data access integer;
    newavg : in event port;
    need_semaphore : requires data access protected_data;

  properties
    Initialize_Entrypoint => classifier (PartitionedSystemExample::commandboard_printinfos_spg);
    Priority => 43;
    Source_Stack_Size => 100 Kbyte;
    Period => 20 ms;
    Compute_Execution_Time => 2 ms .. 6 ms;
    Deadline => 40 ms;
    ARINC653::HM_Errors => (Deadline_Miss, Application_Error, Numeric_Error, Illegal_Request);
    ARINC653::HM_Process_Recovery_Actions => (Process_Stop, Process_Stop, Process_Stop, Process_Stop);

  end commandboard_printinfos_thread;

  process partition1_process
  features
    queueingin : in event data port integer
      {Queue_Size => 4;};
    samplingout : out data port integer;

  end partition1_process;

  process implementation partition1_process.impl
  subcomponents
    temperature : thread sensor_temperature_thread.impl;
    order : thread sensor_receiveinput_thread.impl;

  connections
    bufferconnectionexample : port order.order -> temperature.order;
    port queueingin -> order.commandin;
    port temperature.tempout -> samplingout;

  end partition1_process.impl;

  process partition2_process
  features
    queueingout : out event data port integer;
    samplingin : in data port integer
      {ARINC653::Sampling_Refresh_Period => 10 ms;};

  end partition2_process;

  process implementation partition2_process.impl
  subcomponents
    receiver : thread commandboard_receiveinput_thread;
    printer : thread commandboard_printinfos_thread;
    sem : data protected_data;
    blackboard : data integer;

  connections
    blackboardconnection1 : data access blackboard -> printer.tempavg;
    blackboardconnection2 : data access blackboard -> receiver.tempavg;
    eventconnectionexample : port receiver.newavg -> printer.newavg;
    port printer.ordersensor -> queueingout;
    port samplingin -> receiver.temp;
    data access sem -> receiver.need_semaphore;
    data access sem -> printer.need_semaphore;

  end partition2_process.impl;

  processor powerpc
  end powerpc;

  processor implementation powerpc.impl
  subcomponents
    part1 : virtual processor partition1_rt.impl;
    part2 : virtual processor partition2_rt.impl;

  properties
    ARINC653::Module_Major_Frame => 50 ms;
    ARINC653::Partition_Slots => (10 ms, 10 ms, 30 ms);
    ARINC653::Slots_Allocation => (reference ( part1 ), reference ( part2 ), reference ( part1 ));
    ARINC653::HM_Errors => (Power_Fail);
    ARINC653::HM_Module_Recovery_Actions => (Reset);

  end powerpc.impl;

  memory partition1_memory
  properties
    Base_Address => 0;

  end partition1_memory;

  memory partition2_memory
  properties
    Base_Address => 100;

  end partition2_memory;

  memory main_memory
  end main_memory;

  memory implementation main_memory.impl
  subcomponents
    part1mem : memory partition1_memory;
    part2mem : memory partition2_memory;

  end main_memory.impl;

  system arincsystem
  end arincsystem;

  system implementation arincsystem.impl
  subcomponents
    mem : memory main_memory.impl;
    cpu : processor powerpc.impl;
    partition1_pr : process partition1_process.impl;
    partition2_pr : process partition2_process.impl;

  connections
    samplingconnection : port partition1_pr.samplingout -> partition2_pr.samplingin;
    queueingconnection : port partition2_pr.queueingout -> partition1_pr.queueingin;

  properties
    Actual_Processor_Binding => (reference ( cpu.part1 ))
      applies to partition1_pr;
    Actual_Processor_Binding => (reference ( cpu.part2 ))
      applies to partition2_pr;
    Actual_Memory_Binding => (reference ( mem.part1mem ))
      applies to partition1_pr;
    Actual_Memory_Binding => (reference ( mem.part2mem ))
      applies to partition2_pr;

  end arincsystem.impl;

end PartitionedSystemExample;