Commit df758609 authored by julien.delange's avatar julien.delange

* initialize inter partitions port in xtratum



git-svn-id: https://tecsw.estec.esa.int/svn/taste/trunk/po-hi-c@2375 129961e7-ef38-4bb5-a8f7-c9a525a55882
parent c4c3016d
......@@ -11,26 +11,26 @@ public
process A
features
Out_Port : out event data port Software::Simple_Type;
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 -> Out_Port;
port Pinger.Data_Source -> Data_Source;
end A.Impl;
process B
features
In_Port : in event data port Software::Simple_Type;
Data_Sink : 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;
port Data_Sink -> Ping_Me.Data_Sink;
end B.Impl;
memory myram
......@@ -69,7 +69,7 @@ subcomponents
mem : memory myram.sdram;
cpu : processor ocarina_processors_leon::leon3.xtratum_2partitions;
connections
port Node_A.Out_Port -> Node_B.In_Port;
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;
......
......@@ -132,5 +132,4 @@ __po_hi_request_t* __po_hi_gqueue_get_most_recent_value
__po_hi_port_t __po_hi_gqueue_get_destination (const __po_hi_task_id task_id, const __po_hi_local_port_t local_port, const uint8_t destination_number);
uint8_t __po_hi_gqueue_get_destinations_number (const __po_hi_task_id task_id, const __po_hi_local_port_t local_port);
#endif /* __PO_HI_GQUEUE_H__ */
......@@ -82,6 +82,23 @@ typedef double __po_hi_float64_t;
typedef unsigned char __po_hi_byte_t;
typedef enum
{
__PO_HI_IN_DATA_INTER_PROCESS = 0,
__PO_HI_OUT_DATA_INTER_PROCESS = 2,
__PO_HI_IN_DATA_INTRA_PROCESS = 4,
__PO_HI_OUT_DATA_INTRA_PROCESS = 6,
__PO_HI_IN_EVENT_DATA_INTER_PROCESS = 8,
__PO_HI_OUT_EVENT_DATA_INTER_PROCESS = 10,
__PO_HI_IN_EVENT_DATA_INTRA_PROCESS = 12,
__PO_HI_OUT_EVENT_DATA_INTRA_PROCESS = 14,
__PO_HI_IN_EVENT_INTER_PROCESS = 16,
__PO_HI_OUT_EVENT_INTER_PROCESS = 18,
__PO_HI_IN_EVENT_INTRA_PROCESS = 20,
__PO_HI_OUT_EVENT_INTRA_PROCESS = 22
}__po_hi_port_kind_t;
void __po_hi_copy_array (void* dst, void* src, __po_hi_uint16_t size);
#endif /* __PO_HI_TYPES_H_ */
......@@ -200,6 +200,67 @@ int __po_hi_initialize_early ()
*/
int __po_hi_initialize ()
{
#ifdef XM3_RTEMS_MODE
#include <deployment.h>
#include <po_hi_types.h>
#include <xm.h>
extern __po_hi_node_t __po_hi_mynode;
extern __po_hi_entity_t __po_hi_port_global_to_entity[__PO_HI_NB_PORTS];
extern __po_hi_node_t __po_hi_entity_table[__PO_HI_NB_ENTITIES];
extern __po_hi_port_kind_t __po_hi_port_global_kind[__PO_HI_NB_PORTS];
extern char* __po_hi_port_global_model_names[__PO_HI_NB_PORTS];
__po_hi_port_t tmp;
for (tmp = 0 ; tmp < __PO_HI_NB_PORTS ; tmp++)
{
if ((__po_hi_entity_table[__po_hi_port_global_to_entity[tmp]] == __po_hi_mynode) &&
( (__po_hi_port_global_kind[tmp] == __PO_HI_IN_DATA_INTER_PROCESS) ||
(__po_hi_port_global_kind[tmp] == __PO_HI_OUT_DATA_INTER_PROCESS) ||
(__po_hi_port_global_kind[tmp] == __PO_HI_IN_EVENT_DATA_INTER_PROCESS) ||
(__po_hi_port_global_kind[tmp] == __PO_HI_OUT_EVENT_DATA_INTER_PROCESS)
))
{
__DEBUGMSG ("[MAIN] Should init port %d\n", tmp);
switch (__po_hi_port_global_kind[tmp])
{
case __PO_HI_IN_DATA_INTER_PROCESS:
if (XM_create_sampling_port (__po_hi_port_global_model_names [tmp], 8, XM_DESTINATION_PORT) < 0)
{
__DEBUGMSG ("[MAIN] Sampling destination port %d cannot be created !\n", tmp);
}
break;
case __PO_HI_OUT_DATA_INTER_PROCESS:
if (XM_create_sampling_port (__po_hi_port_global_model_names [tmp], 8, XM_SOURCE_PORT) < 0)
{
__DEBUGMSG ("[MAIN] Sampling source port %d cannot be created !\n", tmp);
}
break;
case __PO_HI_IN_EVENT_DATA_INTER_PROCESS:
if (XM_create_queuing_port (__po_hi_port_global_model_names [tmp], 1, 8, XM_DESTINATION_PORT) < 0)
{
__DEBUGMSG ("[MAIN] Queuing destination port %d cannot be created !\n", tmp);
}
break;
case __PO_HI_OUT_EVENT_DATA_INTER_PROCESS:
if (XM_create_queuing_port (__po_hi_port_global_model_names [tmp], 1, 8, XM_SOURCE_PORT) < 0)
{
__DEBUGMSG ("[MAIN] Queuing source port %d cannot be created !\n", tmp);
}
break;
default:
__DEBUGMSG ("[MAIN] Port kind not handled at this time for port %d\n", tmp);
break;
}
}
}
#endif
return (__PO_HI_SUCCESS);
}
......
......@@ -71,7 +71,10 @@ int __po_hi_get_time (__po_hi_time_t* mytime)
tmp = _TOD_To_seconds (&current_time) * 1000000;
tmp += current_time.ticks * _TOD_Microseconds_per_tick;
mytime = tmp;
/*
* FIXME: should check this assignment
*/
*mytime = (__po_hi_time_t) tmp;
return (__PO_HI_SUCCESS);
#elif defined (XENO_NATIVE)
......
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