Commit 5b68ef08 authored by Maxime Perrotin's avatar Maxime Perrotin

Add test case with more than one port

parent 994e5bd4
This diff is collapsed.
TASTE-Dataview DEFINITIONS ::=
BEGIN
IMPORTS T-Int32, T-UInt32, T-Int8, T-UInt8, T-Boolean FROM TASTE-BasicTypes;
TASTE-Boolean ::= BOOLEAN
-- 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)
-- Simple types:
-- 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.1
-- 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 part1
END part1;
PROCESS IMPLEMENTATION part1.others
END part1.others;
VIRTUAL PROCESSOR part1_VP
PROPERTIES
Deployment::Execution_Platform => AIR;
ARINC653::Partition_Identifier => 0;
END part1_VP;
VIRTUAL PROCESSOR IMPLEMENTATION part1_VP.others
END part1_VP.others;
PROCESS part2
END part2;
PROCESS IMPLEMENTATION part2.others
END part2.others;
VIRTUAL PROCESSOR part2_VP
PROPERTIES
Deployment::Execution_Platform => AIR;
ARINC653::Partition_Identifier => 1;
END part2_VP;
VIRTUAL PROCESSOR IMPLEMENTATION part2_VP.others
END part2_VP.others;
PROCESS part3
END part3;
PROCESS IMPLEMENTATION part3.others
END part3.others;
VIRTUAL PROCESSOR part3_VP
PROPERTIES
Deployment::Execution_Platform => AIR;
ARINC653::Partition_Identifier => 2;
END part3_VP;
VIRTUAL PROCESSOR IMPLEMENTATION part3_VP.others
END part3_VP.others;
PROCESS part4
END part4;
PROCESS IMPLEMENTATION part4.others
END part4.others;
VIRTUAL PROCESSOR part4_VP
PROPERTIES
Deployment::Execution_Platform => AIR;
ARINC653::Partition_Identifier => 3;
END part4_VP;
VIRTUAL PROCESSOR IMPLEMENTATION part4_VP.others
END part4_VP.others;
MEMORY main_memory
END main_memory;
MEMORY IMPLEMENTATION main_memory.others
SUBCOMPONENTS
part1_Segment : MEMORY deploymentview::DV::partition_memory.others {
Base_Address => 16#200000#;
Memory_Size => 16#200000#Bytes;
Byte_Count => 16#200000#;
};
part2_Segment : MEMORY deploymentview::DV::partition_memory.others {
Base_Address => 16#500000#;
Memory_Size => 16#200000#Bytes;
Byte_Count => 16#200000#;
};
part3_Segment : MEMORY deploymentview::DV::partition_memory.others {
Base_Address => 16#700000#;
Memory_Size => 16#200000#Bytes;
Byte_Count => 16#200000#;
};
part4_Segment : MEMORY deploymentview::DV::partition_memory.others {
Base_Address => 16#900000#;
Memory_Size => 16#200000#Bytes;
Byte_Count => 16#200000#;
};
END main_memory.others;
END deploymentview::DV::Node1;
PACKAGE deploymentview::DV
PUBLIC
WITH interfaceview::IV::hello;
WITH interfaceview::IV::read;
WITH interfaceview::IV::Function1;
WITH interfaceview::IV::Function2;
WITH ocarina_processors_leon;
WITH ARINC653;
WITH deploymentview::DV::Node1;
WITH Taste;
WITH Deployment;
WITH interfaceview::IV;
WITH TASTE_DV_Properties;
MEMORY partition_memory
END partition_memory;
MEMORY IMPLEMENTATION partition_memory.others
END partition_memory.others;
SYSTEM Node1
END Node1;
SYSTEM IMPLEMENTATION Node1.others
SUBCOMPONENTS
IV_hello : SYSTEM interfaceview::IV::hello::hello.others {
Taste::FunctionName => "hello";
};
part1 : PROCESS deploymentview::DV::Node1::part1.others {
Taste::coordinates => "110727 64773 138242 76218";
Deployment::Port_Number => 0;
};
part1_VP : VIRTUAL PROCESSOR deploymentview::DV::Node1::part1_VP.others {
Scheduling_Protocol => (Posix_1003_Highest_Priority_First_Protocol);
ARINC653::DAL => LEVEL_A;
};
IV_read : SYSTEM interfaceview::IV::read::read.others {
Taste::FunctionName => "read";
};
part2 : PROCESS deploymentview::DV::Node1::part2.others {
Taste::coordinates => "110548 78423 139209 88029";
Deployment::Port_Number => 0;
};
part2_VP : VIRTUAL PROCESSOR deploymentview::DV::Node1::part2_VP.others {
Scheduling_Protocol => (Posix_1003_Highest_Priority_First_Protocol);
ARINC653::DAL => LEVEL_A;
};
IV_Function1 : SYSTEM interfaceview::IV::Function1::Function1.others {
Taste::FunctionName => "Function1";
};
part3 : PROCESS deploymentview::DV::Node1::part3.others {
Taste::coordinates => "111857 89459 132523 99066";
Deployment::Port_Number => 0;
};
part3_VP : VIRTUAL PROCESSOR deploymentview::DV::Node1::part3_VP.others {
Scheduling_Protocol => (Posix_1003_Highest_Priority_First_Protocol);
ARINC653::DAL => LEVEL_A;
};
IV_Function2 : SYSTEM interfaceview::IV::Function2::Function2.others {
Taste::FunctionName => "Function2";
};
part4 : PROCESS deploymentview::DV::Node1::part4.others {
Taste::coordinates => "112859 101512 135861 114493";
Deployment::Port_Number => 0;
};
part4_VP : VIRTUAL PROCESSOR deploymentview::DV::Node1::part4_VP.others {
Scheduling_Protocol => (Posix_1003_Highest_Priority_First_Protocol);
ARINC653::DAL => LEVEL_A;
};
proc1 : PROCESSOR ocarina_processors_leon::leon3.AIR {
Taste::coordinates => "107288 59305 143724 118720";
};
main_memory : MEMORY deploymentview::DV::Node1::main_memory.others;
PROPERTIES
Taste::APLC_Binding => (reference (part1)) APPLIES TO IV_hello;
Actual_Processor_Binding => (reference (proc1)) APPLIES TO part1_VP;
Actual_Processor_Binding => (reference (part1_VP)) APPLIES TO part1;
Actual_Memory_Binding => (reference (main_memory.part1_Segment)) APPLIES TO part1;
Taste::APLC_Binding => (reference (part2)) APPLIES TO IV_read;
Actual_Processor_Binding => (reference (proc1)) APPLIES TO part2_VP;
Actual_Processor_Binding => (reference (part2_VP)) APPLIES TO part2;
Actual_Memory_Binding => (reference (main_memory.part2_Segment)) APPLIES TO part2;
Taste::APLC_Binding => (reference (part3)) APPLIES TO IV_Function1;
Actual_Processor_Binding => (reference (proc1)) APPLIES TO part3_VP;
Actual_Processor_Binding => (reference (part3_VP)) APPLIES TO part3;
Actual_Memory_Binding => (reference (main_memory.part3_Segment)) APPLIES TO part3;
Taste::APLC_Binding => (reference (part4)) APPLIES TO IV_Function2;
Actual_Processor_Binding => (reference (proc1)) APPLIES TO part4_VP;
Actual_Processor_Binding => (reference (part4_VP)) APPLIES TO part4;
Actual_Memory_Binding => (reference (main_memory.part4_Segment)) APPLIES TO part4;
ARINC653::Module_Major_Frame => 1000ms APPLIES TO proc1;
ARINC653::Module_Schedule => (
[ Partition => reference(part1_VP);
Duration => 200ms;
Periodic_Processing_Start => False; ],
[ Partition => reference(part3_VP);
Duration => 200ms;
Periodic_Processing_Start => False; ],
[ Partition => reference(part4_VP);
Duration => 200ms;
Periodic_Processing_Start => False; ],
[ Partition => reference(part2_VP);
Duration => 200ms;
Periodic_Processing_Start => False; ]
) APPLIES TO proc1;
END Node1.others;
SYSTEM deploymentview
END deploymentview;
SYSTEM IMPLEMENTATION deploymentview.others
SUBCOMPONENTS
Node1 : SYSTEM Node1.others {
Taste::coordinates => "102989 51494 145980 121545";
};
interfaceview : SYSTEM interfaceview::IV::interfaceview.others;
END deploymentview.others;
PROPERTIES
Taste::coordinates => "0 0 297000 210000";
Taste::version => "2.0";
Taste::interfaceView => "InterfaceView.aadl";
Taste::HWLibraries => ("../../../../tool-inst/share/ocarina/AADLv2/ocarina_components.aadl");
END deploymentview::DV;
---------------------------------------------------
-- AADL2.1
-- TASTE type interfaceview
--
-- generated code: do not edit
---------------------------------------------------
PACKAGE interfaceview::IV::hello
PUBLIC
WITH interfaceview::IV::read;
WITH Taste;
WITH DataView;
WITH TASTE_IV_Properties;
SUBPROGRAM PI_s
FEATURES
t : IN PARAMETER DataView::TASTE_Boolean {
Taste::encoding => NATIVE;
};
PROPERTIES
Taste::Associated_Queue_Size => 1;
END PI_s;
SUBPROGRAM IMPLEMENTATION PI_s.others
PROPERTIES
Compute_Execution_Time => 0 ms .. 2 ms;
END PI_s.others;
SUBPROGRAM RI_new
END RI_new;
SUBPROGRAM IMPLEMENTATION RI_new.others
END RI_new.others;
SYSTEM hello
FEATURES
PI_s : PROVIDES SUBPROGRAM ACCESS interfaceview::IV::hello::PI_s.others {
Taste::coordinates => "129130 47716";
Taste::RCMoperationKind => sporadic;
Taste::RCMperiod => 1000 ms;
Taste::Deadline => 5 ms;
Taste::InterfaceName => "s";
};
RI_new : REQUIRES SUBPROGRAM ACCESS interfaceview::IV::read::PI_new.others {
Taste::coordinates => "129130 58476";
Taste::RCMoperationKind => any;
Taste::InterfaceName => "new";
Taste::labelInheritance => "true";
};
PROPERTIES
Source_Language => (C);
Taste::Active_Interfaces => any;
END hello;
SYSTEM IMPLEMENTATION hello.others
END hello.others;
END interfaceview::IV::hello;
PACKAGE interfaceview::IV::read
PUBLIC
WITH interfaceview::IV::hello;
WITH Taste;
WITH DataView;
WITH TASTE_IV_Properties;
SUBPROGRAM PI_h
PROPERTIES
Taste::Associated_Queue_Size => 1;
END PI_h;
SUBPROGRAM IMPLEMENTATION PI_h.others
PROPERTIES
Compute_Execution_Time => 0 ms .. 3 ms;
END PI_h.others;
SUBPROGRAM RI_s
FEATURES
t : IN PARAMETER DataView::TASTE_Boolean {
Taste::encoding => NATIVE;
};
END RI_s;
SUBPROGRAM IMPLEMENTATION RI_s.others
END RI_s.others;
SUBPROGRAM PI_new
PROPERTIES
Taste::Associated_Queue_Size => 4;
END PI_new;
SUBPROGRAM IMPLEMENTATION PI_new.others
PROPERTIES
Compute_Execution_Time => 0 ms .. 0 ms;
END PI_new.others;
SYSTEM read
FEATURES
PI_h : PROVIDES SUBPROGRAM ACCESS interfaceview::IV::read::PI_h.others {
Taste::coordinates => "189601 53700";
Taste::RCMoperationKind => cyclic;
Taste::RCMperiod => 1000 ms;
Taste::Deadline => 10 ms;
Taste::InterfaceName => "h";
};
RI_s : REQUIRES SUBPROGRAM ACCESS interfaceview::IV::hello::PI_s.others {
Taste::coordinates => "154957 53700";
Taste::RCMoperationKind => any;
Taste::InterfaceName => "s";
Taste::labelInheritance => "true";
};
PI_new : PROVIDES SUBPROGRAM ACCESS interfaceview::IV::read::PI_new.others {
Taste::coordinates => "154957 65025";
Taste::RCMoperationKind => sporadic;
Taste::RCMperiod => 10 ms;
Taste::Deadline => 10 ms;
Taste::InterfaceName => "new";
};
PROPERTIES
Source_Language => (C);
Taste::Active_Interfaces => any;
END read;
SYSTEM IMPLEMENTATION read.others
END read.others;
END interfaceview::IV::read;
PACKAGE interfaceview::IV::Function1
PUBLIC
WITH interfaceview::IV::Function2;
WITH Taste;
WITH DataView;
WITH TASTE_IV_Properties;
SUBPROGRAM PI_cycl
PROPERTIES
Taste::Associated_Queue_Size => 1;
END PI_cycl;
SUBPROGRAM IMPLEMENTATION PI_cycl.others
PROPERTIES
Compute_Execution_Time => 0 ms .. 0 ms;
END PI_cycl.others;
SUBPROGRAM RI_t
END RI_t;
SUBPROGRAM IMPLEMENTATION RI_t.others
END RI_t.others;
SYSTEM Function1
FEATURES
PI_cycl : PROVIDES SUBPROGRAM ACCESS interfaceview::IV::Function1::PI_cycl.others {
Taste::coordinates => "153242 17605";
Taste::RCMoperationKind => cyclic;
Taste::RCMperiod => 10 ms;
Taste::Deadline => 0 ms;
Taste::InterfaceName => "cycl";
};
RI_t : REQUIRES SUBPROGRAM ACCESS interfaceview::IV::Function2::PI_t.others {
Taste::coordinates => "153242 29223";
Taste::RCMoperationKind => any;
Taste::InterfaceName => "t";
Taste::labelInheritance => "true";
};
PROPERTIES
Source_Language => (C);
Taste::Active_Interfaces => any;
END Function1;
SYSTEM IMPLEMENTATION Function1.others
END Function1.others;
END interfaceview::IV::Function1;
PACKAGE interfaceview::IV::Function2
PUBLIC
WITH Taste;
WITH DataView;
WITH TASTE_IV_Properties;
SUBPROGRAM PI_t
PROPERTIES
Taste::Associated_Queue_Size => 2;
END PI_t;
SUBPROGRAM IMPLEMENTATION PI_t.others
PROPERTIES
Compute_Execution_Time => 0 ms .. 0 ms;
END PI_t.others;
SYSTEM Function2
FEATURES
PI_t : PROVIDES SUBPROGRAM ACCESS interfaceview::IV::Function2::PI_t.others {
Taste::coordinates => "124920 25835";
Taste::RCMoperationKind => sporadic;
Taste::RCMperiod => 0 ms;
Taste::Deadline => 0 ms;
Taste::InterfaceName => "t";
};
PROPERTIES
Source_Language => (C);
Taste::Active_Interfaces => any;
END Function2;
SYSTEM IMPLEMENTATION Function2.others
END Function2.others;
END interfaceview::IV::Function2;
PACKAGE interfaceview::IV
PUBLIC
WITH interfaceview::IV::hello;
WITH interfaceview::IV::read;
WITH interfaceview::IV::Function1;
WITH interfaceview::IV::Function2;
WITH Taste;
WITH DataView;
WITH TASTE_IV_Properties;
SYSTEM interfaceview
PROPERTIES
Taste::dataView => ("DataView");
Taste::dataViewPath => ("DataView.aadl");
END interfaceview;
SYSTEM IMPLEMENTATION interfaceview.others
SUBCOMPONENTS
hello : SYSTEM interfaceview::IV::hello::hello.others {
Taste::coordinates => "94486 44566 129130 75746";
};
read : SYSTEM interfaceview::IV::read::read.others {
Taste::coordinates => "154957 48975 189601 77006";
};
Function1 : SYSTEM interfaceview::IV::Function1::Function1.others {
Taste::coordinates => "153242 13270 190585 40462";
};
Function2 : SYSTEM interfaceview::IV::Function2::Function2.others {
Taste::coordinates => "97180 11096 124920 34243";
};
CONNECTIONS
hello_PI_s_read_RI_s : SUBPROGRAM ACCESS hello.PI_s -> read.RI_s {
Taste::coordinates => "154957 53700 142043 53700 142043 47716 129130 47716";
};
read_PI_new_hello_RI_new : SUBPROGRAM ACCESS read.PI_new -> hello.RI_new {
Taste::coordinates => "129130 58476 142043 58476 142043 65025 154957 65025";
};
Function2_PI_t_Function1_RI_t : SUBPROGRAM ACCESS Function2.PI_t -> Function1.RI_t {
Taste::coordinates => "153242 29223 139081 29223 139081 25835 124920 25835";
};
END interfaceview.others;
PROPERTIES
Taste::dataView => ("DataView");
Taste::dataViewPath => ("DataView.aadl");
Taste::coordinates => "0 0 297000 210000";
Taste::version => "2.0";
END interfaceview::IV;
KAZOO=../../kazoo
all: test-parse
cp input_data/hello.c output/hello/C/src && \
cp input_data/read.c output/read/C/src && \
cd output && make air
test-parse: clean
$(KAZOO) --gw -p \
-o output \
--glue \
--no-stdlib \
--debug \
../common/libhw.aadl
gdb: clean
gdb --args $(KAZOO) --gw -p \
-o output \
--glue \
--no-stdlib \
../common/libhw.aadl \
--debug
clean:
rm -rf output
.PHONY: clean test-parse gdb
Build an AIR binary
make sure you have AIR installed and set:
export AIR=/path/to/air/air
export PATH=$AIR:$PATH
export RTEMS_MAKEFILE_PATH=$AIR/install/pos/rtems5/rtems5-install/sparc-rtems5/leon3
This source diff could not be displayed because it is too large. You can view the blob instead.
---------------------------------------------------
-- AADL2.2
-- TASTE type concurrencyview
--
-- generated code: do not edit
---------------------------------------------------
PROPERTY SET AI IS
Root_System : AADLSTRING
APPLIES TO(SYSTEM IMPLEMENTATION);
Disabled_Processing_Tools : LIST OF AADLSTRING
APPLIES TO(SYSTEM IMPLEMENTATION);
END AI;
PACKAGE concurrencyview::CV
PUBLIC
WITH AI;
WITH DataView;
WITH Arinc653;
WITH ocarina_processors_leon;
WITH deploymentview::DV::Node1;
PROCESSOR Node1_proc1_cv
EXTENDS ocarina_processors_leon::leon3
END Node1_proc1_cv;
PROCESSOR IMPLEMENTATION Node1_proc1_cv.final
EXTENDS ocarina_processors_leon::leon3.AIR
SUBCOMPONENTS
part1_VP : VIRTUAL PROCESSOR deploymentview::DV::Node1::part1_VP.others;
part2_VP : VIRTUAL PROCESSOR deploymentview::DV::Node1::part2_VP.others;
PROPERTIES
SCHEDULING_PROTOCOL => (POSIX_1003_Highest_Priority_First_Protocol) APPLIES TO part1_VP;
SCHEDULING_PROTOCOL => (POSIX_1003_Highest_Priority_First_Protocol) APPLIES TO part2_VP;
ARINC653::DAL => LEVEL_A APPLIES TO part1_VP;
ARINC653::DAL => LEVEL_A APPLIES TO part2_VP;
END Node1_proc1_cv.final;
PROCESS part1
EXTENDS deploymentview::DV::Node1::part1
FEATURES
INPORT_vt_hello_s_s : IN EVENT DATA PORT DataView::TASTE_Boolean_Buffer.impl;
END part1;
PROCESS IMPLEMENTATION part1.final
SUBCOMPONENTS
vt_hello_s : THREAD vt_hello_s_vt_hello_s.others;
hello_pi_s : SUBPROGRAM hello_pi_s.final;
CONNECTIONS
PORT INPORT_vt_hello_s_s -> vt_hello_s.INPORT_artificial_s;
END part1.final;
PROCESS part2
EXTENDS deploymentview::DV::Node1::part2
FEATURES
OUTPORT_vt_read_h_s : OUT EVENT DATA PORT DataView::TASTE_Boolean_Buffer.impl;
END part2;
PROCESS IMPLEMENTATION part2.final
SUBCOMPONENTS
vt_read_h : THREAD vt_read_h_vt_read_h.others;
read_pi_h : SUBPROGRAM read_pi_h.final;
CONNECTIONS
PORT vt_read_h.OUTPORT_s_vt -> OUTPORT_vt_read_h_s;
END part2.final;
SYSTEM deploymentview
END deploymentview;
SYSTEM IMPLEMENTATION deploymentview.final
SUBCOMPONENTS
part1 : PROCESS part1.final;
part2 : PROCESS part2.final;
Node1_proc1_cv : PROCESSOR Node1_proc1_cv.final;
Node1_main_memory : MEMORY deploymentview::DV::Node1::main_memory.others;
CONNECTIONS
part1_s_vt_read_h_conn_cv : PORT part2.OUTPORT_vt_read_h_s -> part1.INPORT_vt_hello_s_s;
PROPERTIES
AI::ROOT_SYSTEM => "generated";
ACTUAL_PROCESSOR_BINDING => (REFERENCE(Node1_proc1_cv.part1_VP)) APPLIES TO part1;
ACTUAL_PROCESSOR_BINDING => (REFERENCE(Node1_proc1_cv.part2_VP)) APPLIES TO part2;
ACTUAL_MEMORY_BINDING => (Reference(Node1_main_memory.part1_Segment)) APPLIES TO part1;
ACTUAL_MEMORY_BINDING => (Reference(Node1_main_memory.part2_Segment)) APPLIES TO part2;
ARINC653::MODULE_MAJOR_FRAME => 3000ms APPLIES TO Node1_proc1_cv;
ARINC653::MODULE_SCHEDULE => (
[PARTITION=>Reference(Node1_proc1_cv.part1_VP);Duration=>1600ms;PERIODIC_PROCESSING_START=>FALSE;],
[PARTITION=>Reference(Node1_proc1_cv.part2_VP);Duration=>1400ms;PERIODIC_PROCESSING_START=>FALSE;]
) APPLIES TO Node1_proc1_cv;
END deploymentview.final;
THREAD vt_hello_s_vt_hello_s
FEATURES
INPORT_artificial_s : IN EVENT DATA PORT DataView::TASTE_Boolean_Buffer.impl {
QUEUE_SIZE => 5;
};
END vt_hello_s_vt_hello_s;
THREAD IMPLEMENTATION vt_hello_s_vt_hello_s.others
CALLS
MyCalls : {
MyCall : SUBPROGRAM hello_pi_s;
};
PROPERTIES
DISPATCH_PROTOCOL => Sporadic;
PERIOD => 10ms;
DEADLINE => 5ms;
COMPUTE_EXECUTION_TIME => 0ms..2ms;
END vt_hello_s_vt_hello_s.others;
THREAD vt_read_h_vt_read_h
FEATURES
OUTPORT_s_vt : OUT EVENT DATA PORT DataView::TASTE_Boolean_Buffer.impl;
END vt_read_h_vt_read_h;
THREAD IMPLEMENTATION vt_read_h_vt_read_h.others
CALLS
MyCalls : {
MyCall : SUBPROGRAM read_pi_h;
};
PROPERTIES
DISPATCH_PROTOCOL => Periodic;
PERIOD => 100ms;
DEADLINE => 10ms;
COMPUTE_EXECUTION_TIME => 0ms..3ms;
END vt_read_h_vt_read_h.others;
SUBPROGRAM hello_pi_s
PROPERTIES
COMPUTE_EXECUTION_TIME => 2ms..2ms;
SOURCE_LANGUAGE => (C);
SOURCE_NAME => "hello_pi_s";
SOURCE_TEXT => ("hello/hello.c");
END hello_pi_s;
SUBPROGRAM IMPLEMENTATION hello_pi_s.final