Commit 0e89cc28 authored by yoogx's avatar yoogx

* Add support for multi-core processors for PolyORB-HI/C

parent bf13c626
......@@ -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 --
......@@ -100,6 +100,7 @@ package body Ocarina.Backends.PO_HI_C.Main is
Parameters : List_Id;
Priority : Unsigned_Long_Long;
Stack_Size : Unsigned_Long_Long;
Core_Id : Unsigned_Long_Long;
S : constant Node_Id := Parent_Subcomponent (E);
begin
Parameters := New_List (CTN.K_Parameter_List);
......@@ -178,6 +179,15 @@ package body Ocarina.Backends.PO_HI_C.Main is
N := Make_Literal (New_Int_Value (Stack_Size, 1, 10));
Append_Node_To_List (N, Parameters);
-- Add the core this thread is attached to
Core_Id := Get_Core_Id (Get_Bound_Processor
(Corresponding_Instance
(Get_Container_Process (E))));
N := Make_Literal (New_Int_Value (Core_Id, 1, 10));
Append_Node_To_List (N, Parameters);
-- Add the name of function executed by the task in the
-- parameters list.
......
......@@ -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 --
......@@ -352,6 +352,8 @@ package body Ocarina.Backends.Properties is
Execution_Time : Name_Id;
Compute_Deadline : Name_Id;
Core_Id : Name_Id;
--------------------
-- SEI properties --
--------------------
......@@ -3004,6 +3006,7 @@ package body Ocarina.Backends.Properties is
procedure Init is
begin
Core_Id := Get_String_Name ("processor_properties::core_id");
Source_Language := Get_String_Name ("source_language");
Source_Name := Get_String_Name ("source_name");
T_Source_Name := Get_String_Name ("transformations::source_name");
......@@ -4410,9 +4413,9 @@ package body Ocarina.Backends.Properties is
return No_Name;
end Get_Send_Function_Name;
---------------------
-- Get_Memory_Size --
---------------------
----------------------
-- Get_Base_Address --
----------------------
function Get_Base_Address (D : Node_Id) return Unsigned_Long_Long is
begin
......@@ -4428,4 +4431,13 @@ package body Ocarina.Backends.Properties is
return Get_Size_Property_Value (D, Memory_Size);
end Get_Memory_Size;
-----------------
-- Get_Core_Id --
-----------------
function Get_Core_Id (D : Node_Id) return Unsigned_Long_Long is
begin
return Check_And_Get_Property (D, Core_Id);
end Get_Core_Id;
end Ocarina.Backends.Properties;
......@@ -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 --
......@@ -801,6 +801,12 @@ package Ocarina.Backends.Properties is
function Get_Base_Address (D : Node_Id) return Unsigned_Long_Long;
function Get_Memory_Size (D : Node_Id) return Size_Type;
--------------------------
-- Processor properties --
--------------------------
function Get_Core_Id (D : Node_Id) return Unsigned_Long_Long;
private
Empty_Name_Array : constant Name_Array (1 .. 0) := (others => No_Name);
......
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