Commit 883d111c authored by bouazizrahma's avatar bouazizrahma
Browse files

support aadl.h and its macros

parent d7c64eba
......@@ -142,6 +142,24 @@ package body Ocarina.Backends.PO_HI_C.Runtime is
Set_Name (RED (E), Name);
end loop;
for E in RM_Id loop
Set_Str_To_Name_Buffer (RC_Id'Image (E));
Set_Str_To_Name_Buffer (Name_Buffer (4 .. Name_Len));
Apply_Casing_Rules (Name_Buffer (1 .. Name_Len));
while Name_Buffer (Name_Len) in '0' .. '9'
or else Name_Buffer (Name_Len) = '_'
loop
Name_Len := Name_Len - 1;
end loop;
Name := Name_Find;
Name := To_Upper (Name);
RED (E) := New_Node (K_Defining_Identifier);
Set_Name (RED (E), Name);
end loop;
for E in RH_Id loop
Set_Str_To_Name_Buffer (RH_Id'Image (E));
Set_Str_To_Name_Buffer (Name_Buffer (4 .. Name_Len));
......
......@@ -54,7 +54,8 @@ package Ocarina.Backends.PO_HI_C.Runtime is
RH_Types, -- the types header
RH_Marshallers, -- the marshallers header
RH_Subprograms, -- the subprograms
RH_Deployment);
RH_Deployment,
RH_AADL);
-- Runtime Entities
......@@ -255,7 +256,11 @@ package Ocarina.Backends.PO_HI_C.Runtime is
RE_Node_Addr, -- __po_hi_node_addr
RE_Entity_Table, -- __po_hi_entity_table
RE_Port_Global_Model_Names, -- __po_hi_port_global_model_names
RE_Port_Global_To_Local -- __po_hi_port_global_to_local
RE_Port_Global_To_Local, -- __po_hi_port_global_to_local
RE_Local_Port, -- LOCAL_PORT
RE_PORT_VARIABLE, -- PORT_VARIABLE
RE_REQUEST_PORT -- REQUEST_PORT
);
-- Runtime types
......@@ -264,6 +269,7 @@ package Ocarina.Backends.PO_HI_C.Runtime is
subtype RC_Id is RE_Id range RE_Default_Priority .. RE_SUCCESS;
subtype RF_Id is RE_Id range RE_Null .. RE_Wait_For_Tasks;
subtype RV_Id is RE_Id range RE_Operation_Names .. RE_Port_Global_To_Local;
subtype RM_Id is RE_Id range RE_Local_Port .. RE_REQUEST_PORT;
RE_Header_Table : constant array (RE_Id) of RH_Id :=
(RE_Null => RH_Null,
......@@ -469,7 +475,12 @@ package Ocarina.Backends.PO_HI_C.Runtime is
RE_Node_Addr => RH_Deployment,
RE_Entity_Table => RH_Deployment,
RE_Port_Global_Model_Names => RH_Deployment,
RE_Port_Global_To_Local => RH_Deployment);
RE_Port_Global_To_Local => RH_Deployment,
RE_Local_Port => RH_AADL,
RE_PORT_VARIABLE => RH_AADL,
RE_REQUEST_PORT => RH_AADL
);
procedure Initialize;
procedure Reset;
......
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