Commit 9fa302ae authored by julien.delange's avatar julien.delange

remove extern variables to avoid unwanted modifications

add calls to __po_hi_get_entity_from_global_port instead
of using the global variable entity_from_ports



git-svn-id: https://tecsw.estec.esa.int/svn/taste/trunk/ocarina@553 129961e7-ef38-4bb5-a8f7-c9a525a55882
parent fad965d7
......@@ -227,37 +227,6 @@ package body Ocarina.Backends.PO_HI_C.Activity is
Bind_AADL_To_Job
(Identifier (Parent_Subcomponent (E)), N);
-- Declare some variables as extern variables
-- needed by the main_deliver function.
-- We declare them immediatly in the activity body
-- to have them at the top of the generated file.
N := Make_Extern_Entity_Declaration
(Make_Variable_Declaration
(Defining_Identifier =>
Make_Array_Declaration
(Defining_Identifier =>
RE (RE_Port_Global_To_Entity),
Array_Size =>
RE (RE_Nb_Ports)),
Used_Type =>
RE (RE_Entity_T)));
Append_Node_To_List
(N, CTN.Declarations (CTN.Activity_Source (U)));
N := Make_Extern_Entity_Declaration
(Make_Variable_Declaration
(Defining_Identifier =>
Make_Array_Declaration
(Defining_Identifier =>
RE (RE_Port_Global_To_Local),
Array_Size =>
RE (RE_Nb_Ports)),
Used_Type =>
RE (RE_Port_T)));
Append_Node_To_List
(N, CTN.Declarations (CTN.Activity_Source (U)));
end if;
-- Visit all devices attached to the parent system that
......@@ -1549,15 +1518,15 @@ package body Ocarina.Backends.PO_HI_C.Activity is
(Left_Expr => Make_Defining_Identifier (VN (V_Entity)),
Operator => Op_Equal,
Right_Expr =>
Make_Array_Declaration
(Defining_Identifier => RE (RE_Port_Global_To_Entity),
Array_Size =>
Make_Member_Designator
Make_Call_Profile
(RE (RE_Get_Entity_From_Global_Port),
Make_List_Id
(Make_Member_Designator
(Defining_Identifier =>
Make_Defining_Identifier (MN (M_Port)),
Make_Defining_Identifier (MN (M_Port)),
Is_Pointer => True,
Aggregate_Name =>
Make_Defining_Identifier (VN (V_Request)))));
Make_Defining_Identifier (VN (V_Request))))));
Append_Node_To_List (N, Statements);
-- Add the switch which redirect to local deliver functions
......
......@@ -106,6 +106,7 @@ package Ocarina.Backends.PO_HI_C.Runtime is
RE_Marshall_Array, -- __po_hi_marshall_array
RE_Unmarshall_Array, -- __po_hi_unmarshall_array
RE_Send_Output, -- __po_hi_send_output
RE_Get_Entity_From_Global_Port, -- __po_hi_get_entity_from_global_port
RE_Gqueue_Init, -- __po_hi_gqueue_init
RE_Gqueue_Store_In, -- __po_hi_gqueue_store_in
RE_Gqueue_Store_Out, -- __po_hi_gqueue_store_out
......@@ -249,6 +250,7 @@ package Ocarina.Backends.PO_HI_C.Runtime is
RE_Protected_Unlock => RH_PO_HI_Protected,
RE_Copy_Array => RH_PO_HI_Types,
RE_Send_Output => RH_Activity,
RE_Get_Entity_From_Global_Port => RH_PO_HI_Transport,
RE_Gqueue_Store_In => RH_PO_HI_Gqueue,
RE_Gqueue_Store_Out => RH_PO_HI_Gqueue,
RE_Gqueue_Send_Output => RH_PO_HI_Gqueue,
......
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