From 42dbdaef7e189201919f2170d5a6a54061ecf0d9 Mon Sep 17 00:00:00 2001 From: "julien.delange" Date: Fri, 11 Mar 2011 08:34:35 +0000 Subject: [PATCH] * Traceability of functions backend is now complete git-svn-id: https://tecsw.estec.esa.int/svn/taste/trunk/ocarina@2323 129961e7-ef38-4bb5-a8f7-c9a525a55882 --- resources/deployment.aadl | 3 +- ...ocarina-backends-functions_matrix-main.adb | 80 ++++++++++++++----- src/backends/ocarina-backends-properties.adb | 9 ++- 3 files changed, 68 insertions(+), 24 deletions(-) diff --git a/resources/deployment.aadl b/resources/deployment.aadl index 6af4d2d5..7040071d 100644 --- a/resources/deployment.aadl +++ b/resources/deployment.aadl @@ -29,6 +29,7 @@ property set Deployment is Native_Compcert, -- Native platforms using the Compcert compiler LEON_RTEMS, -- LEON2 board or tsim-leon (RTEMS) LEON3_XTRATUM, -- LEON3 with Xtratum + LEON3_XM3, -- RTEMS for XTRATUM/LEON3 LEON_ORK, -- LEON2 board or tsim-leon (ORK) LEON_GNAT, -- LEON2 board or qemu (GNATPRO/HI-E) LINUX32, -- Linux 32 bits @@ -46,7 +47,7 @@ property set Deployment is -- Supported platforms Execution_Platform : Deployment::Allowed_Execution_Platform - applies to (processor); + applies to (all); -- Execution platform of a processor Priority_Type : type aadlinteger 0 .. 255; diff --git a/src/backends/ocarina-backends-functions_matrix-main.adb b/src/backends/ocarina-backends-functions_matrix-main.adb index 9376478a..899797e0 100644 --- a/src/backends/ocarina-backends-functions_matrix-main.adb +++ b/src/backends/ocarina-backends-functions_matrix-main.adb @@ -60,6 +60,8 @@ package body Ocarina.Backends.Functions_Matrix.Main is procedure Visit_Component_Instance (E : Node_Id); procedure Visit_System_Instance (E : Node_Id); procedure Visit_Component (E : Node_Id; Table : Node_Id); + function Get_Full_Component_Name (E : Node_Id; R : Boolean := False) + return Name_Id; Current_Parent_Node : Node_Id; Functional_System : Node_Id := No_Node; @@ -211,6 +213,41 @@ package body Ocarina.Backends.Functions_Matrix.Main is end case; end Visit_Component_Instance; + ----------------------------- + -- Get_Full_Component_Name -- + ----------------------------- + + function Get_Full_Component_Name (E : Node_Id; R : Boolean := False) + return Name_Id is + T : Name_Id; + pragma Unreferenced (T); + begin + if R then + Set_Str_To_Name_Buffer (""); + end if; + + if Parent_Subcomponent (E) /= No_Node and then + Parent_Component (Parent_Subcomponent (E)) /= No_Node and then + Parent_Subcomponent + (Parent_Component (Parent_Subcomponent (E))) /= No_Node then + T := Get_Full_Component_Name + (Parent_Component (Parent_Subcomponent (E))); + end if; + + Get_Name_String_And_Append + (Display_Name (Identifier (Parent_Subcomponent (E)))); + + if not R then + Add_Str_To_Name_Buffer ("."); + end if; + + if R then + return Name_Find; + else + return No_Name; + end if; + end Get_Full_Component_Name; + --------------------- -- Visit_Component -- --------------------- @@ -238,22 +275,7 @@ package body Ocarina.Backends.Functions_Matrix.Main is Q := Make_Defining_Identifier (Name_Find); Append_Node_To_List (Make_Assignement (Q, P), XTN.Items (TD)); - Set_Str_To_Name_Buffer (""); - - if Parent_Component (Parent_Subcomponent (E)) /= No_Node then - Get_Name_String_And_Append - (Display_Name - (Identifier - (Parent_Subcomponent - (Parent_Component - (Parent_Subcomponent (E)))))); - Add_Str_To_Name_Buffer ("."); - end if; - - Get_Name_String_And_Append - (Display_Name (Identifier (Parent_Subcomponent (E)))); - - N := Make_Defining_Identifier (Name_Find); + N := Make_Defining_Identifier (Get_Full_Component_Name (E, True)); XTN.Set_Node_Value (TD, N); Append_Node_To_List (TD, @@ -271,10 +293,30 @@ package body Ocarina.Backends.Functions_Matrix.Main is if Get_Bound_Function (E) /= No_Node and then Get_Bound_Function - (E) = T then - Set_Str_To_Name_Buffer ("X"); - else + (E) = Corresponding_Instance (T) then + Set_Str_To_Name_Buffer + ("font-family: Arial; font-weight: bold;" & + "background-color: #91ff94;" & + "text-align: center; font-size: 0.8em"); + P := Make_Defining_Identifier (Name_Find); + Set_Str_To_Name_Buffer ("style"); + Q := Make_Defining_Identifier (Name_Find); + Append_Node_To_List + (Make_Assignement (Q, P), XTN.Items (TD)); + Set_Str_To_Name_Buffer ("O"); + else + Set_Str_To_Name_Buffer + ("font-family: Arial; font-weight: bold;" & + "background-color: #b83f3f;" & + "text-align: center; font-size: 0.8em"); + P := Make_Defining_Identifier (Name_Find); + Set_Str_To_Name_Buffer ("style"); + Q := Make_Defining_Identifier (Name_Find); + Append_Node_To_List + (Make_Assignement (Q, P), XTN.Items (TD)); + + Set_Str_To_Name_Buffer ("X"); end if; N := Make_Defining_Identifier (Name_Find); diff --git a/src/backends/ocarina-backends-properties.adb b/src/backends/ocarina-backends-properties.adb index 9dff2666..1829ed03 100644 --- a/src/backends/ocarina-backends-properties.adb +++ b/src/backends/ocarina-backends-properties.adb @@ -2489,9 +2489,9 @@ package body Ocarina.Backends.Properties is end if; end Get_Bound_Memory; - ------------------------- - -- Get_Bound_Processor -- - ------------------------- + ------------------------ + -- Get_Bound_Function -- + ------------------------ function Get_Bound_Function (P : Node_Id) return Node_Id is begin @@ -3023,7 +3023,8 @@ package body Ocarina.Backends.Properties is Port_Number := Get_String_Name ("deployment::port_number"); Process_Id := Get_String_Name ("deployment::process_id"); Processor_Binding := Get_String_Name ("actual_processor_binding"); - Function_Binding := Get_String_Name ("actual_function_binding"); + Function_Binding := + Get_String_Name ("aram_properties::actual_function_binding"); Memory_Binding := Get_String_Name ("actual_memory_binding"); Word_Count := Get_String_Name ("word_count"); Word_Size := Get_String_Name ("word_size"); -- GitLab