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

* ocarina/src/backends/ocarina-backends-po_hi_c-deployment.adb

   - Fix POK makefile to be able to compile IMA case studies

 * ocarina/src/backends/ocarina-backends-po_hi_c-runtime.ads
   ocarina/src/backends/ocarina-backends-pok_c-makefile.adb
   - Define symbols used by PolyORB-HI-C



git-svn-id: https://tecsw.estec.esa.int/svn/taste/trunk/ocarina@2410 129961e7-ef38-4bb5-a8f7-c9a525a55882
parent afa200f9
......@@ -77,6 +77,8 @@ package body Ocarina.Backends.PO_HI_C.Deployment is
Devices_Buses_Array : Node_Id;
Port_To_Devices : Node_Id;
Global_Port_Kind : Node_Id;
Global_Port_Queue_Size : Node_Id;
Global_Port_Data_Size : Node_Id;
function Is_Added (P : Node_Id; E : Node_Id) return Boolean;
function Added_Internal_Name (P : Node_Id; E : Node_Id) return Name_Id;
......@@ -1144,6 +1146,8 @@ package body Ocarina.Backends.PO_HI_C.Deployment is
Global_Port_Names := Make_Array_Values;
Global_Port_Model_Names := Make_Array_Values;
Global_Port_Kind := Make_Array_Values;
Global_Port_Queue_Size := Make_Array_Values;
Global_Port_Data_Size := Make_Array_Values;
Global_Port_To_Entity := Make_Array_Values;
Global_Port_To_Local := Make_Array_Values;
Entity_Enumerator_List := New_List (CTN.K_Enumeration_Literals);
......@@ -1454,6 +1458,27 @@ package body Ocarina.Backends.PO_HI_C.Deployment is
end if;
end if;
if Is_Data (F) then
Append_Node_To_List
(Get_Data_Size (Corresponding_Instance (F)),
CTN.Values (Global_Port_Data_Size));
end if;
if Get_Queue_Size (F) /= -1 then
Append_Node_To_List
(Make_Literal
(CV.New_Int_Value
(Unsigned_Long_Long
(Get_Queue_Size (F)), 0, 10)),
CTN.Values (Global_Port_Queue_Size));
else
Append_Node_To_List
(Make_Literal
(CV.New_Int_Value
(1, 0, 10)),
CTN.Values (Global_Port_Queue_Size));
end if;
N := Make_Expression
(Make_Defining_Identifier
(Map_C_Enumerator_Name (F)),
......@@ -1797,6 +1822,39 @@ package body Ocarina.Backends.PO_HI_C.Deployment is
Right_Expr =>
Global_Port_Kind);
Append_Node_To_List (N, CTN.Declarations (Current_File));
N := Make_Expression
(Left_Expr =>
Make_Variable_Declaration
(Defining_Identifier =>
Make_Array_Declaration
(Defining_Identifier =>
RE (RE_Port_Global_Data_Size),
Array_Size =>
RE (RE_Nb_Ports)),
Used_Type =>
RE (RE_Uint32_T)),
Operator => Op_Equal,
Right_Expr =>
Global_Port_Data_Size);
Append_Node_To_List (N, CTN.Declarations (Current_File));
N := Make_Expression
(Left_Expr =>
Make_Variable_Declaration
(Defining_Identifier =>
Make_Array_Declaration
(Defining_Identifier =>
RE (RE_Port_Global_Queue_Size),
Array_Size =>
RE (RE_Nb_Ports)),
Used_Type =>
RE (RE_Uint32_T)),
Operator => Op_Equal,
Right_Expr =>
Global_Port_Queue_Size);
Append_Node_To_List (N, CTN.Declarations (Current_File));
end if;
if Present (Backend_Node (Identifier (S))) and then
......
......@@ -228,6 +228,8 @@ package Ocarina.Backends.PO_HI_C.Runtime is
RE_Port_Global_To_Device, -- __po_hi_port_global_to_device
RE_Port_Global_Names, -- __po_hi_port_global_names
RE_Port_Global_Kind, -- __po_hi_port_global_kind
RE_Port_Global_Queue_Size, -- __po_hi_port_global_queue_size
RE_Port_Global_Data_Size, -- __po_hi_port_global_data_size
RE_Mynode, -- __po_hi_mynode
RE_Node_Port, -- __po_hi_node_port
RE_Node_Addr, -- __po_hi_node_addr
......@@ -417,6 +419,8 @@ package Ocarina.Backends.PO_HI_C.Runtime is
RE_Port_Global_To_Entity => RH_Deployment,
RE_Port_Global_To_Device => RH_Deployment,
RE_Port_Global_Names => RH_Deployment,
RE_Port_Global_Queue_Size => RH_Deployment,
RE_Port_Global_Data_Size => RH_Deployment,
RE_Port_Global_Kind => RH_Deployment,
RE_Mynode => RH_Deployment,
RE_Node_Port => RH_Deployment,
......
......@@ -228,11 +228,11 @@ package body Ocarina.Backends.POK_C.Makefile is
if N /= No_Name then
Handle_Source_File (N);
else
for J in Source_Files'Range loop
Handle_Source_File (Source_Files (J));
end loop;
end if;
for J in Source_Files'Range loop
Handle_Source_File (Source_Files (J));
end loop;
end Visit_Subprogram_Instance;
---------------------------
......
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