Commit 9d4409ae authored by Maxime Perrotin's avatar Maxime Perrotin
Browse files

Use generated doc as the reference

parent fc9ebf08
Kazoo is a part of TASTE tool-chain.
== Input files ==
* InterfaceView.aadl
* DeploymentView.aadl
* DataView.aadl
* DataView.asn
* DataView.acn
== Internal representation of system ==
Taste uses Ocarina library to parse input aadl files.
The internal representation of system consists of thre major structures:
* InterfaceView
* DeploymentView
* ConcurrencyView
The InterfaceView representation contains of list of functions. Every function contains provided interfaces and required interfaces. Optionally a function may contain context parameters.
The InterfaceView representation contains also connections between provided interfaces and required interfaces.
The InterfaceView representation is used to create skeletons and glue code.
The DeploymentView constists of Nodes, Buses and connections between them.
The Node contains Partitions, Processors and Drivers.
The Partition contains a list of bounded functions.
The DeploymentView is not directly used for code generation.
The ConcurrencyView is generated from DeploymentView.
The ConcurrencyView consists of list of Nodes.
Every Node consists of list of Partitions and list of Drivers.
Every Partition consists of list of Threads.
Every Thread has a list of assigned functions from InterfaceView.
The ConcurrencyView is used for generation of rest of glue code and also middleware integration.
== build-script.sh generation ==
The file build-script.sh is generated from build-script.tmplt.
The template files: build-script-gen.tmplt, build-script-func.tmplt and build-script-zip.tmplt are evaluated earlier, and the output is passed to main template as parameters.
== Code skeletons generation ==
Algorithm in pseudocode:
<nowiki>
for every function from InterfaceView:
for every subdirectory
evaluate template trigger.tmplt
if result is equal to “TRUE” then
evaluate template function-filename.tmplt if exists
evaluate template makefile-filename.tmplt if exists
evaluate template interface.tmplt for required interfaces of function
evaluate template interface.tmplt for provided interfaces of function
evaluate template makefile.tmplt and optionally save output to file
evaluate template function.tmplt and optionally save output to file
if function has context parameters then
evaluate template context_parameters.tmplt and save the output to file
</nowiki>
== Glue code generation ==
Algorithm in pseudocode:
<nowiki>
for every function from InterfaceView:
for every subdirectory
evaluate template trigger.tmplt
if result is equal to “TRUE” then
evaluate template function-filename.tmplt if exists
evaluate template makefile-filename.tmplt if exists
evaluate template interface.tmplt for required interfaces of function
evaluate template interface.tmplt for provided interfaces of function
evaluate template makefile.tmplt and optionally save output to file
evaluate template function.tmplt and optionally save output to file
</nowiki>
== Concurrency View generation ==
Algorithm in pseudocode:
<nowiki>
for every subdirectory
for every node from ConcurrencyView
evaluate template filenode.tmplt
evaluate template trigger.tmplt
if result is equal to “TRUE” then
for every partition from node:
evaluate template filepart.tmplt
evaluate template thread.tmplt
evaluate template filethread.tmplt
evaluate template fileblock.tmplt
evaluate template pi.tmplt
evaluate template pi.tmplt (with other parameters)
evaluate template ri.tmplt
evaluate template block.tmplt
evaluate template partition.tmplt
evaluate template node.tmplt
evaluate template system.tmplt
</nowiki>
== Templates ==
=== templates/build-script.tmplt ===
This template is evaluated only once. The output is saved to the file build-script.sh within output directory.
{| class="wikitable"
!Parameter name
!Description
|-
|Interface_View_Path
|Path to the interface view file
|-
|Output_Path
|Output directory
|-
|Generate_Code
|Concatenated result from evaluation of build-script-gencode.tmplt
|-
|Zip_Code
|Concatenated result from evaluation of build-script-zip.tmplt
|-
|Functions
|Concatenated result from evaluation of build-script-func.tmplt
|}
=== templates/skeletons/makefile.tmplt ===
This template is evaluated only once. The output is saved to the Makefile within output directory.
{| class="wikitable"
......@@ -132,9 +18,6 @@ This template is evaluated only once. The output is saved to the Makefile within
|Has_Context_Param
|... and flag to indicate if function has context parameters
|-
|Has_Context_Param_Tag
|
|-
|CP_Files
|List of all context parameters ASN.1 files
|-
......@@ -209,6 +92,111 @@ This template is identical for Skeleton and Glue subfolders.
|-
|Use_POHIC
|Command line configuration
|-
|List_Of_PIs
|DOCUMENTATION MISSING
|-
|ASync_RI_Param_Type
|DOCUMENTATION MISSING
|-
|RIs_Have_Params
|DOCUMENTATION MISSING
|-
|List_Of_Sync_RIs
|DOCUMENTATION MISSING
|-
|Debug_Flag
|DOCUMENTATION MISSING
|-
|ASync_PI_Param_Name
|DOCUMENTATION MISSING
|-
|Timer_Resolution
|DOCUMENTATION MISSING
|-
|Property_Names
|DOCUMENTATION MISSING
|-
|Skeletons
|DOCUMENTATION MISSING
|-
|Interface_View
|DOCUMENTATION MISSING
|-
|ASync_PI_Param_Type
|DOCUMENTATION MISSING
|-
|ASync_RI_Param_Name
|DOCUMENTATION MISSING
|-
|CP_Asn1Modules
|DOCUMENTATION MISSING
|-
|Property_Values
|DOCUMENTATION MISSING
|-
|Binary_Path
|DOCUMENTATION MISSING
|-
|CP_Values
|DOCUMENTATION MISSING
|-
|Deployment_View
|DOCUMENTATION MISSING
|-
|No_Stdlib_Flag
|DOCUMENTATION MISSING
|-
|List_Of_ASync_PIs
|DOCUMENTATION MISSING
|-
|Glue
|DOCUMENTATION MISSING
|-
|Async_RIs_Parent
|DOCUMENTATION MISSING
|-
|CP_Names
|DOCUMENTATION MISSING
|-
|List_Of_Sync_PIs
|DOCUMENTATION MISSING
|-
|List_Of_ASync_RIs
|DOCUMENTATION MISSING
|-
|Has_Context
|DOCUMENTATION MISSING
|-
|Output_Dir
|DOCUMENTATION MISSING
|-
|PIs_Have_Params
|DOCUMENTATION MISSING
|-
|CP_Asn1Filenames
|DOCUMENTATION MISSING
|-
|Timers
|DOCUMENTATION MISSING
|-
|Check_Data_View
|DOCUMENTATION MISSING
|-
|CP_Types
|DOCUMENTATION MISSING
|-
|Other_Files
|DOCUMENTATION MISSING
|-
|Sync_RIs_Parent
|DOCUMENTATION MISSING
|-
|List_Of_RIs
|DOCUMENTATION MISSING
|-
|Data_View
|DOCUMENTATION MISSING
|}
=== templates/skeletons/sub/makefile-filename.tmplt ===
This file is optional, if exists the result of parsing of this file is a name of output file for makefile.tmplt, otherwise this template will not be processed.
......@@ -281,6 +269,21 @@ This file is processed twice, first time for required interfaces of the function
|-
|IF_Property_Names
| and Values User-defined properties (vector tag)
|-
|IF_Property_Values
|DOCUMENTATION MISSING
|-
|Remote_Languages
|DOCUMENTATION MISSING
|-
|Param_ASN1_Modules
|DOCUMENTATION MISSING
|-
|Remote_Interface_Names
|DOCUMENTATION MISSING
|-
|Remote_Function_Names
|DOCUMENTATION MISSING
|}
=== templates/skeletons/sub/makefile.tmplt ===
This template is processed when makefile-filename.tmplt exists.
......@@ -304,83 +307,6 @@ The output of this template is saved to the file with name returned by processin
|Instance_Of
|Name of function type if instance
|}
=== templates/skeletons/sub/function.tmplt ===
This template is processed when function-filename.tmplt exists.
The output of this template is save to the file with name returned by processing function-filename.tmplt in directory [functionname]/[languagename]/src.
{| class="wikitable"
!Parameter name
!Description
|-
|Name
|The name of the function
|-
|Language
|The implementation language
|-
|List_Of_PIs
|List of all Provided Interfaces (just names)
|-
|List_Of_RIs
|List of all Required Interfaces (just names)
|-
|List_Of_Sync_PIs
|List of synchronous Provided Interfaces
|-
|List_Of_Sync_RIs
|List of synchronous Required Interfaces
|-
|List_Of_ASync_PIs
|List of asynchronous Provided Interfaces
|-
|List_Of_ASync_RIs
|List of asynchronous Required Interfaces
|-
|ASN1_Modules
|List of ASN.1 Modules names
|-
|ASN1_Files
|List of ASN.1 Files with path
|-
|Timers
|List of timers (just names)
|-
|Has_Context
|Flag, True if there are context parameters
|-
|CP_Names
|List of Context Parameter names
|-
|CP_Types
|List of Context Parameter types
|-
|Provided_Interfaces
|From template: Provided interfaces with params
|-
|Required_Interfaces
|From template: Required interfaces with params
|-
|Property_Names
|List of User-defined properties (names)
|-
|Property_Values
|List of User-defined properties (values)
|-
|Is_Type Flag
|True if function is a component type
|-
|Instance_Of
|Optional name of component type
|}
=== templates/concurrency_view/sub/filenode.tmplt ===
This file is optional. This file is processed for every node. The result of this file is a filename for result of processing node.tmplt.
{| class="wikitable"
!Parameter name
!Description
|-
|Node_Name
|Name of the node as defined in the Deployment View
|-
|}
=== templates/concurrency_view/sub/trigger.tmplt ===
This file is processed for every node. The result of this file indicates if the rest of templates for given node will be processed.
{| class="wikitable"
......@@ -396,24 +322,38 @@ This file is processed for every node. The result of this file indicates if the
|Glue
|from kazoo configuration
|-
|POHIC
|from kazoo configuration
|No_Stdlib_Flag
|DOCUMENTATION MISSING
|-
|Debug
|from kazoo configuration
|Timer_Resolution
|DOCUMENTATION MISSING
|-
|No_Stdlib
|from kazoo configuration
|}
=== templates/concurrency_view/sub/filepart.tmplt ===
This file is processed for every partition in every node. This file is optional.
If the result is not empty then is used as a file name for parsing partition.tmplt
{| class="wikitable"
!Parameter name
!Description
|Output_Dir
|DOCUMENTATION MISSING
|-
|Partition_Name
|Partition name
|Interface_View
|DOCUMENTATION MISSING
|-
|Binary_Path
|DOCUMENTATION MISSING
|-
|Check_Data_View
|DOCUMENTATION MISSING
|-
|Debug_Flag
|DOCUMENTATION MISSING
|-
|Use_POHIC
|DOCUMENTATION MISSING
|-
|Other_Files
|DOCUMENTATION MISSING
|-
|Deployment_View
|DOCUMENTATION MISSING
|-
|Data_View
|DOCUMENTATION MISSING
|}
=== templates/concurrency_view/sub/thread.tmplt ===
This file is processed for every thread in every partition in every node.
......@@ -445,9 +385,6 @@ This file is processed for every thread in every partition in every node.
|Remote_Threads
|Vector tag: output remote thread list
|-
|RI_Port_Name
| |_ Corresponding local RI name
|-
|Remote_PIs
| |_ Associated PI Name
|-
......@@ -458,10 +395,10 @@ This file is processed for every thread in every partition in every node.
| |_ Asn1 module of the optional param type
|-
|Name
|
|
|-
|Kind
|
|
|-
|Parent_Function
|Tags related to the PI that is at the origin of the thread creation: shoud be useless here
......@@ -469,18 +406,6 @@ This file is processed for every thread in every partition in every node.
|Param_Names
|
|-
|Types
|
|-
|ASN1_Modules
|
|-
|Encodings
|
|-
|Directions
|param vector tag
|-
|Period
|
|-
......@@ -493,43 +418,77 @@ This file is processed for every thread in every partition in every node.
|IF_Property_Names
|
|-
|Values
|user properties (vector tag)
|-
|Skeletons
|from kazoo configuration
|-
|Glue
|from kazoo configuration
|-
|POHIC
|from kazoo configuration
|Param_Directions
|DOCUMENTATION MISSING
|-
|Debug
|from kazoo configuration
|Is_Timer
|DOCUMENTATION MISSING
|-
|No_Stdlib
|from kazoo configuration
|}
=== templates/concurrency_view/sub/filethread.tmplt ===
This file is processed for every thread in every partition in every node.
The result of this template is used as a file name to save thread.tmplt. If the result is empty the file will be not created.
{| class="wikitable"
!Parameter name
!Description
|Debug_Flag
|DOCUMENTATION MISSING
|-
|Thread_Name
|Thread name
|}
=== templates/concurrency_view/sub/fileblock.tmplt ===
This template is evaluated for every block in partition.
The result of this template is used as a file name to save block.tmplt. If the result is empty then the file will not be created.
{| class="wikitable"
!Parameter name
!Description
|Timer_Resolution
|DOCUMENTATION MISSING
|-
|Param_Encodings
|DOCUMENTATION MISSING
|-
|Interface_View
|DOCUMENTATION MISSING
|-
|IF_Property_Values
|DOCUMENTATION MISSING
|-
|Language
|DOCUMENTATION MISSING
|-
|Binary_Path
|DOCUMENTATION MISSING
|-
|Remote_Function_Names
|DOCUMENTATION MISSING
|-
|Block_Name
|Block Name
|Deployment_View
|DOCUMENTATION MISSING
|-
|No_Stdlib_Flag
|DOCUMENTATION MISSING
|-
|Remote_Languages
|DOCUMENTATION MISSING
|-
|Param_ASN1_Modules
|DOCUMENTATION MISSING
|-
|Output_Dir
|DOCUMENTATION MISSING
|-
|RI_Port_Names
|DOCUMENTATION MISSING
|-
|Param_Types
|DOCUMENTATION MISSING
|-
|Remote_Interface_Names
|DOCUMENTATION MISSING
|-
|Check_Data_View
|DOCUMENTATION MISSING
|-
|Use_POHIC
|DOCUMENTATION MISSING
|-
|Other_Files
|DOCUMENTATION MISSING
|-
|Data_View
|DOCUMENTATION MISSING
|}
=== templates/concurrency_view/sub/pi.tmplt ===
The template pi.tmplt is evaluated many times for every protected and unprotected provided interface.
......@@ -541,9 +500,6 @@ The result of every evaluation is joined to one string and passed as a parameter
|Name
|The name of the interface
|-
|Direction
|"PI" or "RI"
|-
|Kind
|The RCM Kind
|-
......@@ -558,6 +514,54 @@ The result of every evaluation is joined to one string and passed as a parameter
|-
|Param_Directions
| |_ Corresponding direction
|-
|Is_Timer
|DOCUMENTATION MISSING
|-
|Param_Encodings
|DOCUMENTATION MISSING
|-
|Caller_Is_Local
|DOCUMENTATION MISSING
|-
|IF_Property_Values
|DOCUMENTATION MISSING
|-
|Queue_Size
|DOCUMENTATION MISSING
|-
|Language
|DOCUMENTATION MISSING
|-
|Protected_Block_Name
|DOCUMENTATION MISSING
|-
|Remote_Languages
|DOCUMENTATION MISSING
|-
|Param_ASN1_Modules
|DOCUMENTATION MISSING
|-
|Partition_Name
|DOCUMENTATION MISSING
|-
|Calling_Threads
|DOCUMENTATION MISSING
|-
|IF_Property_Names
|DOCUMENTATION MISSING
|-
|Period
|DOCUMENTATION MISSING
|-
|Remote_Interface_Names
|DOCUMENTATION MISSING
|-
|WCET
|DOCUMENTATION MISSING
|-
|Remote_Function_Names
|DOCUMENTATION MISSING
|}
=== templates/concurrency_view/sub/ri.tmplt ===
The template ri.tmplt is evaluated many times for every required interface.
......@@ -569,9 +573,6 @@ The result of every evaluation is koined to one string and passed as a parameter
|Name
|The name of the interface
|-
|Direction
|"PI" or "RI"
|-
|Kind
|The RCM Kind
|-
......@@ -586,6 +587,48 @@ The result of every evaluation is koined to one string and passed as a parameter
|-
|Param_Directions
|Corresponding direction
|-
|Is_Timer
|DOCUMENTATION MISSING
|-
|Param_Encodings
|DOCUMENTATION MISSING
|-
|IF_Property_Values
|DOCUMENTATION MISSING
|-
|Queue_Size
|DOCUMENTATION MISSING
|-
|Language
|DOCUMENTATION MISSING
|-
|Remote_Languages
|DOCUMENTATION MISSING
|-
|Param_ASN1_Modules
|DOCUMENTATION MISSING
|-
|Partition_Name
|DOCUMENTATION MISSING
|-
|Calling_Threads
|DOCUMENTATION MISSING
|-
|IF_Property_Names
|DOCUMENTATION MISSING
|-
|Period
|DOCUMENTATION MISSING
|-