system.tmplt 6.86 KB
Newer Older
1
2
@@-- The following tags are available in this template:
@@--
3
4
5
6
@@-- @_Nodes_@               : Code generated for the nodes
@@-- @_Node_Names_@          : Vector Tag of node names
@@-- @_Node_CPU_@            :  |_ Corresponding CPU name (eg x86_linux)
@@-- @_Node_CPU_Classifier_@ :  |_ CPU Classifier (ocarina...::x86_linux)
Maxime Perrotin's avatar
Maxime Perrotin committed
7
@@-- @_Node_Major_Frame_@    :  |_ Time in milliseconds allocated to the CPU (TSP only)
8
9
10
@@-- @_Partition_Names_@     : Vector Tag of partition names
@@-- @_Partition_Node_@      :  |_ Corresponding node name
@@-- @_Partition_CPU_@       :  |_ Corresponding CPU name
Maxime Perrotin's avatar
Maxime Perrotin committed
11
@@-- @_Partition_Duration_@  :  |_ Corresponding time allocation (TSP only)
Maxime Perrotin's avatar
Maxime Perrotin committed
12
@@-- @_Partition_VP_@        :  |_ Virtual processor binding (TSP only)
13
@@-- @_Threads_@             : Code generated for the threads
14
15
@@-- @_Thread_Names_@        : List of all threads in the complete system
@@-- @_Target_Packages_@     : List of all target package names in the complete system
16
17
18
@@-- @_Part_Source_Name_@    : Inter-partition connections : partition source name (vector tag)
@@-- @_Part_Source_Port_@    :   |_ Corresponding port name
@@-- @_Part_Dest_Name_@      :   |_ Corresponding name of the remote partition
19
@@-- @_Part_Dest_Port_@      :   |_ Corresponding name of the port on the remote partition
20
21
22
23
24
@@-- @_Bus_Names_@           : Vector tag: busses present in the system
@@-- @_Bus_AADL_Package_@    :   |_ corresponding AADL Package
@@-- @_Bus_Classifier_@      :   |_ corresponding AADL classifier
@@-- @_Device_Names_@
@@-- @_Device_Node_Name_@
25
@@-- @_Device_Partition_@    -- Partition name associated to the driver (currently only one supported per node)
26
27
28
29
30
31
32
33
34
@@-- @_Device_AADL_Pkg_@
@@-- @_Device_Classifier_@
@@-- @_Device_CPU_@
@@-- @_Device_Config_@
@@-- @_Device_Bus_Name_@
@@-- @_Device_Port_Name_@
@@-- @_Device_ASN1_File_@
@@-- @_Device_ASN1_Sort_@
@@-- @_Device_ASN1_Module_@  : Device drivers (vector tag)
Maxime Perrotin's avatar
Maxime Perrotin committed
35
36
37
38
@@-- And all the system configuration obtained from the command line:
@@-- Interface_View, Deployment_View, Data_View, Binary_Path, Check_Data_View,
@@-- Output_Dir, Skeletons, Glue, Use_POHIC, Timer_Resolution, Debug_Flag,
@@-- No_Stdlib_Flag, Timer_Resolution, Other_Files (list of aadl files)
39
40
41

--  Input file for the taste orchestrator: do not edit
--  This file was generated automatically by taste/kazoo
42
43
44
@_Threads_@

package Process_Package
45
public
Maxime Perrotin's avatar
Maxime Perrotin committed
46
   with arinc653;
47
48
49
50
   with Deployment;
   with DataView;
   with interfaceview::IV;
   with deploymentview::DV;
Maxime Perrotin's avatar
Maxime Perrotin committed
51
52
53
54
@@-- Add "with" of the node, this is at least needed for TSP systems
@@TABLE@@
   with deploymentview::DV::@_Node_Names_@;
@@END_TABLE@@
55
56
57
58
59
60
@@TABLE@@
   with @_CAPITALIZE:Thread_Names_@_Thread;
@@END_TABLE@@
@@TABLE@@
   with @_CAPITALIZE:Target_Packages_@;
@@END_TABLE@@
61

62
@@-- POHIC-only: declare protected objects to have runtime mutex
Maxime Perrotin's avatar
Maxime Perrotin committed
63
64
@@IF@@ @_Use_POHIC_@
data TASTE_Protected
65
66
properties
   Concurrency_Control_Protocol => Protected_Access;
Maxime Perrotin's avatar
Maxime Perrotin committed
67
end TASTE_Protected;
68

Maxime Perrotin's avatar
Maxime Perrotin committed
69
data implementation TASTE_Protected.Object
70
71
properties
   Concurrency_Control_Protocol => Protected_Access;
Maxime Perrotin's avatar
Maxime Perrotin committed
72
73
end TASTE_Protected.Object; 
@@END_IF@@
74

Maxime Perrotin's avatar
Maxime Perrotin committed
75
@@IF@@ @_Partition_VP'Length_@ > 0   @@-- AIR : we need a port polling threads
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
--  Required by AIR to allow inter-partition communications
subprogram do_ports_polling
properties
   Source_Language => C;
   Source_Name     => "user_ports_polling";
   Source_Text     => ("air_polling.c");
end do_ports_polling;
thread Port_Poller
end    Port_Poller;

thread implementation Port_Poller.i
calls
   Mycalls: {
      P_Spg : subprogram do_ports_polling;
   };
properties
   Dispatch_Protocol => Periodic;
   Period            => 100 ms;
   Deadline          => 100 ms;
end Port_Poller.i;
@@END_IF@@

98
99
@_Nodes_@

