Commit 7216fb00 authored by Thanassis Tsiodras's avatar Thanassis Tsiodras
Browse files
parents 76863cae 14374647
......@@ -34,6 +34,13 @@ public
Data_Model::Dimension => (500_000);
end Array_Type;
data Bounded_Array_Type
properties
Data_Model::Data_Representation => Bounded_Array;
Data_Model::Base_Type => (classifier (Base_Types::Integer));
Data_Model::Dimension => (500);
end Bounded_Array_Type;
-----------------
-- Subprograms --
-----------------
......@@ -42,7 +49,7 @@ public
features
Data_Source : out parameter Boolean_Type;
properties
source_language => C;
source_language => (C);
source_name => "user_emit_boolean";
source_text => ("some-types.c");
end Emit_Boolean;
......@@ -51,7 +58,7 @@ public
features
Data_Sink : in parameter Boolean_Type;
properties
source_language => C;
source_language => (C);
source_name => "user_receive_boolean";
source_text => ("some-types.c");
end Receive_Boolean;
......@@ -60,7 +67,7 @@ public
features
Data_Source : out parameter Integer_Type;
properties
source_language => C;
source_language => (C);
source_name => "user_emit_integer";
source_text => ("some-types.c");
end Emit_Integer;
......@@ -69,7 +76,7 @@ public
features
Data_Sink : in parameter Integer_Type;
properties
source_language => C;
source_language => (C);
source_name => "user_receive_integer";
source_text => ("some-types.c");
end Receive_Integer;
......@@ -78,7 +85,7 @@ public
features
Data_Source : out parameter Struct_Type.impl;
properties
source_language => C;
source_language => (C);
source_name => "user_emit_struct";
source_text => ("some-types.c");
end Emit_Struct;
......@@ -87,7 +94,7 @@ public
features
Data_Sink : in parameter Struct_Type.impl;
properties
source_language => C;
source_language => (C);
source_name => "user_receive_struct";
source_text => ("some-types.c");
end Receive_Struct;
......@@ -96,30 +103,49 @@ public
features
Data_Source : out parameter Array_Type;
properties
source_language => C;
source_language => (C);
source_name => "user_emit_array";
source_text => ("some-types.c");
end Emit_Array;
subprogram Emit_Bounded_Array
features
Data_Source : out parameter Bounded_Array_Type;
properties
source_language => (C);
source_name => "user_emit_bounded_array";
source_text => ("some-types.c");
end Emit_Bounded_Array;
subprogram Receive_Array
features
Data_Sink : in parameter Array_Type;
properties
source_language => C;
source_language => (C);
source_name => "user_receive_array";
source_text => ("some-types.c");
end Receive_Array;
subprogram Receive_Bounded_Array
features
Data_Sink : in parameter Bounded_Array_Type;
properties
source_language => (C);
source_name => "user_receive_bounded_array";
source_text => ("some-types.c");
end Receive_Bounded_Array;
--------------------------
-- Wrappers Subprograms --
--------------------------
subprogram Emitter_Wrapper
features
Boolean_Source : out parameter Boolean_Type;
Integer_Source : out parameter Integer_Type;
Struct_Source : out parameter Struct_Type.Impl;
Array_Source : out parameter Array_Type;
Boolean_Source : out parameter Boolean_Type;
Integer_Source : out parameter Integer_Type;
Struct_Source : out parameter Struct_Type.Impl;
Array_Source : out parameter Array_Type;
Bounded_Array_Source : out parameter Bounded_Array_Type;
end Emitter_Wrapper;
subprogram implementation Emitter_Wrapper.Impl
......@@ -129,12 +155,14 @@ public
I_Spg : subprogram Emit_Integer;
S_Spg : subprogram Emit_Struct;
A_Spg : subprogram Emit_Array;
BA_Spg : subprogram Emit_Bounded_Array;
};
connections
parameter B_Spg.Data_Source -> Boolean_Source;
parameter I_Spg.Data_Source -> Integer_Source;
parameter S_Spg.Data_Source -> Struct_Source;
parameter A_Spg.Data_Source -> Array_Source;
parameter BA_Spg.Data_Source -> Bounded_Array_Source;
end Emitter_Wrapper.Impl;
-------------
......@@ -143,10 +171,11 @@ public
thread Emitter
features
Boolean_Source : out event data port Boolean_Type;
Integer_Source : out event data port Integer_Type;
Struct_Source : out event data port Struct_Type.Impl;
Array_Source : out event data port Array_Type;
Boolean_Source : out event data port Boolean_Type;
Integer_Source : out event data port Integer_Type;
Struct_Source : out event data port Struct_Type.Impl;
Array_Source : out event data port Array_Type;
Bounded_Array_Source : out event data port Bounded_Array_Type;
end Emitter;
thread implementation Emitter.Impl
......@@ -159,6 +188,8 @@ public
parameter Emitter_Wrapper.Integer_Source -> Integer_Source;
parameter Emitter_Wrapper.Struct_Source -> Struct_Source;
parameter Emitter_Wrapper.Array_Source -> Array_Source;
parameter Emitter_Wrapper.Bounded_Array_Source -> Bounded_Array_Source;
properties
Dispatch_Protocol => Periodic;
Period => 5000 ms;
......@@ -178,7 +209,7 @@ public
parameter Data_Sink -> B_Spg.Data_Sink;
properties
Dispatch_Protocol => Sporadic;
Period => 10 Ms;
Period => 10 ms;
end Boolean_Receiver.Impl;
thread Integer_Receiver
......@@ -195,7 +226,7 @@ public
parameter Data_Sink -> I_Spg.Data_Sink;
properties
Dispatch_Protocol => Sporadic;
Period => 10 Ms;
Period => 10 ms;
end Integer_Receiver.Impl;
thread Struct_Receiver
......@@ -212,7 +243,7 @@ public
parameter Data_Sink -> S_Spg.Data_Sink;
properties
Dispatch_Protocol => Sporadic;
Period => 10 Ms;
Period => 10 ms;
end Struct_Receiver.Impl;
thread Array_Receiver
......@@ -229,7 +260,24 @@ public
parameter Data_Sink -> S_Spg.Data_Sink;
properties
Dispatch_Protocol => Sporadic;
Period => 10 Ms;
Period => 10 ms;
end Array_Receiver.Impl;
thread Bounded_Array_Receiver
features
Data_Sink : in event data port Bounded_Array_Type;
end Bounded_Array_Receiver;
thread implementation Bounded_Array_Receiver.Impl
calls
Mycalls: {
S_Spg : subprogram Receive_Bounded_Array;
};
connections
parameter Data_Sink -> S_Spg.Data_Sink;
properties
Dispatch_Protocol => Sporadic;
Period => 10 ms;
end Bounded_Array_Receiver.Impl;
end Software;
......@@ -44,10 +44,18 @@ void user_emit_integer (int* integer)
void user_emit_array (software__array_type* data_source)
{
int i;
for (i = 0; i < 16384; i++)
for (i = 0; i < 16; i++)
(*data_source)[i]=i;
}
printf ("Emetting array\n");
void user_emit_bounded_array (software__bounded_array_type* data_source)
{
int i;
for (i = 0; i < 16; i++)
(*data_source).data[i]=i;
data_source->length = 16;
printf ("Emetting bounded array\n");
printf ("\n");
}
......@@ -86,3 +94,14 @@ void user_receive_array (software__array_type data)
printf (" OK \n");
fflush(stdout);
}
void user_receive_bounded_array (software__bounded_array_type data)
{
int i;
printf("Receive bounded array: %d", data.length);
for (i = 0; i < data.length; i++)
assert (data.data[i] == i);
printf (" OK \n");
fflush(stdout);
}
......@@ -20,10 +20,11 @@ public
process A
features
Out_Boolean : out event data port Software::Boolean_Type;
Out_Integer : out event data port Software::Integer_Type;
Out_Struct : out event data port Software::Struct_Type.Impl;
Out_Array : out event data port Software::Array_Type;
Out_Boolean : out event data port Software::Boolean_Type;
Out_Integer : out event data port Software::Integer_Type;
Out_Struct : out event data port Software::Struct_Type.Impl;
Out_Array : out event data port Software::Array_Type;
Out_Bounded_Array : out event data port Software::Bounded_Array_Type;
end A;
process implementation A.Impl
......@@ -34,14 +35,16 @@ public
port Emitter_Thread.Integer_Source -> Out_Integer;
port Emitter_Thread.Struct_Source -> Out_Struct;
port Emitter_Thread.Array_Source -> Out_Array;
port Emitter_Thread.Bounded_Array_Source -> Out_Bounded_Array;
end A.Impl;
process B
features
In_Boolean : in event data port Software::Boolean_Type;
In_Integer : in event data port Software::Integer_Type;
In_Struct : in event data port Software::Struct_Type.Impl;
in_array : in event data port Software::Array_Type;
In_Boolean : in event data port Software::Boolean_Type;
In_Integer : in event data port Software::Integer_Type;
In_Struct : in event data port Software::Struct_Type.Impl;
In_Array : in event data port Software::Array_Type;
In_Bounded_Array : in event data port Software::Bounded_Array_Type;
end B;
process implementation B.Impl
......@@ -50,11 +53,14 @@ public
Integer_Rcv_Thread : thread Software::Integer_Receiver.Impl;
Struct_Rcv_Thread : thread Software::Struct_Receiver.Impl;
Array_Rcv_Thread : thread Software::Array_Receiver.Impl;
Bounded_Array_Rcv_Thread : thread Software::Bounded_Array_Receiver.Impl;
connections
port In_Boolean -> Boolean_Rcv_Thread.Data_Sink;
port In_Integer -> Integer_Rcv_Thread.Data_Sink;
port In_Struct -> Struct_Rcv_Thread.Data_Sink;
port In_Array -> Array_Rcv_Thread.Data_Sink;
port In_Boolean -> Boolean_Rcv_Thread.Data_Sink;
port In_Integer -> Integer_Rcv_Thread.Data_Sink;
port In_Struct -> Struct_Rcv_Thread.Data_Sink;
port In_Array -> Array_Rcv_Thread.Data_Sink;
port In_Bounded_Array -> Bounded_Array_Rcv_Thread.Data_Sink;
end B.Impl;
process singleProcess
......@@ -62,16 +68,19 @@ public
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;
Struct_Rcv_Thread : thread Software::Struct_Receiver.Impl;
Array_Rcv_Thread : thread Software::Array_Receiver.Impl;
Emitter_Thread : thread Software::Emitter.Impl;
Boolean_Rcv_Thread : thread Software::Boolean_Receiver.Impl;
Integer_Rcv_Thread : thread Software::Integer_Receiver.Impl;
Struct_Rcv_Thread : thread Software::Struct_Receiver.Impl;
Array_Rcv_Thread : thread Software::Array_Receiver.Impl;
Bounded_Array_Rcv_Thread : thread Software::Bounded_Array_Receiver.Impl;
connections
port Emitter_Thread.Boolean_Source -> Boolean_Rcv_Thread.Data_Sink;
port Emitter_Thread.Integer_Source -> Integer_Rcv_Thread.Data_Sink;
port Emitter_Thread.Struct_Source -> Struct_Rcv_Thread.Data_Sink;
port Emitter_Thread.Array_Source -> Array_Rcv_Thread.Data_Sink;
port Emitter_Thread.Boolean_Source -> Boolean_Rcv_Thread.Data_Sink;
port Emitter_Thread.Integer_Source -> Integer_Rcv_Thread.Data_Sink;
port Emitter_Thread.Struct_Source -> Struct_Rcv_Thread.Data_Sink;
port Emitter_Thread.Array_Source -> Array_Rcv_Thread.Data_Sink;
port Emitter_Thread.Bounded_Array_Source -> Bounded_Array_Rcv_Thread.Data_Sink;
end singleProcess.impl;
------------
......@@ -92,17 +101,21 @@ public
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));};
{Actual_Connection_Binding => (reference (the_bus));};
port Node_A.Out_Integer -> Node_B.In_Integer
{Actual_Connection_Binding => (reference (the_bus));};
{Actual_Connection_Binding => (reference (the_bus));};
port Node_A.Out_Struct -> Node_B.In_Struct
{Actual_Connection_Binding => (reference (the_bus));};
{Actual_Connection_Binding => (reference (the_bus));};
port Node_A.Out_Array -> Node_B.In_Array
{Actual_Connection_Binding => (reference (the_bus));};
{Actual_Connection_Binding => (reference (the_bus));};
port Node_A.Out_Bounded_Array -> Node_B.In_Bounded_Array
{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;
......@@ -115,17 +128,15 @@ public
CPU_A: processor the_processor;
sometypes: process singleProcess.impl;
properties
Actual_Processor_Binding => reference (CPU_A) applies to sometypes;
Actual_Processor_Binding => (reference (CPU_A)) applies to sometypes;
end Some_Types.local;
system implementation Some_Types.Xenomai
extends Some_Types.local
system implementation Some_Types.Xenomai extends Some_Types.local
properties
Deployment::Execution_Platform => linux32_xenomai_native applies to CPU_A;
end Some_Types.Xenomai;
system implementation Some_Types.RTEMS
extends Some_Types.local
system implementation Some_Types.RTEMS extends Some_Types.local
properties
Deployment::Execution_platform => LEON_RTEMS applies to CPU_A ;
end Some_Types.RTEMS;
......
......@@ -5,7 +5,7 @@
*
* For more informations, please visit http://taste.tuxfamily.org/wiki
*
* Copyright (C) 2007-2009 Telecom ParisTech, 2010-2014 ESA & ISAE.
* Copyright (C) 2007-2009 Telecom ParisTech, 2010-2017 ESA & ISAE.
*/
#ifndef __PO_HI_TRANSPORT__
......@@ -134,7 +134,7 @@ char* __po_hi_get_device_naming (const __po_hi_device_id dev);
* The configuration data can be either a string of a more complex
* data structure, such as an instance of an ASN1 type.
*/
__po_hi_uint32_t* __po_hi_get_device_configuration (const __po_hi_device_id);
void* __po_hi_get_device_configuration (const __po_hi_device_id);
/*
......
......@@ -363,7 +363,7 @@ __po_hi_device_id __po_hi_get_device_from_port (const __po_hi_port_t port)
return __po_hi_port_to_device[port];
}
__po_hi_uint32_t* __po_hi_get_device_configuration (const __po_hi_device_id dev)
void* __po_hi_get_device_configuration (const __po_hi_device_id dev)
{
if (dev > __PO_HI_NB_DEVICES)
{
......
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