Commit 98724ad5 authored by julien.delange's avatar julien.delange
Browse files

* po-hi-c/include/po_hi_task.h

   - Handle the Xenomai POSIX target

 * po-hi-c/share/make/Makefile.linux32-xenomai-native
   po-hi-c/share/make/Makefile.common
   po-hi-c/share/make/Makefile.am
   po-hi-c/share/make/Makefile.linux32-xenomai-posix
   - Integration of Xenomai POSIX skin in pohic

 * po-hi-c/examples/aadlv2/rma/rma-xenomai-native.aadl
   po-hi-c/examples/aadlv2/rma/scenario-xenomai-posix.aadl
   po-hi-c/examples/aadlv2/rma/scenario-xenomai-native.aadl
   po-hi-c/examples/aadlv2/ping/ping-local-xenomai-posix.aadl
   po-hi-c/examples/aadlv2/ping/scenario-local-xenomai-posix.aadl
   - Add some examples to test the xenomai POSIX target






git-svn-id: https://tecsw.estec.esa.int/svn/taste/trunk/po-hi-c@2198 129961e7-ef38-4bb5-a8f7-c9a525a55882
parent c77e70dd
package PING_Local
public
with Software;
with Deployment;
---------------
-- Processor --
---------------
processor the_processor
properties
Deployment::Execution_Platform => linux32_xenomai_native;
end the_processor;
processor implementation the_processor.Impl
properties
Scheduling_Protocol => (Posix_1003_Highest_Priority_First_Protocol);
Priority_Range => 0 .. 255;
end the_processor.Impl;
---------------
-- Processes --
---------------
process A
end A;
process implementation A.Impl
subcomponents
Pinger : thread Software::P.Impl;
Ping_Me : thread Software::Q.Impl;
connections
port Pinger.Data_Source -> Ping_Me.Data_Sink;
end A.Impl;
------------
-- System --
------------
system PING
end PING;
system implementation PING.Local
subcomponents
Node_A : process A.Impl
{Deployment::Channel_Address => 2;
Deployment::Process_Id => 1200;};
CPU : processor the_processor.Impl;
properties
actual_processor_binding => (reference (CPU)) applies to Node_A;
end PING.Local;
end PING_Local;
package PING_Local
public
with Software;
with Deployment;
---------------
-- Processor --
---------------
processor the_processor
properties
Deployment::Execution_Platform => linux32_xenomai_posix;
end the_processor;
processor implementation the_processor.Impl
properties
Scheduling_Protocol => (Posix_1003_Highest_Priority_First_Protocol);
Priority_Range => 0 .. 255;
end the_processor.Impl;
---------------
-- Processes --
---------------
process A
end A;
process implementation A.Impl
subcomponents
Pinger : thread Software::P.Impl;
Ping_Me : thread Software::Q.Impl;
connections
port Pinger.Data_Source -> Ping_Me.Data_Sink;
end A.Impl;
------------
-- System --
------------
system PING
end PING;
system implementation PING.Local
subcomponents
Node_A : process A.Impl
{Deployment::Channel_Address => 2;
Deployment::Process_Id => 1200;};
CPU : processor the_processor.Impl;
properties
actual_processor_binding => (reference (CPU)) applies to Node_A;
end PING.Local;
end PING_Local;
......@@ -42,14 +42,20 @@ end segment;
memory implementation segment.i
end segment.i;
memory implementation myram.i
memory implementation myram.stram
properties
Base_Address => 40000000;
Byte_Count => 4194304;
end myram.stram;
memory implementation myram.sdram
subcomponents
segment1 : memory segment.i;
segment2 : memory segment.i;
segment1 : memory segment.i {Base_Address => 60000000; Byte_Count => 131072;};
segment2 : memory segment.i {Base_Address => 60020000; Byte_Count => 131072;};
properties
Base_Address => 16000;
Byte_Count => 4000;
end myram.i;
Base_Address => 60000000;
Byte_Count => 134217728;
end myram.sdram;
------------
-- System --
......@@ -62,8 +68,9 @@ system implementation PING.Impl
subcomponents
Node_A : process A.Impl;
Node_B : process B.Impl;
mem : memory myram.i;
cpu : processor ocarina_processors_leon::leon3.xtratum_2partitions;
memst : memory myram.stram;
mem : memory myram.sdram;
cpu : processor ocarina_processors_leon::leon3.xtratum_2partitions;
connections
port Node_A.Out_Port -> Node_B.In_Port;
properties
......
system ping
properties
Ocarina_Config::Timeout_Property => 4000ms;
Ocarina_Config::Referencial_Files =>
("node_a", "node_a.ref");
Ocarina_Config::AADL_Files =>
("ping-local-xenomai-native.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::Cheddar_Properties));
Ocarina_Config::AADL_Version => AADLv2;
end ping;
system implementation ping.impl
end ping.impl;
system ping
properties
Ocarina_Config::Timeout_Property => 4000ms;
Ocarina_Config::Referencial_Files =>
("node_a", "node_a.ref");
Ocarina_Config::AADL_Files =>
("ping-local-xenomai-posix.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::Cheddar_Properties));
Ocarina_Config::AADL_Version => AADLv2;
end ping;
system implementation ping.impl
end ping.impl;
-- This AADL model illustrates how to conduct schedulability analysis
-- using Cheddar, and then code generation of periodic tasks.
--
-- Two periodic tasks run in parrallel, without interaction. Tasks
-- parameters allows RMA analysis
--
-- $Id: rma.aadl 370 2007-04-23 14:54:41Z hugues $
package RMAAadl
public
with Deployment;
-----------------
-- Subprograms --
-----------------
subprogram Hello_Spg_1
properties
source_language => C;
source_name => "user_Hello_Spg_1";
source_text => ("hello.c");
end Hello_Spg_1;
subprogram Hello_Spg_2
properties
source_language => C;
source_name => "user_Hello_Spg_2";
source_text => ("hello.c");
end Hello_Spg_2;
-------------
-- Threads --
-------------
thread Task
end Task;
thread implementation Task.impl_1
calls
Mycalls: {
P_Spg : subprogram Hello_Spg_1;
};
properties
Dispatch_Protocol => periodic;
Period => 1000ms;
Compute_Execution_time => 0 ms .. 3 ms;
Deadline => 1000 ms;
end Task.impl_1;
thread implementation Task.impl_2
calls
Mycalls: {
P_Spg : subprogram Hello_Spg_2;
};
properties
Dispatch_Protocol => periodic;
Period => 500ms;
Compute_Execution_time => 0 ms .. 3 ms;
Deadline => 500 ms;
end Task.impl_2;
---------------
-- Processor --
---------------
processor cpurm
properties
Deployment::Execution_Platform => linux32_xenomai_native;
end cpurm;
processor implementation cpurm.impl
end cpurm.impl;
---------------
-- Processes --
---------------
process node_a
end node_a;
process implementation node_a.impl
subcomponents
Task1 : thread Task.impl_1;
Task2 : thread Task.impl_2;
end node_a.impl;
------------
-- System --
------------
system rma
end rma;
system implementation rma.impl
subcomponents
node_a : process node_a.impl;
cpu_rm : processor cpurm.impl;
properties
Actual_Processor_Binding => (reference (cpu_rm)) applies to node_a;
end rma.impl;
end RMAAadl;
-- This is a scenario file describing the AADL
-- application rma
-- $Id: scenario.aadl 6404 2009-04-22 10:10:04Z hugues $
system rma
properties
Ocarina_Config::Timeout_Property => 4000ms;
Ocarina_Config::Referencial_Files =>
("node_a", "node_a.ref");
Ocarina_Config::AADL_Files =>
("rma-xenomai-native.aadl");
Ocarina_Config::Generator => polyorb_hi_c;
Ocarina_Config::Needed_Property_Sets =>
(value (Ocarina_Config::Data_Model),
value (Ocarina_Config::Deployment),
value (Ocarina_Config::Cheddar_Properties));
Ocarina_Config::AADL_Version => AADLv2;
end rma;
system implementation rma.Impl
end rma.Impl;
-- This is a scenario file describing the AADL
-- application rma
-- $Id: scenario.aadl 6404 2009-04-22 10:10:04Z hugues $
system rma
properties
Ocarina_Config::Timeout_Property => 4000ms;
Ocarina_Config::Referencial_Files =>
("node_a", "node_a.ref");
Ocarina_Config::AADL_Files =>
("rma-xenomai-posix.aadl");
Ocarina_Config::Generator => polyorb_hi_c;
Ocarina_Config::Needed_Property_Sets =>
(value (Ocarina_Config::Data_Model),
value (Ocarina_Config::Deployment),
value (Ocarina_Config::Cheddar_Properties));
Ocarina_Config::AADL_Version => AADLv2;
end rma;
system implementation rma.Impl
end rma.Impl;
......@@ -15,7 +15,7 @@
* Define some values that are dependant of the
* underlying executive.
*/
#if defined(POSIX)
#if defined(POSIX) || defined (XENO_POSIX)
#include <stdlib.h>
#include <stdio.h>
#define __PO_HI_MAIN_NAME main
......@@ -39,7 +39,7 @@
#if defined(POSIX) || defined (RTEMS_POSIX)
#if defined(POSIX) || defined (RTEMS_POSIX) || defined (XENO_POSIX)
#include <semaphore.h>
#include <po_hi_time.h>
#include <pthread.h>
......
......@@ -4,6 +4,8 @@ EXTRA_DIST=$(srcdir)/Makefile.common \
$(srcdir)/Makefile.leon.ork \
$(srcdir)/Makefile.leon.rtems \
$(srcdir)/Makefile.linux32 \
$(srcdir)/Makefile.linux32-xenomai-native \
$(srcdir)/Makefile.linux32-xenomai-posix \
$(srcdir)/Makefile.linux64 \
$(srcdir)/Makefile.x86.rtems \
$(srcdir)/Makefile.x86.linuxtaste \
......
......@@ -258,7 +258,7 @@ $(BINARY): generate-asn1-deployment target-objects check-rtems compile-po-hi $(U
endif
ifeq ($(TARGET), $(filter $(TARGET), native linux32 linux64))
ifeq ($(TARGET), $(filter $(TARGET), native linux32 linux64 linux32-xenomai-posix linux32-xenomai-native))
$(BINARY): generate-asn1-deployment target-objects compile-po-hi $(USER_OBJS) $(GENERATED_OBJS) $(TARGET_OBJECTS)
$(CC) -o $(BINARY) $(EXTERNAL_OBJECTS) $(PO_HI_OBJS) $(GENERATED_OBJS) $(USER_OBJS) $(LDFLAGS)
endif
......
TARGET_CFLAGS = `xeno-config --skin native --cflags` -DXENO_NATIVE -D_POSIX_SOURCE -D_GNU_SOURCE
TARGET_LDFLAGS = `xeno-config --skin native --ldflags`
SIMULINK_LDFLAGS = -lm
CC = gcc
LD = ld
GPROF = gprof
ifdef USE_GPROF
TARGET_LDFLAGS+=-pg
endif
target-clean:
target-objects:
TARGET_CFLAGS = `xeno-config --skin posix --cflags` -DXENO_POSIX -D_POSIX_SOURCE -D_GNU_SOURCE
TARGET_LDFLAGS = `xeno-config --skin posix --ldflags`
SIMULINK_LDFLAGS = -lm
CC = gcc
LD = ld
GPROF = gprof
ifdef USE_GPROF
TARGET_LDFLAGS+=-pg
endif
target-clean:
target-objects:
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