100
101
system DeploymentView
end DeploymentView;
102

103
system implementation DeploymentView.final
104
subcomponents
Maxime Perrotin's avatar
Maxime Perrotin committed
105
@@TABLE'ALIGN_ON(":")@@
Maxime Perrotin's avatar
Maxime Perrotin committed
106
@@-- First declare the partitions
107
108
   @_CAPITALIZE:Partition_Names_@ : process @_CAPITALIZE:Partition_Names_@.final;
@@END_TABLE@@
Maxime Perrotin's avatar
Maxime Perrotin committed
109
@@-- Then the processor boards (they may contain several virtual processors for TSP systems) and optionally memory
Maxime Perrotin's avatar
Maxime Perrotin committed
110
@@TABLE'ALIGN_ON(":")@@
Maxime Perrotin's avatar
Maxime Perrotin committed
111
112
113
114
   @_CAPITALIZE:Node_Names_@_@_Node_CPU_@ : processor @_CAPITALIZE:Node_Names_@_Board.final;
@@IF@@ @_Node_Has_Memory_@
   @_CAPITALIZE:Node_Names_@_Memory : memory deploymentview::DV::@_CAPITALIZE:Node_Names_@::main_memory.others;
@@END_IF@@
115
@@END_TABLE@@
116
117
118
119
120
121
122
123
@@-- Then declare the busses (distributed systems only)
@@TABLE'ALIGN_ON(":")@@
   @_Bus_Names_@ : bus @_Bus_Classifier_@;
@@END_TABLE@@
@@-- Then declare the device drivers (distributes systems only)
@@TABLE'ALIGN_ON(":")@@
   @_Device_Node_Name_@_@_Device_Names_@ : device @_Device_Classifier_@
      {
124
         Source_Text      => ("../DriversConfig/@_Device_Partition_@/DeviceConfig-@_Device_Node_Name_@-@_Device_Names_@.c");
125
126
127
128
         Type_Source_Name => "pohidrv_@_Device_Node_Name_@_@_Device_Names_@";
      };
@@END_TABLE@@
@@-- Specify the connections for distributed and TSP systems
129
130
131
@@IF@@ @_Part_Source_Name'Length_@ > 0
connections
@@TABLE@@
132
   @_Part_Source_Name_@_@_Part_Source_Port_@ : port @_Part_Source_Name_@.OUTPORT_@_Part_Source_Port_@ -> @_Part_Dest_Name_@.INPORT_@_Part_Dest_Port_@;
133
134
@@END_TABLE@@
@@END_IF@@
135
136
137
138
@@-- Specify the bus accesses
@@TABLE'ALIGN_ON("->")@@
   bus access @_Device_Bus_Name_@ -> @_Device_Node_Name_@_@_Device_Names_@.link;
@@END_TABLE@@
139
properties
140
@@-- Specify the bindings of the partitions to (virtual) processors
Maxime Perrotin's avatar
Maxime Perrotin committed
141
142
143
@@TABLE'ALIGN_ON("applies")@@
@@-- Check if this is a TSP system, in which case bind the partitions to the corresponding virtual processor of the node
@@IF@@ @_Partition_VP_@ = ""
144
   Actual_Processor_Binding => (reference (@_CAPITALIZE:Partition_Node_@_@_Partition_CPU_@)) applies to @_CAPITALIZE:Partition_Names_@;
Maxime Perrotin's avatar
Maxime Perrotin committed
145
146
147
148
@@ELSE@@
   Actual_Processor_Binding => (reference (@_CAPITALIZE:Partition_Node_@_@_Partition_CPU_@.@_Partition_VP_@)) applies to @_CAPITALIZE:Partition_Names_@;
   Actual_Memory_Binding    => (reference (@_CAPITALIZE:Partition_Node_@_Memory.@_CAPITALIZE:Partition_Names_@_Segment)) applies to @_CAPITALIZE:Partition_Names_@;
@@END_IF@@
149
@@END_TABLE@@
150
151
152
153
@@-- Specify the bindings of the drivers to processors
@@TABLE'ALIGN_ON("applies")@@
   Actual_Processor_Binding => (reference (@_CAPITALIZE:Device_Node_Name_@_@_Device_CPU_@)) applies to @_Device_Node_Name_@_@_Device_Names_@;
@@END_TABLE@@
Maxime Perrotin's avatar
Maxime Perrotin committed
154
155
156
157
158
159
160
161
162
163
164
@@--  TSP: specify the time allocated to each node and on each partition
@@TABLE'ALIGN_ON("applies")@@
@@IF@@ @_Node_Major_Frame_@ /= ""
   arinc653::module_major_frame => @_Node_Major_Frame_@ ms applies to @_Node_Names_@_@_Node_CPU_@;
@@END_IF@@
@@END_TABLE@@
@@TABLE@@
@@IF@@ @_Node_Major_Frame_@ /= ""
   arinc653::module_schedule => (
@@INLINE(      )(,\n      )()@@
@@TABLE@@
Maxime Perrotin's avatar
Maxime Perrotin committed
165
      [partition => reference (@_Partition_Node_@_@_Partition_CPU_@.@_Partition_VP_@); Duration => @_Partition_Duration_@ ms; periodic_processing_start => false;]
Maxime Perrotin's avatar
Maxime Perrotin committed
166
167
168
169
170
171
@@END_TABLE@@
@@END_INLINE@@@@
   ) applies to @_Node_Names_@_@_Node_CPU_@;
@@END_IF@@
@@END_TABLE@@

172
end DeploymentView.final;
173

174
end Process_Package;
175
176

-- deploymenttview.final