Commit 91bf3afe authored by jdelange's avatar jdelange

* ping/ping-xtratum.aadl

   ping/README-xtratum.txt
   - Fix Xtratum case-study
   - Provide instructions to reproduce the case study with tsim

 * ping/ping-leon-spw.aadl
   ping/scenario-leon-spw.aadl
   ping/devicesconf-leon-spw.c
   - Also provide a LEON/SpaceWire example




git-svn-id: https://tecsw.estec.esa.int/svn/taste/trunk/po-hi-c@3315 129961e7-ef38-4bb5-a8f7-c9a525a55882
parent 93b78cc4
* Set the correct RTEMS environment
For example:
- export RTEMS_MAKEFILE_PATH=~/local/packages/rtems-xtratum
- export PATH=~/local/packages/rtems-xtratum/bin:$PATH
* Set the XTRATUM PATH environment
- export XTRATUM_PATH=/opt/xm3.1-eval/xm/
- export XAL_PATH=/opt/xm3.1-eval/xal
* To run/execute:
- tsim-leon3 -mmu resident_software
#include <drivers/configuration/spacewire.h>
__po_hi_c_spacewire_conf_t pohidrv_device_a = {
.devname = "/dev/grspwrasta0",
.nodeaddr = 22
};
__po_hi_c_spacewire_conf_t pohidrv_device_b = {
.devname = "/dev/grspwrasta0",
.nodeaddr = 22
};
-- This model completes the PING example by adding deployment
-- information.
--
-- In this deployment, two nodes are defined, one task per node.
--
-- $Id: ping.aadl 401 2007-06-07 15:04:01Z hugues $
package PING
public
with Software;
with Deployment;
with ocarina_drivers;
with ocarina_processors_leon;
with ocarina_buses;
---------
-- Bus --
---------
bus Ethernet_Bus
properties
Deployment::Transport_API => BSD_Sockets;
end Ethernet_Bus;
---------------
-- Processes --
---------------
process A
features
Out_Port : out event data port Software::Simple_Type;
end A;
process implementation A.Impl
subcomponents
Pinger : thread Software::P.Impl;
connections
port Pinger.Data_Source -> Out_Port;
end A.Impl;
process B
features
In_Port : in event data port Software::Simple_Type;
end B;
process implementation B.Impl
subcomponents
Ping_Me : thread Software::Q.Impl;
connections
port In_Port -> Ping_Me.Data_Sink;
end B.Impl;
------------
-- System --
------------
system PING
end PING;
system implementation ping.federated
subcomponents
Node_A : process A.Impl;
Node_B : process B.Impl;
Device_A : device ocarina_drivers::rasta_spacewire.pohic
{Source_Text => ("devicesconf-leon-spw.c");};
Device_B : device ocarina_drivers::rasta_spacewire.pohic
{Source_Text => ("devicesconf-leon-spw.c");};
CPU_A : processor ocarina_processors_leon::leon.rtems;
CPU_B : processor ocarina_processors_leon::leon.rtems;
the_bus : bus ocarina_buses::spacewire.generic;
connections
bus access the_bus -> Device_A.spwaccess;
bus access the_bus -> Device_B.spwaccess;
port Node_A.Out_Port -> Node_B.In_Port
{Actual_Connection_Binding => (reference (the_bus));};
properties
actual_processor_binding => reference (CPU_A) applies to Node_A;
actual_processor_binding => reference (CPU_B) applies to Node_B;
actual_processor_binding => (reference (CPU_A)) applies to Device_A;
actual_processor_binding => (reference (CPU_B)) applies to Device_B;
end ping.federated;
end PING;
......@@ -2,6 +2,7 @@ package PING
public
with Software;
with Deployment;
with ARINC653;
with ocarina_processors_leon;
......@@ -16,7 +17,7 @@ end A;
process implementation A.Impl
subcomponents
Pinger : thread Software::P.Impl;
Pinger : thread Software::P.Impl{Deadline => 5000 ms ; Period => 5000 ms;};
connections
port Pinger.Data_Source -> Data_Source;
end A.Impl;
......@@ -43,14 +44,14 @@ Mycalls: {
};
properties
Dispatch_Protocol => Periodic;
Period => 100 Ms;
Period => 5000 Ms;
Compute_Execution_time => 0 ms .. 3 ms;
Deadline => 100 ms;
Deadline => 5000 ms;
end xtratum_poller.i;
process implementation B.Impl
subcomponents
Ping_Me : thread Software::Q.Impl;
Ping_Me : thread Software::Q.Impl {Deadline => 5000 ms ; Period => 5000 ms;};
poll_port : thread xtratum_poller.i;
connections
port Data_Sink -> Ping_Me.Data_Sink;
......@@ -79,6 +80,32 @@ subcomponents
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 => (5000ms, 5000ms);
ARINC653::Slots_Allocation => (reference (part1), reference (part2));
ARINC653::Module_Major_Frame => 10000ms;
end leon3.xtratum_2partitions;
------------
-- System --
------------
......@@ -86,13 +113,13 @@ end myram.sdram;
system PING
end PING;
system implementation PING.Impl
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 ocarina_processors_leon::leon3.xtratum_2partitions;
cpu : processor leon3.xtratum_2partitions;
connections
port Node_A.Data_Source -> Node_B.Data_Sink;
properties
......@@ -100,6 +127,6 @@ properties
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.Impl;
end PING.IMA;
end PING;
system ping
properties
Ocarina_Config::Timeout_Property => 4000ms;
Ocarina_Config::Use_Components_Library => true;
Ocarina_Config::Referencial_Files =>
("node_a", "node_a.ref",
"node_b", "node_b.ref");
Ocarina_Config::AADL_Files =>
("ping-leon-spw.aadl" , "software.aadl");
Ocarina_Config::Generator => polyorb_hi_c;
Ocarina_Config::Needed_Property_Sets =>
(value (Ocarina_Config::Data_Model),
value (Ocarina_Config::ARINC653_Properties),
value (Ocarina_Config::Deployment),
value (Ocarina_Config::Cheddar_Properties));
Ocarina_Config::AADL_Version => AADLv2;
end ping;
system implementation ping.impl
end ping.impl;
Markdown is supported
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