system.tmplt 7.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)
35 36 37
@@-- @_Unique_Dev_ASN1_Files_@ : List of ASN.1 files/module/type for device configuration with no duplicates (vector tag)
@@-- @_Unique_Dev_ASN1_Mod_@       |_  corresponding asn1 module
@@-- @_Unique_Dev_ASN1_Sorts_@     |_  type name
38 39 40
@@-- @_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
41 42 43 44
@@-- 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)
45 46 47

--  Input file for the taste orchestrator: do not edit
--  This file was generated automatically by taste/kazoo
48 49 50
@_Threads_@

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

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

Maxime Perrotin's avatar
Maxime Perrotin committed
79
data implementation TASTE_Protected.Object
80 81
properties
   Concurrency_Control_Protocol => Protected_Access;
Maxime Perrotin's avatar
Maxime Perrotin committed
82 83
end TASTE_Protected.Object; 
@@END_IF@@
84

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

108 109
@_Nodes_@

110 111
system DeploymentView
end DeploymentView;
112

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

191
end DeploymentView.final;
192

193
end Process_Package;
194 195

-- deploymenttview.final