Commit db06ad8f authored by Thanassis Tsiodras's avatar Thanassis Tsiodras

Merge remote-tracking branch 'POHIC-GitHub/master'

parents 1b65b4d4 85f8a696
......@@ -208,6 +208,7 @@ AC_OUTPUT([
examples/aadlv1/rma/Makefile
examples/aadlv1/sunseeker/Makefile
examples/aadlv2/Makefile
examples/aadlv2/code_coverage/Makefile
examples/aadlv2/cpp/Makefile
examples/aadlv2/d3.1.3-1/Makefile
examples/aadlv2/import/Makefile
......@@ -218,6 +219,7 @@ AC_OUTPUT([
examples/aadlv2/monitor/Makefile
examples/aadlv2/packet-store/Makefile
examples/aadlv2/file-store/Makefile
examples/aadlv2/latency/Makefile
examples/aadlv2/rma/Makefile
examples/aadlv2/some-types/Makefile
examples/aadlv2/some-types-stdint/Makefile
......
SUBDIRS = d3.1.3-1 ping rma sunseeker producer-consumer some-types \
some-types-stdint flight-mgmt import monitor lua cpp \
packet-store file-store
packet-store file-store latency code_coverage
SAMPLE_DIR = ${shell $(CYGPATH_U) '$(OCARINA_PREFIX)/examples/ocarina/polyorb-hi-c/aadlv2'}
......@@ -18,6 +18,5 @@ build-all:
check-all:
for dir in $(SUBDIRS); do \
($(MAKE) -C $${dir} check-all) || exit 1; \
done
($(MAKE) -C $${dir} check-all) || exit 1; \
done
C_FILES = $(srcdir)/some-types-stdint.c $(srcdir)/devicesconf.c
AADL_FILES = $(srcdir)/some_types_stdint.aadl $(srcdir)/software.aadl
SCENARIO_FILES = $(srcdir)/scenario.aadl $(srcdir)/scenario_local.aadl \
$(srcdir)/scenario_rtems.aadl
include $(srcdir)/../../Makefile.common
EXTRA_DIST = $(AADL_FILES) $(SCENARIO_FILES) $(C_FILES)
CLEANDIRS = some_types_stdint_impl some_types_local_rtems \
some_types_local_impl
#include <drivers/configuration/ip.h>
__po_hi_c_ip_conf_t pohidrv_device_a = { .devname = "eth0", .address = "127.0.0.1", .version = __po_hi_c_ipv4, .port = 1234};
__po_hi_c_ip_conf_t pohidrv_device_b = { .devname = "eth0", .address = "127.0.0.1", .version = __po_hi_c_ipv4, .port = 1235};
#!/bin/sh
for i in "$@"
do
case $i in
--output-dir-name=*)
OUTPUT_DIR="${i#*=}" #ONLY NAME OF DIR
shift # past argument=value
;;
*)
# unknown option
;;
esac
done
if [ -z "$OUTPUT_DIR" ]; then
OUTPUT_DIR=./gcov_output
else
OUTPUT_DIR=./$OUTPUT_DIR
fi
if (! test -d $OUTPUT_DIR )
then
echo "Missing path: $OUTPUT_DIR. Creating directory..."
mkdir $OUTPUT_DIR
fi
lcov -c -i -d . -o .coverage.base
lcov -c -d . -o .coverage.run
lcov -d . -a .coverage.base -a .coverage.run -o .coverage.total
genhtml --no-branch-coverage -o $OUTPUT_DIR .coverage.total
rm -f .coverage.base .coverage.run .coverage.total
Initialize global queue for task-id 0 ... port 0 (used_size=0,first=0) port 1 (used_size=0,first=0) ... done
Send value, emitter task 0, emitter port 0, emitter entity 0, destination ports :2 (entity=1) ... success ...
Send value, emitter task 0, emitter port 1, emitter entity 0, destination ports :3 (entity=2) ... success ...
Send value, emitter task 0, emitter port 0, emitter entity 0, destination ports :2 (entity=1) ... success ...
Send value, emitter task 0, emitter port 1, emitter entity 0, destination ports :3 (entity=2) ... success ...
Send value, emitter task 0, emitter port 0, emitter entity 0, destination ports :2 (entity=1) ... success ...
Send value, emitter task 0, emitter port 1, emitter entity 0, destination ports :3 (entity=2) ... success ...
Send value, emitter task 0, emitter port 0, emitter entity 0, destination ports :2 (entity=1) ... success ...
Send value, emitter task 0, emitter port 1, emitter entity 0, destination ports :3 (entity=2) ... success ...
Initialize global queue for task-id 0 ... port 0 (used_size=0,first=0) ... done
Initialize global queue for task-id 1 ... port 0 (used_size=0,first=0) ... done
Receiver initialization finished
Receive message
Receive message from node 0
Using raw protocol stack
Message deliveredReceived in event data port message for task 0, port 0
Receive message
Receive message from node 0
Using raw protocol stack
Message deliveredTask 0 get a value on port 0
Received in event data port message for task 1, port 0
Task 1 get a value on port 0
Receive message
Receive message from node 0
Using raw protocol stack
Message deliveredReceived in event data port message for task 0, port 0
Receive message
Receive message from node 0
Using raw protocol stack
Message deliveredReceived in event data port message for task 1, port 0
Task 0 get a value on port 0
Task 1 get a value on port 0
Receive message
Receive message from node 0
Using raw protocol stack
Message deliveredReceived in event data port message for task 0, port 0
Receive message
Receive message from node 0
Using raw protocol stack
Message deliveredReceived in event data port message for task 1, port 0
Task 0 get a value on port 0
Task 1 get a value on port 0
Receive message
Receive message from node 0
Using raw protocol stack
Message deliveredReceived in event data port message for task 0, port 0
Receive message
Receive message from node 0
Using raw protocol stack
Message deliveredReceived in event data port message for task 1, port 0
Task 0 get a value on port 0
Task 1 get a value on port 0
Receive message
Receive message from node 0
Using raw protocol stack
ERROR, 0 12
package Scenario
public
with Ocarina_Config;
with Ocarina_Library;
system some_types extends Ocarina_Library::Default_PolyORB_HI_C_Config
properties
Ocarina_Config::Timeout_Property => 10500ms;
Ocarina_Config::Referencial_Files =>
("node_a", "node_a.ref",
"node_b", "node_b.ref");
Ocarina_Config::AADL_Files +=>
("some_types_stdint.aadl", "software.aadl");
Ocarina_Config::Root_System_Name => "Some_Types_Stdint.Impl";
end some_types;
system implementation some_types.Impl
end some_types.Impl;
end scenario;
\ No newline at end of file
package Scenario
public
with Ocarina_Config;
with Ocarina_Library;
system some_types extends Ocarina_Library::Default_PolyORB_HI_C_Config
properties
Ocarina_Config::Referencial_Files =>
("node_a", "node_a.ref",
"node_b", "node_b.ref");
Ocarina_Config::AADL_Files +=>
("some_types_stdint.aadl", "software.aadl");
Ocarina_Config::Root_System_Name => "some_types_Local.impl";
end some_types;
system implementation some_types.Impl
end some_types.Impl;
end scenario;
\ No newline at end of file
package Scenario
public
with Ocarina_Config;
with Ocarina_Library;
system some_types extends Ocarina_Library::Default_PolyORB_HI_C_Config
properties
Ocarina_Config::Referencial_Files =>
("node_a", "node_a.ref",
"node_b", "node_b.ref");
Ocarina_Config::AADL_Files +=>
("some_types_stdint.aadl", "software.aadl");
Ocarina_Config::Root_System_Name => "some_types_Local.RTEMS";
end some_types;
system implementation some_types.Impl
end some_types.Impl;
end scenario;
\ No newline at end of file
package Software
public
with Data_Model;
with Base_Types;
----------
-- Data --
----------
data Boolean_Type extends Base_Types::Boolean
end Boolean_Type;
data Integer_Type extends Base_Types::Integer
end Integer_Type;
-----------------
-- Subprograms --
-----------------
subprogram Emit_Boolean
features
Data_Source : out parameter Boolean_Type;
properties
source_language => C;
source_name => "user_emit_boolean";
source_text => ("some-types-stdint.c");
end Emit_Boolean;
subprogram Receive_Boolean
features
Data_Sink : in parameter Boolean_Type;
properties
source_language => C;
source_name => "user_receive_boolean";
source_text => ("some-types-stdint.c");
end Receive_Boolean;
subprogram Emit_Integer
features
Data_Source : out parameter Integer_Type;
properties
source_language => C;
source_name => "user_emit_integer";
source_text => ("some-types-stdint.c");
end Emit_Integer;
subprogram Receive_Integer
features
Data_Sink : in parameter Integer_Type;
properties
source_language => C;
source_name => "user_receive_integer";
source_text => ("some-types-stdint.c");
end Receive_Integer;
--------------------------
-- Wrappers Subprograms --
--------------------------
subprogram Emitter_Wrapper
features
Boolean_Source : out parameter Boolean_Type;
Integer_Source : out parameter Integer_Type;
end Emitter_Wrapper;
subprogram implementation Emitter_Wrapper.Impl
calls
Mycalls: {
B_Spg : subprogram Emit_Boolean;
I_Spg : subprogram Emit_Integer;
};
connections
parameter B_Spg.Data_Source -> Boolean_Source;
parameter I_Spg.Data_Source -> Integer_Source;
end Emitter_Wrapper.Impl;
-------------
-- Threads --
-------------
thread Emitter
features
Boolean_Source : out event data port Boolean_Type;
Integer_Source : out event data port Integer_Type;
end Emitter;
thread implementation Emitter.Impl
calls
Mycalls: {
Emitter_Wrapper : subprogram Emitter_Wrapper.Impl;
};
connections
parameter Emitter_Wrapper.Boolean_Source -> Boolean_Source;
parameter Emitter_Wrapper.Integer_Source -> Integer_Source;
properties
Dispatch_Protocol => Periodic;
Period => 1000 Ms;
end Emitter.Impl;
thread Boolean_Receiver
features
Data_Sink : in event data port Boolean_Type;
end Boolean_Receiver;
thread implementation Boolean_Receiver.Impl
calls
Mycalls: {
B_Spg : subprogram Receive_Boolean;
};
connections
parameter Data_Sink -> B_Spg.Data_Sink;
properties
Dispatch_Protocol => Sporadic;
Period => 10 Ms;
end Boolean_Receiver.Impl;
thread Integer_Receiver
features
Data_Sink : in event data port Integer_Type;
end Integer_Receiver;
thread implementation Integer_Receiver.Impl
calls
Mycalls: {
I_Spg : subprogram Receive_Integer;
};
connections
parameter Data_Sink -> I_Spg.Data_Sink;
properties
Dispatch_Protocol => Sporadic;
Period => 10 Ms;
end Integer_Receiver.Impl;
end Software;
#include <stdio.h>
#include <stdint.h>
int16_t boolean_type_var = 0;
int32_t integer_type_var = 0;
void user_emit_boolean( int16_t* boolean)
{
if (boolean_type_var == 1)
{
boolean_type_var = 0;
}
else
{
boolean_type_var = 1;
}
*boolean = boolean_type_var;
printf ("Sending boolean : %d\n", *boolean);
}
void user_receive_boolean (int16_t boolean)
{
printf ("Receiving boolean : %d\n", boolean);
}
void user_emit_integer( int32_t* integer)
{
integer_type_var++;
*integer = integer_type_var;
printf ("Emetting integer : %d\n", *integer);
}
void user_receive_integer (int32_t integer)
{
printf ("Receiving integer : %d\n", integer);
}
package Some_types
public
with Software;
with Deployment;
with ocarina_drivers;
with ocarina_buses;
---------------
-- Processor --
---------------
processor the_processor
properties
Deployment::Execution_Platform => Native;
end the_processor;
---------------
-- Processes --
---------------
process A
features
Out_Boolean : out event data port Software::Boolean_Type;
Out_Integer : out event data port Software::Integer_Type;
end A;
process implementation A.Impl
subcomponents
Emitter_Thread : thread Software::Emitter.Impl;
connections
port Emitter_Thread.Boolean_Source -> Out_Boolean;
port Emitter_Thread.Integer_Source -> Out_Integer;
end A.Impl;
process B
features
In_Boolean : in event data port Software::Boolean_Type;
In_Integer : in event data port Software::Integer_Type;
end B;
process implementation B.Impl
subcomponents
Boolean_Rcv_Thread : thread Software::Boolean_Receiver.Impl;
Integer_Rcv_Thread : thread Software::Integer_Receiver.Impl;
connections
port In_Boolean -> Boolean_Rcv_Thread.Data_Sink;
port In_Integer -> Integer_Rcv_Thread.Data_Sink;
end B.Impl;
process singleProcess
end singleProcess;
process implementation singleProcess.impl
subcomponents
Emitter_Thread : thread Software::Emitter.Impl;
Boolean_Rcv_Thread : thread Software::Boolean_Receiver.Impl;
Integer_Rcv_Thread : thread Software::Integer_Receiver.Impl;
connections
port Emitter_Thread.Boolean_Source -> Boolean_Rcv_Thread.Data_Sink;
port Emitter_Thread.Integer_Source -> Integer_Rcv_Thread.Data_Sink;
end singleProcess.impl;
------------
-- System --
------------
system Some_Types_Stdint
end Some_Types_Stdint;
system implementation Some_Types_Stdint.Impl
subcomponents
Node_A : process A.Impl;
Node_B : process B.Impl;
Device_A : device ocarina_drivers::generic_sockets_ip.pohic
{Source_Text => ("devicesconf.c");};
Device_B : device ocarina_drivers::generic_sockets_ip.pohic
{Source_Text => ("devicesconf.c");};
CPU_A : processor the_processor;
CPU_B : processor the_processor;
the_bus : bus ocarina_buses::ip.i;
connections
bus access the_bus -> Device_A.link;
bus access the_bus -> Device_B.link;
port Node_A.Out_Boolean -> Node_B.In_Boolean
{Actual_Connection_Binding => (reference (the_bus));};
port Node_A.Out_Integer -> Node_B.In_Integer
{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 Some_Types_Stdint.Impl;
system Some_Types_local
end Some_Types_local;
system implementation Some_Types_local.impl
subcomponents
CPU_A: processor the_processor;
sometypesstdint: process singleProcess.impl;
properties
Actual_Processor_Binding => reference (CPU_A) applies to sometypesstdint;
end Some_Types_local.impl;
system implementation Some_Types_local.Xenomai
extends Some_Types_local.impl
properties
Deployment::Execution_Platform => linux32_xenomai_native applies to CPU_A;
end Some_Types_local.Xenomai;
system implementation Some_Types_local.RTEMS
extends Some_Types_local.impl
properties
Deployment::Execution_platform => LEON_RTEMS applies to CPU_A ;
end Some_Types_local.RTEMS;
end Some_Types;
USER_CFLAGS=-D__PO_HI_USE_GPROF
COVERAGE=gcov
C_FILES = $(srcdir)/functions.c
AADL_FILES = $(srcdir)/latency.aadl $(srcdir)/latencyevent.aadl \
$(srcdir)/latencyevent-original.aadl \
$(srcdir)/latency-original.aadl
SCENARIO_FILES = \
$(srcdir)/scenario_local.aadl \
$(srcdir)/scenario_rtems.aadl
include $(srcdir)/../../Makefile.common
EXTRA_DIST = $(AADL_FILES) $(SCENARIO_FILES) $(C_FILES)
CLEANDIRS =
system topsystem
properties
Ocarina_Config::AADL_Files =>
("latency.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;
Ocarina_Config::Use_Components_Library => true;
Ocarina_Config::Root_System_Name
package scenario
public
with Ocarina_Config;
with Ocarina_Library;
system topsystem extends Ocarina_Library::Default_PolyORB_HI_C_Config
properties
Ocarina_Config::AADL_Files =>
("latency.aadl");
Ocarina_Config::Root_System_Name
=> "topsystem.distributedallperiodicdelayed";
end topsystem;
end topsystem;
system implementation topsystem.distributedallperiodicdelayed
end topsystem.distributedallperiodicdelayed;
system implementation topsystem.distributedallperiodicdelayed
end topsystem.distributedallperiodicdelayed;
end scenario;
\ No newline at end of file
system topsystem
properties
Ocarina_Config::Timeout_Property => 1000ms;
Ocarina_Config::Use_Components_Library => true;
Ocarina_Config::AADL_Files =>
("latency.aadl");
Ocarina_Config::Generator => polyorb_hi_c;
package scenario
public
with Ocarina_Config;
with Ocarina_Library;
system topsystem extends Ocarina_Library::Default_PolyORB_HI_C_Config
properties
Ocarina_Config::AADL_Files =>
("latency.aadl");
Ocarina_Config::Root_System_Name => "topsystem.local";
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 topsystem;
end topsystem;
system implementation topsystem.distributedallperiodicdelayed
end topsystem.distributedallperiodicdelayed;
system implementation topsystem.distributedallperiodicdelayed
end topsystem.distributedallperiodicdelayed;
end scenario;
system topsystem
properties
Ocarina_Config::Timeout_Property => 1000ms;
Ocarina_Config::Use_Components_Library => true;
Ocarina_Config::AADL_Files =>
("latency.aadl");
Ocarina_Config::Generator => polyorb_hi_c;
Ocarina_Config::Root_System_Name => "topsystem.RTEMS";
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 topsystem;
package scenario
public
with Ocarina_Config;
system implementation topsystem.distributedallperiodicdelayed
end topsystem.distributedallperiodicdelayed;
system topsystem extends Ocarina_Library::Default_PolyORB_HI_C_Config
properties
Ocarina_Config::AADL_Files =>
("latency.aadl");
Ocarina_Config::Root_System_Name => "topsystem.RTEMS";
end topsystem;
system implementation topsystem.distributedallperiodicdelayed
end topsystem.distributedallperiodicdelayed;
end scenario;
......@@ -48,11 +48,11 @@
#define CONFIGURE_MAXIMUM_TASKS 20
#define CONFIGURE_MAXIMUM_POSIX_THREADS __PO_HI_NB_TASKS + 10
#define CONFIGURE_MAXIMUM_SEMAPHORES 20 // IRQ layer needs one semaphore
#define CONFIGURE_MAXIMUM_MESSAGE_QUEUES 20
#define CONFIGURE_MAXIMUM_SEMAPHORES 20 // GRSPW1 IRQ layer needs one semaphore
#define CONFIGURE_MAXIMUM_MESSAGE_QUEUES 20
#define CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS 32
#define CONFIGURE_MAXIMUM_DRIVERS 32
#define CONFIGURE_MAXIMUM_PERIODS 1
#define CONFIGURE_MAXIMUM_PERIODS 1
#define CONFIGURE_POSIX_INIT_THREAD_TABLE
......@@ -60,7 +60,11 @@
#define CONFIGURE_EXTRA_TASK_STACKS (40 * RTEMS_MINIMUM_STACK_SIZE)
#define CONFIGURE_POSIX_INIT_THREAD_STACK_SIZE (40 * RTEMS_MINIMUM_STACK_SIZE)
#define CONFIGURE_MICROSECONDS_PER_TICK RTEMS_MILLISECONDS_TO_MICROSECONDS(2)
#if defined (AIR_HYPERVISOR)
#define CONFIGURE_MICROSECONDS_PER_TICK 5000
#else
#define CONFIGURE_MICROSECONDS_PER_TICK RTEMS_MILLISECONDS_TO_MICROSECONDS(2)
#endif
/*****************************************************************************/
/* Driver Manager configuration for RTEMS 5 */
......@@ -93,22 +97,25 @@
#ifdef CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
#define CONFIGURE_DRIVER_AMBAPP_GAISLER_APBUART
#endif
#endif
void *POSIX_Init (void);
#define CONFIGURE_DRIVER_AMBAPP_GAISLER_SPW_ROUTER /* SpaceWire Router */
#define CONFIGURE_DRIVER_AMBAPP_GAISLER_GRSPW2 /* SpaceWire Packet driver */
#define CONFIGURE_DRIVER_AMBAPP_GAISLER_SPW_ROUTER /* SpaceWire Router */
#define CONFIGURE_DRIVER_AMBAPP_GAISLER_GRSPW2 /* SpaceWire Packet driver */
#ifdef __PO_HI_NEED_DRIVER_GRETH
#define CONFIGURE_DRIVER_AMBAPP_GAISLER_GRETH /* GRETH Driver enabled*/
#define CONFIGURE_DRIVER_PCI_GR_LEON4_N2X /* GR-CPCI-LEON4-N2X has two GRETH network MACs */
#define ENABLE_NETWORK
#endif
#ifdef __PO_HI_NEED_DRIVER_GRETH
#define CONFIGURE_DRIVER_AMBAPP_GAISLER_GRETH /* GRETH Driver enabled*/
#define CONFIGURE_DRIVER_PCI_GR_LEON4_N2X /* GR-CPCI-LEON4-N2X has two GRETH network MACs */
#define ENABLE_NETWORK
#endif
#endif /* defined(RTEMS_DRVMGR_STARTUP) && defined(LEON3) */
#endif /*GRLEON3 && RTEMS412*/
void *POSIX_Init (void);
#include <rtems/confdefs.h>
#if defined(RTEMS_DRVMGR_STARTUP) && defined(LEON3)
#include <drvmgr/drvmgr_confdefs.h>
/* config.c is directly provided by RCC1.3 and initialized drivers per
......@@ -116,6 +123,7 @@ void *POSIX_Init (void);
*/
#include "../src/config.c"
#endif /* defined(RTEMS_DRVMGR_STARTUP) && defined(LEON3) */
#endif /* RTEMS_POSIX */
......
......@@ -5,7 +5,7 @@
*
* For more informations, please visit http://taste.tuxfamily.org/wiki
*
* Copyright (C) 2007-2009 Telecom ParisTech, 2010-2017 ESA & ISAE.
* Copyright (C) 2007-2009 Telecom ParisTech, 2010-2018 ESA & ISAE.