system.tmplt 7.36 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)
35
36
37
@@-- @_Connect_From_Part_@   : Vector tag - bus connection: partition source
@@-- @_Connect_Via_Bus_@          |_ bus name
@@-- @_Connect_Port_Name_@        |_ port name
Maxime Perrotin's avatar
Maxime Perrotin committed
38
39
40
41
@@-- 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)
42
43
44

--  Input file for the taste orchestrator: do not edit
--  This file was generated automatically by taste/kazoo
45
46
47
@_Threads_@

package Process_Package
48
public
Maxime Perrotin's avatar
Maxime Perrotin committed
49
   with arinc653;
50
51
52
53
   with Deployment;
   with DataView;
   with interfaceview::IV;
   with deploymentview::DV;
Maxime Perrotin's avatar
Maxime Perrotin committed
54
55
56
57
@@-- Add "with" of the node, this is at least needed for TSP systems
@@TABLE@@
   with deploymentview::DV::@_Node_Names_@;
@@END_TABLE@@
58
59
60
61
62
63
@@TABLE@@
   with @_CAPITALIZE:Thread_Names_@_Thread;
@@END_TABLE@@
@@TABLE@@
   with @_CAPITALIZE:Target_Packages_@;
@@END_TABLE@@
64
65
66
67
@@-- If there is at least one bus, add ocarina_buses
@@IF@@ @_Bus_Names'Length_@ > 0
   with ocarina_buses;
@@END_IF@@
68

69
@@-- POHIC-only: declare protected objects to have runtime mutex
Maxime Perrotin's avatar
Maxime Perrotin committed
70
71
@@IF@@ @_Use_POHIC_@
data TASTE_Protected
72
73
properties
   Concurrency_Control_Protocol => Protected_Access;
Maxime Perrotin's avatar
Maxime Perrotin committed
74
end TASTE_Protected;
75

Maxime Perrotin's avatar
Maxime Perrotin committed
76
data implementation TASTE_Protected.Object
77
78
properties
   Concurrency_Control_Protocol => Protected_Access;
Maxime Perrotin's avatar
Maxime Perrotin committed
79
80
end TASTE_Protected.Object; 
@@END_IF@@
81

Maxime Perrotin's avatar
Maxime Perrotin committed
82
@@IF@@ @_Partition_VP'Length_@ > 0   @@-- AIR : we need a port polling threads
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
--  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@@

105
106
@_Nodes_@

107
108
system DeploymentView
end DeploymentView;
109

110
system implementation DeploymentView.final
111
subcomponents
Maxime Perrotin's avatar
Maxime Perrotin committed
112
@@TABLE'ALIGN_ON(":")@@
Maxime Perrotin's avatar
Maxime Perrotin committed
113
@@-- First declare the partitions
114
115
   @_CAPITALIZE:Partition_Names_@ : process @_CAPITALIZE:Partition_Names_@.final;
@@END_TABLE@@
Maxime Perrotin's avatar
Maxime Perrotin committed
116
@@-- Then the processor boards (they may contain several virtual processors for TSP systems) and optionally memory
Maxime Perrotin's avatar
Maxime Perrotin committed
117
@@TABLE'ALIGN_ON(":")@@
Maxime Perrotin's avatar
Maxime Perrotin committed
118
119
120
121
   @_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@@
122
@@END_TABLE@@
123
124
125
126
127
128
129
130
@@-- 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_@
      {
131
         Source_Text      => ("../DriversConfig/@_Device_Partition_@/DeviceConfig-@_Device_Node_Name_@-@_Device_Names_@.c");
132
133
134
135
         Type_Source_Name => "pohidrv_@_Device_Node_Name_@_@_Device_Names_@";
      };
@@END_TABLE@@
@@-- Specify the connections for distributed and TSP systems
136
137
138
@@IF@@ @_Part_Source_Name'Length_@ > 0
connections
@@TABLE@@
139
   @_Part_Source_Name_@_@_Part_Source_Port_@ : port @_Part_Source_Name_@.OUTPORT_@_Part_Source_Port_@ -> @_Part_Dest_Name_@.INPORT_@_Part_Dest_Port_@;
140
141
@@END_TABLE@@
@@END_IF@@
142
143
144
145
@@-- Specify the bus accesses
@@TABLE'ALIGN_ON("->")@@
   bus access @_Device_Bus_Name_@ -> @_Device_Node_Name_@_@_Device_Names_@.link;
@@END_TABLE@@
146
properties
147
@@-- Specify the bindings of the partitions to (virtual) processors
Maxime Perrotin's avatar
Maxime Perrotin committed
148
149
150
@@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_@ = ""
151
   Actual_Processor_Binding => (reference (@_CAPITALIZE:Partition_Node_@_@_Partition_CPU_@)) applies to @_CAPITALIZE:Partition_Names_@;
Maxime Perrotin's avatar
Maxime Perrotin committed
152
153
154
155
@@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@@
156
@@END_TABLE@@
157
158
159
160
@@-- 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@@
161
162
163
164
@@-- Specify connection bindings (from partition to bus)
@@TABLE'ALIGN_ON("applies")@@
   Actual_Connection_Binding => (reference (@_Connect_Via_Bus_@)) applies to @_Connect_From_Part_@_@_Connect_Port_Name_@;
@@END_TABLE@@
Maxime Perrotin's avatar
Maxime Perrotin committed
165
166
167
168
169
170
171
172
173
174
175
@@--  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
176
      [partition => reference (@_Partition_Node_@_@_Partition_CPU_@.@_Partition_VP_@); Duration => @_Partition_Duration_@ ms; periodic_processing_start => false;]
Maxime Perrotin's avatar
Maxime Perrotin committed
177
178
179
180
181
182
@@END_TABLE@@
@@END_INLINE@@@@
   ) applies to @_Node_Names_@_@_Node_CPU_@;
@@END_IF@@
@@END_TABLE@@

183
end DeploymentView.final;
184

185
end Process_Package;
186
187

-- deploymenttview.final