Commit 6e916ddf authored by Maxime Perrotin's avatar Maxime Perrotin
Browse files

Add testcase showing a possible e2es architecture

Synchronous data flow architecture
parent a3cb5e26
......@@ -4,6 +4,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <signal.h>
#include <stddef.h>
void myhandler ();
......@@ -23,6 +24,10 @@ void myhandler ()
void simple_c_function_PI_cyclic_operation()
{
int *a = NULL;
*a = 5;
int b[2];
b[5] = 4;
printf ("Hello, world...\n");
}
--------------------------------------------------------
--! File generated by asn2aadl v2.2-r327f5c8: DO NOT EDIT !
--------------------------------------------------------
--! MadeInFastMode:True:
--! InputASN1FileChecksum:d8ecb1e4400168ace19ab9a07d1c600b:/home/taste/tool-src/kazoo/test/e2es_complete/DataView.asn:
--! InputASN1FileChecksum:1a749c83b4f5df662c6a9696646135c0:/home/taste/tool-src/kazoo/test/e2es_complete/DataView.acn:
--! InputASN1FileChecksum:ee8a7e01f29874c0d50f437d5abb9599:/home/taste/tool-inst/share/taste-types/taste-types.asn:
--------------------------------------------------------
package DataView
public
with Data_Model;
with Taste;
with Base_Types;
with Deployment;
DATA Simulink_Tunable_Parameter
PROPERTIES
TASTE::Ada_Package_Name => "TASTE_Directives";
Type_Source_Name => "Simulink-Tunable-Parameter";
Deployment::ASN1_Module_Name => "TASTE-Directives";
TASTE::Forbid_in_PI => true;
END Simulink_Tunable_Parameter;
DATA Timer
PROPERTIES
TASTE::Ada_Package_Name => "TASTE_Directives";
Type_Source_Name => "Timer";
Deployment::ASN1_Module_Name => "TASTE-Directives";
TASTE::Forbid_in_PI => true;
END Timer;
DATA Taste_directive
PROPERTIES
TASTE::Ada_Package_Name => "TASTE_Directives";
Type_Source_Name => "Taste-directive";
Deployment::ASN1_Module_Name => "TASTE-Directives";
TASTE::Forbid_in_PI => true;
END Taste_directive;
data Stream_Element_Buffer
-- Root type for buffer elements
properties
Data_Model::Data_Representation => Character;
end Stream_Element_Buffer;
DATA My_Integer
PROPERTIES
-- name of the ASN.1 source file:
Source_Text => ("/home/taste/tool-src/kazoo/test/e2es_complete/DataView.asn");
TASTE::EncodingDefinitionFile => classifier(DataView::ACN_DataView);
TASTE::Ada_Package_Name => "E2ES_DATAVIEW";
Deployment::ASN1_Module_Name => "E2ES-DATAVIEW";
Source_Language => (ASN1);
-- name of the corresponding data type in the source file:
Type_Source_Name => "My-Integer";
TASTE::Position_In_File => [ line => 5 ; column => 1 ; ];
-- what kind of type is this?
TASTE::ASN1_Basic_Type =>aINTEGER;
END My_Integer;
DATA IMPLEMENTATION My_Integer.impl
END My_Integer.impl;
DATA My_Integer_Buffer_Max
END My_Integer_Buffer_Max;
DATA IMPLEMENTATION My_Integer_Buffer_Max.impl
-- Buffer to hold a marshalled data of type My_Integer
PROPERTIES
Data_Model::Data_Representation => array;
Data_Model::Base_Type => (classifier (DataView::Stream_Element_Buffer));
END My_Integer_Buffer_Max.impl;
DATA My_Integer_Buffer
END My_Integer_Buffer;
DATA IMPLEMENTATION My_Integer_Buffer.impl
-- Buffer to hold a marshalled data of type My_Integer
SUBCOMPONENTS
Buffer : data My_Integer_Buffer_Max.impl;
Length : data Base_Types::Unsigned_32;
PROPERTIES
Data_Model::Data_Representation => Struct;
END My_Integer_Buffer.impl;
DATA T_Boolean
PROPERTIES
-- name of the ASN.1 source file:
Source_Text => ("/home/taste/tool-inst/share/taste-types/taste-types.asn");
TASTE::Ada_Package_Name => "TASTE_BasicTypes";
Deployment::ASN1_Module_Name => "TASTE-BasicTypes";
Source_Language => (ASN1);
-- name of the corresponding data type in the source file:
Type_Source_Name => "T-Boolean";
TASTE::Position_In_File => [ line => 14 ; column => 1 ; ];
-- what kind of type is this?
TASTE::ASN1_Basic_Type =>aBOOLEAN;
END T_Boolean;
DATA IMPLEMENTATION T_Boolean.impl
END T_Boolean.impl;
DATA T_Boolean_Buffer_Max
END T_Boolean_Buffer_Max;
DATA IMPLEMENTATION T_Boolean_Buffer_Max.impl
-- Buffer to hold a marshalled data of type T_Boolean
PROPERTIES
Data_Model::Data_Representation => array;
Data_Model::Base_Type => (classifier (DataView::Stream_Element_Buffer));
END T_Boolean_Buffer_Max.impl;
DATA T_Boolean_Buffer
END T_Boolean_Buffer;
DATA IMPLEMENTATION T_Boolean_Buffer.impl
-- Buffer to hold a marshalled data of type T_Boolean
SUBCOMPONENTS
Buffer : data T_Boolean_Buffer_Max.impl;
Length : data Base_Types::Unsigned_32;
PROPERTIES
Data_Model::Data_Representation => Struct;
END T_Boolean_Buffer.impl;
DATA T_Int32
PROPERTIES
-- name of the ASN.1 source file:
Source_Text => ("/home/taste/tool-inst/share/taste-types/taste-types.asn");
TASTE::Ada_Package_Name => "TASTE_BasicTypes";
Deployment::ASN1_Module_Name => "TASTE-BasicTypes";
Source_Language => (ASN1);
-- name of the corresponding data type in the source file:
Type_Source_Name => "T-Int32";
TASTE::Position_In_File => [ line => 6 ; column => 1 ; ];
-- what kind of type is this?
TASTE::ASN1_Basic_Type =>aINTEGER;
END T_Int32;
DATA IMPLEMENTATION T_Int32.impl
END T_Int32.impl;
DATA T_Int32_Buffer_Max
END T_Int32_Buffer_Max;
DATA IMPLEMENTATION T_Int32_Buffer_Max.impl
-- Buffer to hold a marshalled data of type T_Int32
PROPERTIES
Data_Model::Data_Representation => array;
Data_Model::Base_Type => (classifier (DataView::Stream_Element_Buffer));
END T_Int32_Buffer_Max.impl;
DATA T_Int32_Buffer
END T_Int32_Buffer;
DATA IMPLEMENTATION T_Int32_Buffer.impl
-- Buffer to hold a marshalled data of type T_Int32
SUBCOMPONENTS
Buffer : data T_Int32_Buffer_Max.impl;
Length : data Base_Types::Unsigned_32;
PROPERTIES
Data_Model::Data_Representation => Struct;
END T_Int32_Buffer.impl;
DATA T_Int8
PROPERTIES
-- name of the ASN.1 source file:
Source_Text => ("/home/taste/tool-inst/share/taste-types/taste-types.asn");
TASTE::Ada_Package_Name => "TASTE_BasicTypes";
Deployment::ASN1_Module_Name => "TASTE-BasicTypes";
Source_Language => (ASN1);
-- name of the corresponding data type in the source file:
Type_Source_Name => "T-Int8";
TASTE::Position_In_File => [ line => 10 ; column => 1 ; ];
-- what kind of type is this?
TASTE::ASN1_Basic_Type =>aINTEGER;
END T_Int8;
DATA IMPLEMENTATION T_Int8.impl
END T_Int8.impl;
DATA T_Int8_Buffer_Max
END T_Int8_Buffer_Max;
DATA IMPLEMENTATION T_Int8_Buffer_Max.impl
-- Buffer to hold a marshalled data of type T_Int8
PROPERTIES
Data_Model::Data_Representation => array;
Data_Model::Base_Type => (classifier (DataView::Stream_Element_Buffer));
END T_Int8_Buffer_Max.impl;
DATA T_Int8_Buffer
END T_Int8_Buffer;
DATA IMPLEMENTATION T_Int8_Buffer.impl
-- Buffer to hold a marshalled data of type T_Int8
SUBCOMPONENTS
Buffer : data T_Int8_Buffer_Max.impl;
Length : data Base_Types::Unsigned_32;
PROPERTIES
Data_Model::Data_Representation => Struct;
END T_Int8_Buffer.impl;
DATA T_UInt32
PROPERTIES
-- name of the ASN.1 source file:
Source_Text => ("/home/taste/tool-inst/share/taste-types/taste-types.asn");
TASTE::Ada_Package_Name => "TASTE_BasicTypes";
Deployment::ASN1_Module_Name => "TASTE-BasicTypes";
Source_Language => (ASN1);
-- name of the corresponding data type in the source file:
Type_Source_Name => "T-UInt32";
TASTE::Position_In_File => [ line => 8 ; column => 1 ; ];
-- what kind of type is this?
TASTE::ASN1_Basic_Type =>aINTEGER;
END T_UInt32;
DATA IMPLEMENTATION T_UInt32.impl
END T_UInt32.impl;
DATA T_UInt32_Buffer_Max
END T_UInt32_Buffer_Max;
DATA IMPLEMENTATION T_UInt32_Buffer_Max.impl
-- Buffer to hold a marshalled data of type T_UInt32
PROPERTIES
Data_Model::Data_Representation => array;
Data_Model::Base_Type => (classifier (DataView::Stream_Element_Buffer));
END T_UInt32_Buffer_Max.impl;
DATA T_UInt32_Buffer
END T_UInt32_Buffer;
DATA IMPLEMENTATION T_UInt32_Buffer.impl
-- Buffer to hold a marshalled data of type T_UInt32
SUBCOMPONENTS
Buffer : data T_UInt32_Buffer_Max.impl;
Length : data Base_Types::Unsigned_32;
PROPERTIES
Data_Model::Data_Representation => Struct;
END T_UInt32_Buffer.impl;
DATA T_UInt8
PROPERTIES
-- name of the ASN.1 source file:
Source_Text => ("/home/taste/tool-inst/share/taste-types/taste-types.asn");
TASTE::Ada_Package_Name => "TASTE_BasicTypes";
Deployment::ASN1_Module_Name => "TASTE-BasicTypes";
Source_Language => (ASN1);
-- name of the corresponding data type in the source file:
Type_Source_Name => "T-UInt8";
TASTE::Position_In_File => [ line => 12 ; column => 1 ; ];
-- what kind of type is this?
TASTE::ASN1_Basic_Type =>aINTEGER;
END T_UInt8;
DATA IMPLEMENTATION T_UInt8.impl
END T_UInt8.impl;
DATA T_UInt8_Buffer_Max
END T_UInt8_Buffer_Max;
DATA IMPLEMENTATION T_UInt8_Buffer_Max.impl
-- Buffer to hold a marshalled data of type T_UInt8
PROPERTIES
Data_Model::Data_Representation => array;
Data_Model::Base_Type => (classifier (DataView::Stream_Element_Buffer));
END T_UInt8_Buffer_Max.impl;
DATA T_UInt8_Buffer
END T_UInt8_Buffer;
DATA IMPLEMENTATION T_UInt8_Buffer.impl
-- Buffer to hold a marshalled data of type T_UInt8
SUBCOMPONENTS
Buffer : data T_UInt8_Buffer_Max.impl;
Length : data Base_Types::Unsigned_32;
PROPERTIES
Data_Model::Data_Representation => Struct;
END T_UInt8_Buffer.impl;
SYSTEM Taste_DataView
END Taste_DataView;
SYSTEM IMPLEMENTATION Taste_DataView.others
SUBCOMPONENTS
My_Integer : DATA My_Integer.impl;
T_Boolean : DATA T_Boolean.impl;
T_Int32 : DATA T_Int32.impl;
T_Int8 : DATA T_Int8.impl;
T_UInt32 : DATA T_UInt32.impl;
T_UInt8 : DATA T_UInt8.impl;
END Taste_DataView.others;
DATA ACN_DataView
PROPERTIES
Source_Text => ("/home/taste/tool-src/kazoo/test/e2es_complete/DataView.acn");
Source_Language => (ACN);
END ACN_DataView;
end DataView;
E2ES-DATAVIEW DEFINITIONS ::= BEGIN
-- In this ACN model, you can specify custom binary encoding rules for
-- your data types. For example if you require a specific memory layout
-- for a record, or need to add padding fields, define endianness, etc.
-- you can do that with ACN. Refer to the TASTE wiki for documentation:
-- https://taste.tuxfamily.org/wiki/index.php?title=Main_Page
-- Example of custom encoding:
-- My-Integer [encoding pos-int, endianness big, size 16]
END
E2ES-DATAVIEW DEFINITIONS ::=
BEGIN
IMPORTS T-Int32, T-UInt32, T-Int8, T-UInt8, T-Boolean FROM TASTE-BasicTypes;
My-Integer ::= INTEGER (3 .. 1415)
-- ASN.1 Type definitions must start with an uppercase
-- Field names in records (SEQUENCE) must start with a lowercase
-- Underscores are not allowed: use dash (hyphen)
-- For integers do not assume that small ranges will be translated to small
-- types in C or Ada (expect unsigned or signed 64 bits types with subtypes
-- for the range in Ada)
-- Simple types:
-- TASTE-Boolean ::= BOOLEAN
-- MyInteger ::= INTEGER (0..255)
-- MyReal ::= REAL (0.0 .. 1000.0)
-- MyBool ::= BOOLEAN
-- MyEnum ::= ENUMERATED { hello, world, how-are-you }
-- Complex types:
-- MySeq ::= SEQUENCE {
-- input-data MyInteger,
-- output-data MyInteger,
-- validity ENUMERATED { valid, invalid }
-- }
--
-- MyChoice ::= CHOICE {
-- a BOOLEAN,
-- b MySeq
-- }
--
-- MySeqOf ::= SEQUENCE (SIZE (2)) OF MyEnum
--
-- MyOctStr ::= OCTET STRING (SIZE (3))
--
-- -- You can also declare constants
-- myVar MySeqOf ::= { hello, world }
END
---------------------------------------------------
-- AADL2.2
-- TASTE type deploymentview
--
-- generated code: do not edit
---------------------------------------------------
PACKAGE deploymentview::DV::Node1
PUBLIC
WITH Taste;
WITH Deployment;
WITH TASTE_DV_Properties;
WITH deploymentview::DV;
WITH Memory_Properties;
WITH ARINC653;
PROCESS e2es
END e2es;
PROCESS IMPLEMENTATION e2es.others
END e2es.others;
END deploymentview::DV::Node1;
PACKAGE deploymentview::DV
PUBLIC
WITH interfaceview::IV::Simulation_Manager;
WITH interfaceview::IV::Geometry_Module::GeometryModule_Interface;
WITH interfaceview::IV::Geometry_Module::GeometryModule_Implementation;
WITH interfaceview::IV::Scene_Creation_Module::Scene_Creation_Interface;
WITH interfaceview::IV::Scene_Creation_Module::Scene_Creation_Implementation;
WITH interfaceview::IV::Console;
WITH interfaceview::IV::Observation_Timeline::Observation_Timeline_Interface;
WITH interfaceview::IV::Observation_Timeline::Observation_Timeline_Implementation;
WITH ocarina_processors_x86;
WITH deploymentview::DV::Node1;
WITH Taste;
WITH Deployment;
WITH interfaceview::IV;
WITH TASTE_DV_Properties;
SYSTEM Node1
END Node1;
SYSTEM IMPLEMENTATION Node1.others
SUBCOMPONENTS
IV_Simulation_Manager : SYSTEM interfaceview::IV::Simulation_Manager::Simulation_Manager.others {
Taste::FunctionName => "Simulation_Manager";
};
IV_GeometryModule_Interface : SYSTEM interfaceview::IV::Geometry_Module::GeometryModule_Interface::GeometryModule_Interface.others {
Taste::FunctionName => "GeometryModule_Interface";
};
IV_GeometryModule_Implementation : SYSTEM interfaceview::IV::Geometry_Module::GeometryModule_Implementation::GeometryModule_Implementation.others {
Taste::FunctionName => "GeometryModule_Implementation";
};
IV_Scene_Creation_Interface : SYSTEM interfaceview::IV::Scene_Creation_Module::Scene_Creation_Interface::Scene_Creation_Interface.others {
Taste::FunctionName => "Scene_Creation_Interface";
};
IV_Scene_Creation_Implementation : SYSTEM interfaceview::IV::Scene_Creation_Module::Scene_Creation_Implementation::Scene_Creation_Implementation.others {
Taste::FunctionName => "Scene_Creation_Implementation";
};
IV_Console : SYSTEM interfaceview::IV::Console::Console.others {
Taste::FunctionName => "Console";
};
IV_Observation_Timeline_Interface : SYSTEM interfaceview::IV::Observation_Timeline::Observation_Timeline_Interface::Observation_Timeline_Interface.others {
Taste::FunctionName => "Observation_Timeline_Interface";
};
IV_Observation_Timeline_Implementation : SYSTEM interfaceview::IV::Observation_Timeline::Observation_Timeline_Implementation::Observation_Timeline_Implementation.others {
Taste::FunctionName => "Observation_Timeline_Implementation";
};
e2es : PROCESS deploymentview::DV::Node1::e2es.others {
Taste::coordinates => "111108 68774 149560 102651";
Deployment::Port_Number => 0;
};
x86_linux : PROCESSOR ocarina_processors_x86::x86.linux {
Taste::coordinates => "106301 59095 154367 107490";
};
PROPERTIES
Taste::APLC_Binding => (reference (e2es)) APPLIES TO IV_Simulation_Manager;
Taste::APLC_Binding => (reference (e2es)) APPLIES TO IV_GeometryModule_Interface;
Taste::APLC_Binding => (reference (e2es)) APPLIES TO IV_GeometryModule_Implementation;
Taste::APLC_Binding => (reference (e2es)) APPLIES TO IV_Scene_Creation_Interface;
Taste::APLC_Binding => (reference (e2es)) APPLIES TO IV_Scene_Creation_Implementation;
Taste::APLC_Binding => (reference (e2es)) APPLIES TO IV_Console;
Taste::APLC_Binding => (reference (e2es)) APPLIES TO IV_Observation_Timeline_Interface;
Taste::APLC_Binding => (reference (e2es)) APPLIES TO IV_Observation_Timeline_Implementation;
Actual_Processor_Binding => (reference (x86_linux)) APPLIES TO e2es;
END Node1.others;
SYSTEM deploymentview
END deploymentview;
SYSTEM IMPLEMENTATION deploymentview.others
SUBCOMPONENTS
Node1 : SYSTEM Node1.others {
Taste::coordinates => "100293 45268 160375 114403";
};
interfaceview : SYSTEM interfaceview::IV::interfaceview.others;
END deploymentview.others;
PROPERTIES
Taste::coordinates => "0 0 297000 210000";
Taste::version => "2.3";
Taste::interfaceView => "InterfaceView.aadl";
Taste::HWLibraries => ("/home/taste/tool-inst/share/ocarina/AADLv2/ocarina_components.aadl");
END deploymentview::DV;
This diff is collapsed.
KAZOO?=kazoo
all: c
c: work/glue_built
$(MAKE) -C work
skeletons:
$(MAKE) work/skeletons_built
work/skeletons_built: InterfaceView.aadl DataView.aadl
$(KAZOO) --gw -o work
$(MAKE) -C work dataview
touch $@
work/glue_built: InterfaceView.aadl DeploymentView.aadl DataView.aadl
$(KAZOO) -p --glue --gw -o work
touch $@
clean:
$(MAKE) -C work clean
.PHONY: clean skeletons c
Possible template for en End-to-End simulator reference architecture and implementation
Run "taste" to edit
and "make -j" to build
-- type dataview
---------------------------------------
--! File generated by asn2aadl v2.2-r327f5c8: DO NOT EDIT !
--------------------------------------------------------
--! MadeInFastMode:True:
--! InputASN1FileChecksum:d8ecb1e4400168ace19ab9a07d1c600b:/home/taste/e2es_complete/generic_module/DataView.asn:
--! InputASN1FileChecksum:1a749c83b4f5df662c6a9696646135c0:/home/taste/e2es_complete/generic_module/DataView.acn:
--! InputASN1FileChecksum:ee8a7e01f29874c0d50f437d5abb9599:/home/taste/tool-inst/share/taste-types/taste-types.asn:
--------------------------------------------------------
package DataView
public
with Data_Model;
with Taste;
with Base_Types;
with Deployment;
DATA Simulink_Tunable_Parameter
PROPERTIES
TASTE::Ada_Package_Name => "TASTE_Directives";
Type_Source_Name => "Simulink-Tunable-Parameter";
Deployment::ASN1_Module_Name => "TASTE-Directives";
TASTE::Forbid_in_PI => true;
END Simulink_Tunable_Parameter;
DATA Timer
PROPERTIES
TASTE::Ada_Package_Name => "TASTE_Directives";
Type_Source_Name => "Timer";
Deployment::ASN1_Module_Name => "TASTE-Directives";
TASTE::Forbid_in_PI => true;
END Timer;
DATA Taste_directive
PROPERTIES
TASTE::Ada_Package_Name => "TASTE_Directives";
Type_Source_Name => "Taste-directive";
Deployment::ASN1_Module_Name => "TASTE-Directives";
TASTE::Forbid_in_PI => true;
END Taste_directive;
data Stream_Element_Buffer
-- Root type for buffer elements
properties
Data_Model::Data_Representation => Character;
end Stream_Element_Buffer;
DATA My_Integer
PROPERTIES
-- name of the ASN.1 source file:
Source_Text => ("/home/taste/e2es_complete/generic_module/DataView.asn");
TASTE::EncodingDefinitionFile => classifier(DataView::ACN_DataView);
TASTE::Ada_Package_Name => "E2ES_DATAVIEW";
Deployment::ASN1_Module_Name => "E2ES-DATAVIEW";
Source_Language => (ASN1);
-- name of the corresponding data type in the source file:
Type_Source_Name => "My-Integer";
TASTE::Position_In_File => [ line => 5 ; column => 1 ; ];
-- what kind of type is this?
TASTE::ASN1_Basic_Type =>aINTEGER;
END My_Integer;
DATA IMPLEMENTATION My_Integer.impl
END My_Integer.impl;
DATA My_Integer_Buffer_Max
END My_Integer_Buffer_Max;
DATA IMPLEMENTATION My_Integer_Buffer_Max.impl
-- Buffer to hold a marshalled data of type My_Integer
PROPERTIES
Data_Model::Data_Representation => array;
Data_Model::Base_Type => (classifier (DataView::Stream_Element_Buffer));
END My_Integer_Buffer_Max.impl;
DATA My_Integer_Buffer
END My_Integer_Buffer;
DATA IMPLEMENTATION My_Integer_Buffer.impl
-- Buffer to hold a marshalled data of type My_Integer
SUBCOMPONENTS
Buffer : data My_Integer_Buffer_Max.impl;
Length : data Base_Types::Unsigned_32;
PROPERTIES
Data_Model::Data_Representation => Struct;
END My_Integer_Buffer.impl;
DATA T_Boolean
PROPERTIES
-- name of the ASN.1 source file:
Source_Text => ("/home/taste/tool-inst/share/taste-types/taste-types.asn");