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

* ocarina/src/backends/ocarina-backends-properties.adb

   - Do not expect to have a bound bus when we use xtratum

 * ocarina/src/backends/ocarina-backends-build_utils.adb
   ocarina/src/backends/ocarina-backends-po_hi_c-naming.adb
   ocarina/src/backends/ocarina-backends-xtratum_conf-partition_table.adb
   ocarina/src/backends/ocarina-backends-xtratum_conf-channels.adb
   - Put the right name of the partition

 * ocarina/resources/AADLv2/components/processors/leon.aadl
   - Declare appropriate properties on generic components
     that declare an xtratum platform






git-svn-id: https://tecsw.estec.esa.int/svn/taste/trunk/ocarina@2373 129961e7-ef38-4bb5-a8f7-c9a525a55882
parent 3d5f07d9
...@@ -37,10 +37,12 @@ properties ...@@ -37,10 +37,12 @@ properties
Deployment::Execution_Platform => LEON3_XTRATUM; Deployment::Execution_Platform => LEON3_XTRATUM;
end leon3.xtratum; end leon3.xtratum;
processor implementation leon3.xtratum_2partitions processor implementation leon3.xtratum_2partitions extends leon3.xtratum
subcomponents subcomponents
part1 : virtual processor xtratum_partition.generic; part1 : virtual processor xtratum_partition.generic
part2 : virtual processor xtratum_partition.generic; { Deployment::Execution_Platform => LEON3_XM3;};
part2 : virtual processor xtratum_partition.generic
{ Deployment::Execution_Platform => LEON3_XM3;};
properties properties
ARINC653::Partition_Slots => (500ms, 500ms); ARINC653::Partition_Slots => (500ms, 500ms);
ARINC653::Slots_Allocation => (reference (part1), reference (part2)); ARINC653::Slots_Allocation => (reference (part1), reference (part2));
......
...@@ -40,6 +40,7 @@ with GNAT.Directory_Operations; ...@@ -40,6 +40,7 @@ with GNAT.Directory_Operations;
with Namet; with Namet;
with Output; with Output;
with Utils; use Utils;
with Ocarina.ME_AADL; with Ocarina.ME_AADL;
with Ocarina.ME_AADL.AADL_Instances.Nodes; with Ocarina.ME_AADL.AADL_Instances.Nodes;
...@@ -1204,18 +1205,19 @@ package body Ocarina.Backends.Build_Utils is ...@@ -1204,18 +1205,19 @@ package body Ocarina.Backends.Build_Utils is
-- Enter the directories -- Enter the directories
Enter_Directory Enter_Directory
(Normalize_Name (To_Lower
(Normalize_Name
(Display_Name (Display_Name
(Identifier (The_System)))); (Identifier (The_System)))));
-- Create the file -- Create the file
Fd := Create_File Fd := Create_File
("Makefile." & ("Makefile." &
Get_Name_String Get_Name_String
(Normalize_Name (To_Lower (Normalize_Name
(Display_Name (Display_Name
(Identifier (The_System)))), (Identifier (The_System))))),
Text); Text);
if Fd = Invalid_FD then if Fd = Invalid_FD then
...@@ -1245,9 +1247,9 @@ package body Ocarina.Backends.Build_Utils is ...@@ -1245,9 +1247,9 @@ package body Ocarina.Backends.Build_Utils is
Write_Str ("MAINAPP="); Write_Str ("MAINAPP=");
Write_Name Write_Name
(Normalize_Name (To_Lower (Normalize_Name
(Display_Name (Display_Name
(Identifier (The_System)))); (Identifier (The_System)))));
Write_Eol; Write_Eol;
Write_Str ("PARTITIONS_NAME="); Write_Str ("PARTITIONS_NAME=");
...@@ -1259,7 +1261,9 @@ package body Ocarina.Backends.Build_Utils is ...@@ -1259,7 +1261,9 @@ package body Ocarina.Backends.Build_Utils is
while Present (S) loop while Present (S) loop
if AAU.Is_Process (Corresponding_Instance (S)) then if AAU.Is_Process (Corresponding_Instance (S)) then
Write_Name Write_Name
(Normalize_Name (Display_Name (Identifier (S)))); (To_Lower
(Normalize_Name
(Display_Name (Identifier (S)))));
Write_Space; Write_Space;
end if; end if;
S := Next_Node (S); S := Next_Node (S);
...@@ -1277,10 +1281,13 @@ package body Ocarina.Backends.Build_Utils is ...@@ -1277,10 +1281,13 @@ package body Ocarina.Backends.Build_Utils is
while Present (S) loop while Present (S) loop
if AAU.Is_Process (Corresponding_Instance (S)) then if AAU.Is_Process (Corresponding_Instance (S)) then
Write_Name Write_Name
(Normalize_Name (Display_Name (Identifier (S)))); (To_Lower
(Normalize_Name (Display_Name (Identifier (S)))));
Write_Str ("/"); Write_Str ("/");
Write_Name Write_Name
(Normalize_Name (Display_Name (Identifier (S)))); (To_Lower
(Normalize_Name
(Display_Name (Identifier (S)))));
Write_Str (".xef"); Write_Str (".xef");
Write_Space; Write_Space;
end if; end if;
...@@ -1304,10 +1311,14 @@ package body Ocarina.Backends.Build_Utils is ...@@ -1304,10 +1311,14 @@ package body Ocarina.Backends.Build_Utils is
Write_Str (Unsigned_Long_Long'Image (PID)); Write_Str (Unsigned_Long_Long'Image (PID));
Write_Str (":"); Write_Str (":");
Write_Name Write_Name
(Normalize_Name (Display_Name (Identifier (S)))); (To_Lower
(Normalize_Name
(Display_Name (Identifier (S)))));
Write_Str ("/"); Write_Str ("/");
Write_Name Write_Name
(Normalize_Name (Display_Name (Identifier (S)))); (To_Lower
(Normalize_Name
(Display_Name (Identifier (S)))));
Write_Str (".xef"); Write_Str (".xef");
Write_Space; Write_Space;
PID := PID + 1; PID := PID + 1;
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
-- -- -- --
-- B o d y -- -- B o d y --
-- -- -- --
-- Copyright (C) 2008-2010, GET-Telecom Paris. -- -- Copyright (C) 2008-2011, European Space Agency (ESA). --
-- -- -- --
-- Ocarina is free software; you can redistribute it and/or modify -- -- Ocarina is free software; you can redistribute it and/or modify --
-- it under terms of the GNU General Public License as published by the -- -- it under terms of the GNU General Public License as published by the --
...@@ -418,8 +418,26 @@ package body Ocarina.Backends.PO_HI_C.Naming is ...@@ -418,8 +418,26 @@ package body Ocarina.Backends.PO_HI_C.Naming is
end if; end if;
-- Get the bus of the connection -- Get the bus of the connection
if Get_Execution_Platform
B := Get_Bound_Bus (C); (Get_Bound_Processor (E)) =
Platform_LEON3_XM3
and then
Get_Execution_Platform
(Get_Bound_Processor (Parent)) =
Platform_LEON3_XM3
and then
Parent_Component
(Parent_Subcomponent
(Get_Bound_Processor (E))) =
Parent_Component
(Parent_Subcomponent
(Get_Bound_Processor (Parent)))
then
B := No_Node;
Transport_API := Transport_None;
else
B := Get_Bound_Bus (C);
end if;
-- Get the transport layer of the Bus and -- Get the transport layer of the Bus and
-- verify that all the features use the -- verify that all the features use the
...@@ -443,7 +461,8 @@ package body Ocarina.Backends.PO_HI_C.Naming is ...@@ -443,7 +461,8 @@ package body Ocarina.Backends.PO_HI_C.Naming is
-- transport layer has been specified, -- transport layer has been specified,
-- we raise an error. -- we raise an error.
if Transport_API = Transport_None then if B /= No_Node and then
Transport_API = Transport_None then
Display_Located_Error Display_Located_Error
(Loc (B), (Loc (B),
"No transport layer has been specified" "No transport layer has been specified"
......
...@@ -2521,9 +2521,32 @@ package body Ocarina.Backends.Properties is ...@@ -2521,9 +2521,32 @@ package body Ocarina.Backends.Properties is
if not Is_System (Parent_Component (C)) then if not Is_System (Parent_Component (C)) then
return No_Node; return No_Node;
end if; elsif Is_System (Parent_Component (C)) and then
Get_Execution_Platform
if not Is_Defined_List_Property (C, Connection_Binding) then (Get_Bound_Processor
(Parent_Component
(Get_Referenced_Entity
(AIN.Source (C))))) = Platform_LEON3_XM3
and then
Get_Execution_Platform
(Get_Bound_Processor
(Parent_Component
(Get_Referenced_Entity
(AIN.Destination (C))))) = Platform_LEON3_XM3
and then
Parent_Component
(Parent_Subcomponent
(Parent_Component
(Get_Referenced_Entity
(AIN.Destination (C))))) =
Parent_Component
(Parent_Subcomponent
(Parent_Component
(Get_Referenced_Entity
(AIN.Source (C)))))
then
return No_Node;
elsif not Is_Defined_List_Property (C, Connection_Binding) then
if Check then if Check then
Display_Located_Error Display_Located_Error
(AIN.Loc (C), (AIN.Loc (C),
......
...@@ -300,10 +300,11 @@ package body Ocarina.Backends.Xtratum_Conf.Channels is ...@@ -300,10 +300,11 @@ package body Ocarina.Backends.Xtratum_Conf.Channels is
Set_Str_To_Name_Buffer ("partitionName"); Set_Str_To_Name_Buffer ("partitionName");
P := Make_Defining_Identifier (Name_Find); P := Make_Defining_Identifier (Name_Find);
Get_Name_String Get_Name_String
(Display_Name (To_Lower
(Identifier (Display_Name
(Parent_Subcomponent (Identifier
(Get_Bound_Processor (Destination_Partition))))); (Parent_Subcomponent
(Destination_Partition)))));
Q := Make_Defining_Identifier (Name_Find); Q := Make_Defining_Identifier (Name_Find);
Append_Node_To_List Append_Node_To_List
(Make_Assignement (P, Q), XTN.Items (Destination_Node)); (Make_Assignement (P, Q), XTN.Items (Destination_Node));
......
...@@ -199,8 +199,9 @@ package body Ocarina.Backends.Xtratum_Conf.Partition_Table is ...@@ -199,8 +199,9 @@ package body Ocarina.Backends.Xtratum_Conf.Partition_Table is
Set_Str_To_Name_Buffer ("name"); Set_Str_To_Name_Buffer ("name");
P := Make_Defining_Identifier (Name_Find); P := Make_Defining_Identifier (Name_Find);
Get_Name_String Get_Name_String
(Display_Name (To_Lower
(Identifier (Parent_Subcomponent (E)))); (Display_Name
(Identifier (Parent_Subcomponent (E)))));
Q := Make_Defining_Identifier (Name_Find); Q := Make_Defining_Identifier (Name_Find);
Append_Node_To_List Append_Node_To_List
(Make_Assignement (P, Q), XTN.Items (Partition_Node)); (Make_Assignement (P, Q), XTN.Items (Partition_Node));
......
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