Commit 1e63a777 authored by Julien's avatar Julien

Merge branch 'master' of https://github.com/yoogx/ocarina

parents c659f261 9426eaee
robot.aadl:178:05: Warning: actual_processor_binding is not a list while the corresponding property name at deployment_properties.aadl:14:02 is a list.
robot.aadl:178:05: Warning: The value of actual_processor_binding has been converted into a list.
robot.aadl:179:05: Warning: actual_processor_binding is not a list while the corresponding property name at deployment_properties.aadl:14:02 is a list.
robot.aadl:179:05: Warning: The value of actual_processor_binding has been converted into a list.
robot.aadl:181:05: Warning: actual_processor_binding is not a list while the corresponding property name at deployment_properties.aadl:14:02 is a list.
robot.aadl:181:05: Warning: The value of actual_processor_binding has been converted into a list.
robot.aadl:183:05: Warning: actual_processor_binding is not a list while the corresponding property name at deployment_properties.aadl:14:02 is a list.
robot.aadl:183:05: Warning: The value of actual_processor_binding has been converted into a list.
robot.aadl:184:05: Warning: actual_processor_binding is not a list while the corresponding property name at deployment_properties.aadl:14:02 is a list.
robot.aadl:184:05: Warning: The value of actual_processor_binding has been converted into a list.
robot.aadl:170:05: warning: CPU1 references a component type
ocarina: Total: 0 error and 1 warning
robot.aadl:170:05: warning: CPU1 references a component type
......
......@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
-- Copyright (C) 2008-2009 Telecom ParisTech, 2010-2014 ESA & ISAE. --
-- Copyright (C) 2008-2009 Telecom ParisTech, 2010-2015 ESA & ISAE. --
-- --
-- Ocarina is free software; you can redistribute it and/or modify --
-- it under terms of the GNU General Public License as published by the --
......@@ -41,6 +41,7 @@ with Ocarina.Backends.Properties;
with Ocarina.Backends.C_Tree.Nutils;
with Ocarina.Backends.C_Tree.Nodes;
with Ocarina.Backends.C_Common.Mapping;
with Ocarina.Backends.PO_HI_C.Runtime;
package body Ocarina.Backends.C_Common.Subprograms is
......@@ -52,6 +53,8 @@ package body Ocarina.Backends.C_Common.Subprograms is
use Ocarina.Backends.C_Tree.Nutils;
use Ocarina.Backends.C_Common.Mapping;
package PHCR renames Ocarina.Backends.PO_HI_C.Runtime;
package AIN renames Ocarina.ME_AADL.AADL_Instances.Nodes;
package AINU renames Ocarina.ME_AADL.AADL_Instances.Nutils;
package CTN renames Ocarina.Backends.C_Tree.Nodes;
......@@ -896,6 +899,10 @@ package body Ocarina.Backends.C_Common.Subprograms is
Start_Recording_Handlings;
-- Include associated header file
Add_Include (PHCR.RH (PHCR.RH_Subprograms));
-- First, generate extern declaration for globvars.
if not AINU.Is_Empty (Subcomponents (E)) then
......@@ -1144,6 +1151,7 @@ package body Ocarina.Backends.C_Common.Subprograms is
Pop_Entity;
Pop_Entity;
end if;
end Visit_System_Instance;
---------------------------
......
......@@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
-- Copyright (C) 2008-2009 Telecom ParisTech, 2010-2014 ESA & ISAE. --
-- Copyright (C) 2008-2009 Telecom ParisTech, 2010-2015 ESA & ISAE. --
-- --
-- Ocarina is free software; you can redistribute it and/or modify --
-- it under terms of the GNU General Public License as published by the --
......@@ -48,9 +48,9 @@ package Ocarina.Backends.C_Tree.Nutils is
type Token_Type is
(
-- Token name Token type
-- Keywords
Tok_Null, -- NULL **** First Keyword
-- Token name Token type
-- Keywords
Tok_Null, -- NULL **** First Keyword
Tok_Break, -- BREAK
Tok_Case, -- CASE
Tok_Const, -- CONST
......
......@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
-- Copyright (C) 2008-2009 Telecom ParisTech, 2010-2014 ESA & ISAE. --
-- Copyright (C) 2008-2009 Telecom ParisTech, 2010-2015 ESA & ISAE. --
-- --
-- Ocarina is free software; you can redistribute it and/or modify --
-- it under terms of the GNU General Public License as published by the --
......@@ -145,6 +145,7 @@ package body Ocarina.Backends.PO_HI_C.Deployment is
-- This function is used to warrant that all entities will have
-- the same values on each node.
Nb_Ports_List : List_Id;
Node_Enumerator_List : List_Id;
Tasks_Enumerator_List : List_Id;
Devices_Enumerator_List : List_Id;
......@@ -887,6 +888,7 @@ package body Ocarina.Backends.PO_HI_C.Deployment is
The_System : constant Node_Id :=
Parent_Component (Parent_Subcomponent (E));
Device_Implementation : Node_Id;
begin
pragma Assert (AAU.Is_System (Root_Sys));
......@@ -899,6 +901,8 @@ package body Ocarina.Backends.PO_HI_C.Deployment is
Tasks_Enumerator_List := New_List (CTN.K_Enumeration_Literals);
Node_Enumerator_List := New_List (CTN.K_Enumeration_Literals);
Nb_Ports_List := New_List (CTN.K_List_Id);
Push_Entity (P);
Push_Entity (U);
Set_Deployment_Header;
......@@ -908,6 +912,8 @@ package body Ocarina.Backends.PO_HI_C.Deployment is
Nb_Protected := 0;
Nb_Ports_In_Process := 0;
-- Define the name of the current node
N :=
Make_Define_Statement
(Defining_Identifier => (RE (RE_My_Node)),
......@@ -1370,6 +1376,33 @@ package body Ocarina.Backends.PO_HI_C.Deployment is
Value => Nb_Protocols_Node);
Append_Node_To_List (N, CTN.Declarations (Current_File));
-- Define the PORT_TYPE_CONTENT macro for the monitoring of entities
declare
K : Node_Id;
Nb_Ports_List_Name : Name_Id := No_Name;
begin
K := CTN.First_Node (Nb_Ports_List);
if Present (K) then
Get_Name_String (CTN.Name (K));
K := CTN.Next_Node (K);
while Present (K) loop
Add_Str_To_Name_Buffer
(", " & Get_Name_String (CTN.Name (K)));
K := CTN.Next_Node (K);
end loop;
end if;
Nb_Ports_List_Name := Name_Find;
N :=
Make_Define_Statement
(Defining_Identifier => RE (RE_Port_Type_Content),
Value =>
Make_Defining_Identifier (Nb_Ports_List_Name));
Append_Node_To_List (N, CTN.Declarations (Current_File));
end;
Current_Process_Instance := No_Node;
Pop_Entity; -- U
......@@ -1805,6 +1838,10 @@ package body Ocarina.Backends.PO_HI_C.Deployment is
Make_Literal
(New_Int_Value (Local_Port_Identifier, 1, 10)));
Append_Node_To_List (N, CTN.Declarations (Current_File));
N := Make_Defining_Identifier
(Map_C_Define_Name (S, Nb_Ports => True));
Append_Node_To_List (N, Nb_Ports_List);
end if;
end if;
......
......@@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
-- Copyright (C) 2008-2009 Telecom ParisTech, 2010-2014 ESA & ISAE. --
-- Copyright (C) 2008-2009 Telecom ParisTech, 2010-2015 ESA & ISAE. --
-- --
-- Ocarina is free software; you can redistribute it and/or modify --
-- it under terms of the GNU General Public License as published by the --
......@@ -173,6 +173,7 @@ package Ocarina.Backends.PO_HI_C.Runtime is
RE_Nb_Buses, -- __PO_HI_NB_BUSES
RE_Nb_Protocols, -- __PO_HI_NB_PROTOCOLS
RE_My_Node, -- __PO_HI_MY_NODE
RE_Port_Type_Content, -- __PO_HI_PORT_TYPE_CONTENT
RE_Gqueue_Fifo_Indata, -- __PO_HI_GQUEUE_FIFO_DATA
RE_Gqueue_Fifo_Out, -- __PO_HI_GQUEUE_FIFO_OUT
RE_Nb_Operations, -- __PO_HI_NB_OPERATIONS
......@@ -403,6 +404,7 @@ package Ocarina.Backends.PO_HI_C.Runtime is
RE_Nb_Devices => RH_Deployment,
RE_Nb_Buses => RH_Deployment,
RE_Nb_Protocols => RH_Deployment,
RE_Port_Type_Content => RH_Deployment,
RE_My_Node => RH_Deployment,
RE_Nb_Ports => RH_Deployment,
RE_Nb_Servers => RH_Deployment,
......
......@@ -39,6 +39,7 @@ Usage:
-g Generate code from the AADL instance tree
Registered backends:
arinc653_conf
vxworks653_conf
deos_conf
petri_nets
boundt
......
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