Commit 4b18824e authored by yoogx's avatar yoogx
Browse files

* Restore XtratuM example

parent 650c97ad
......@@ -9,11 +9,12 @@ SCENARIO_FILES = $(srcdir)/scenario.aadl \
$(srcdir)/scenario-local-xenomai-posix.aadl \
$(srcdir)/scenario-xenomai-posix.aadl \
$(srcdir)/scenario-local-xenomai-native.aadl \
$(srcdir)/scenario-local.aadl $(srcdir)/scenario-rtems.aadl
$(srcdir)/scenario-local.aadl $(srcdir)/scenario-rtems.aadl \
$(srcdir)/scenario-xtratum.aadl \
$(srcdir)/scenario-xtratum-conf.aadl
include $(srcdir)/../../Makefile.common
EXTRA_DIST = $(AADL_FILES) $(SCENARIO_FILES) $(C_FILES)
CLEANDIRS = ping_local ping_impl ping_ima ping_federated ping_rtems
......@@ -6,126 +6,133 @@ public
with ocarina_processors_leon;
---------------
-- Processes --
---------------
process A
features
Data_Source : out event data port Software::Simple_Type;
end A;
process implementation A.Impl
subcomponents
Pinger : thread Software::P.Impl;
connections
port Pinger.Data_Source -> Data_Source;
end A.Impl;
process B
features
Data_Sink : in event data port Software::Simple_Type;
end B;
subprogram do_ports_polling
properties
source_language => C;
source_name => "user_ports_polling";
source_text => ("xtratum_polling.c");
end do_ports_polling;
thread xtratum_poller
end xtratum_poller;
thread implementation xtratum_poller.i
calls
Mycalls: {
P_Spg : subprogram do_ports_polling;
};
properties
Dispatch_Protocol => Periodic;
Period => 10 Ms;
Deadline => 10 ms;
end xtratum_poller.i;
process implementation B.Impl
subcomponents
Ping_Me : thread Software::Q.Impl ;
poll_port : thread xtratum_poller.i;
connections
port Data_Sink -> Ping_Me.Data_Sink;
end B.Impl;
memory myram
end myram;
memory segment
end segment;
memory implementation segment.i
end segment.i;
memory implementation myram.stram
properties
Base_Address => 40000000;
Byte_Count => 4194304;
end myram.stram;
memory implementation myram.sdram
subcomponents
segment1 : memory segment.i {Base_Address => 40100000; Byte_Count => 524288;};
segment2 : memory segment.i {Base_Address => 40180000; Byte_Count => 524288;};
end myram.sdram;
processor leon3
end leon3;
virtual processor xtratum_partition
end xtratum_partition;
virtual processor implementation xtratum_partition.generic
end xtratum_partition.generic;
processor implementation leon3.xtratum
properties
Deployment::Execution_Platform => LEON3_XTRATUM;
end leon3.xtratum;
processor implementation leon3.xtratum_2partitions extends leon3.xtratum
subcomponents
part1 : virtual processor xtratum_partition.generic
{ Deployment::Execution_Platform => LEON3_XM3;};
part2 : virtual processor xtratum_partition.generic
{ Deployment::Execution_Platform => LEON3_XM3;};
properties
ARINC653::Partition_Slots => (20ms, 20ms);
ARINC653::Slots_Allocation => (reference (part1), reference (part2));
ARINC653::Module_Major_Frame => 40ms;
end leon3.xtratum_2partitions;
------------
-- System --
------------
system PING
end PING;
system implementation PING.IMA
subcomponents
Node_A : process A.Impl;
Node_B : process B.Impl;
memst : memory myram.stram;
mem : memory myram.sdram;
cpu : processor leon3.xtratum_2partitions;
connections
port Node_A.Data_Source -> Node_B.Data_Sink;
properties
actual_processor_binding => (reference (cpu.part1)) applies to Node_A;
actual_processor_binding => (reference (cpu.part2)) applies to Node_B;
actual_memory_binding => (reference (mem.segment1)) applies to Node_A;
actual_memory_binding => (reference (mem.segment2)) applies to Node_B;
end PING.IMA;
---------------
-- Processes --
---------------
process A
features
Data_Source : out event data port Software::Simple_Type;
end A;
process implementation A.Impl
subcomponents
Pinger : thread Software::P.Impl;
connections
port Pinger.Data_Source -> Data_Source;
end A.Impl;
process B
features
Data_Sink : in event data port Software::Simple_Type;
end B;
subprogram do_ports_polling
properties
source_language => C;
source_name => "user_ports_polling";
source_text => ("xtratum_polling.c");
end do_ports_polling;
thread xtratum_poller
end xtratum_poller;
thread implementation xtratum_poller.i
calls
Mycalls: {
P_Spg : subprogram do_ports_polling;
};
properties
Dispatch_Protocol => Periodic;
Period => 10 Ms;
Deadline => 10 ms;
end xtratum_poller.i;
process implementation B.Impl
subcomponents
Ping_Me : thread Software::Q.Impl ;
poll_port : thread xtratum_poller.i;
connections
port Data_Sink -> Ping_Me.Data_Sink;
end B.Impl;
memory myram
end myram;
memory segment
end segment;
memory implementation segment.i
end segment.i;
memory implementation myram.stram
properties
Base_Address => 40000000;
Byte_Count => 4194304;
end myram.stram;
memory implementation myram.sdram
subcomponents
segment1 : memory segment.i
{Base_Address => 40100000; Byte_Count => 524288;};
segment2 : memory segment.i
{Base_Address => 40180000; Byte_Count => 524288;};
end myram.sdram;
processor leon3
end leon3;
virtual processor xtratum_partition
end xtratum_partition;
virtual processor implementation xtratum_partition.generic
end xtratum_partition.generic;
processor implementation leon3.xtratum
properties
Deployment::Execution_Platform => LEON3_XTRATUM;
end leon3.xtratum;
processor implementation leon3.xtratum_2partitions extends leon3.xtratum
subcomponents
part1 : virtual processor xtratum_partition.generic
{ Deployment::Execution_Platform => LEON3_XM3;};
part2 : virtual processor xtratum_partition.generic
{ Deployment::Execution_Platform => LEON3_XM3;};
properties
ARINC653::Module_Schedule =>
( [Partition => reference (part1);
Duration => 20 ms;
Periodic_Processing_Start => true;],
[Partition => reference (part2);
Duration => 10 ms;
Periodic_Processing_Start => true;]
);
ARINC653::Module_Major_Frame => 40ms;
end leon3.xtratum_2partitions;
------------
-- System --
------------
system PING
end PING;
system implementation PING.IMA
subcomponents
Node_A : process A.Impl;
Node_B : process B.Impl;
memst : memory myram.stram;
mem : memory myram.sdram;
cpu : processor leon3.xtratum_2partitions;
connections
port Node_A.Data_Source -> Node_B.Data_Sink;
properties
actual_processor_binding => (reference (cpu.part1)) applies to Node_A;
actual_processor_binding => (reference (cpu.part2)) applies to Node_B;
actual_memory_binding => (reference (mem.segment1)) applies to Node_A;
actual_memory_binding => (reference (mem.segment2)) applies to Node_B;
end PING.IMA;
end PING;
system ping
properties
Ocarina_Config::Use_Components_Library => true;
Ocarina_Config::AADL_Files =>
("ping-xtratum.aadl" , "software.aadl");
Ocarina_Config::Generator => xtratum_configuration;
Ocarina_Config::Needed_Property_Sets =>
(value (Ocarina_Config::Data_Model),
value (Ocarina_Config::Deployment),
value (Ocarina_Config::ARINC653_Properties),
value (Ocarina_Config::Cheddar_Properties));
Ocarina_Config::AADL_Version => AADLv2;
end ping;
package scenario
public
with Ocarina_Config;
system implementation ping.impl
end ping.impl;
system ping extends Ocarina_Library::Default_PolyORB_HI_C_Config
properties
Ocarina_Config::AADL_Files +=>
("ping-xtratum.aadl" , "software.aadl", "leon.aadl");
Ocarina_Config::Generator => xtratum_configuration;
end ping;
system implementation ping.impl
end ping.impl;
end scenario;
package scenario
public
with Ocarina_Config;
system ping
system ping extends Ocarina_Library::Default_PolyORB_HI_C_Config
properties
Ocarina_Config::Timeout_Property => 4000ms;
Ocarina_Config::Use_Components_Library => true;
Ocarina_Config::AADL_Files =>
("ping-xtratum.aadl" , "software.aadl");
Ocarina_Config::Generator => polyorb_hi_c;
Ocarina_Config::Needed_Property_Sets =>
(value (Ocarina_Config::Data_Model),
value (Ocarina_Config::Deployment),
value (Ocarina_Config::ARINC653_Properties),
value (Ocarina_Config::Cheddar_Properties));
Ocarina_Config::AADL_Version => AADLv2;
Ocarina_Config::AADL_Files +=>
("ping-xtratum.aadl" , "software.aadl", "leon.aadl");
end ping;
system implementation ping.impl
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment