------------------------------------------------------------------------------ ------------------------------------------------------------------------------ -- Cheddar is a GNU GPL real-time scheduling analysis tool. -- This program provides services to automatically check schedulability and -- other performance criteria of real-time architecture models. -- -- Copyright (C) 2002-2020, Frank Singhoff, Alain Plantec, Jerome Legrand -- -- The Cheddar project was started in 2002 by -- Frank Singhoff, Lab-STICC UMR 6285, Université de Bretagne Occidentale -- -- Cheddar has been published in the "Agence de Protection des Programmes/France" in 2008. -- Since 2008, Ellidiss technologies also contributes to the development of -- Cheddar and provides industrial support. -- -- The full list of contributors and sponsors can be found in AUTHORS.txt and SPONSORS.txt -- -- This program is free software; you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by -- the Free Software Foundation; either version 2 of the License, or -- (at your option) any later version. -- -- This program is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License -- along with this program; if not, write to the Free Software -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -- -- -- Contact : cheddar@listes.univ-brest.fr -- ------------------------------------------------------------------------------ -- Last update : -- $Rev$ -- $Date$ -- $Author: singhoff $ ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ with unbounded_strings; use unbounded_strings; with text_io; use text_io; with Xml_Tag; use Xml_Tag; with double_util; use double_util; with Translate; use Translate; with Ada.Numerics.Aux; use Ada.Numerics.Aux; with GNAT.Current_Exception; use GNAT.Current_Exception; with Framework_Config; use Framework_Config; with Debug; use Debug; with spacewire_flow_transformation; use spacewire_flow_transformation; with networks; use networks; with network_set; use network_set; use network_set.Generic_Network_Set; with tasks; use tasks; with task_set; use task_set; use task_set.Generic_task_Set; with messages; use messages; with message_set; use message_set; use message_set.Generic_message_Set; with core_units; use core_units; with processor_set; use processor_set; use processor_set.Generic_core_unit_Set; with task_dependencies; use task_dependencies; use task_dependencies.Half_Dep_Set; with dependencies; use dependencies; package body call_network_framework is procedure Compute_NoC_Path_Delay (Sys : in System; Result : in out Unbounded_String; Output : in Output_Format := String_Output) is Period_String : Unbounded_String; Period : Double := 0.0; Msg : Unbounded_String; begin Put_Debug ("Compute_NoC_Path_Delay"); result:=empty_string; if Output = Xml_Output then Set_Tag; else Set_Empty; end if; --Calculate_Feasibility_Interval -- (Sys, -- A_Processor, -- Validate, -- Period, -- Msg); Period_String := " " & format(Period,0); Result := Result & Start_Line & Lb_Scheduling_Period (Current_Language) & Start_Bas_Per & Period_String & End_Bas_Per & Start_Ref & Msg & End_Ref & End_Line & unbounded_lf; exception when Task_Set.Task_Must_Be_Periodic => Result := Result & Lb_Compute_Scheduling_Error_2 (Current_Language) & unbounded_lf; when Task_Set.Task_Model_Error => Result := Result & Lb_Compute_Scheduling_Error_3 (Current_Language) & unbounded_lf; end Compute_NoC_Path_Delay; procedure Compute_NoC_communication_Delay (Sys : in System; Result : in out Unbounded_String; Output : in Output_Format := String_Output) is begin null; end Compute_NoC_communication_Delay; procedure Compute_NoC_direct_interference_Delay (Sys : in System; Result : in out Unbounded_String; Output : in Output_Format := String_Output) is begin null; end Compute_NoC_direct_interference_Delay; procedure Compute_NoC_indirect_interference_Delay (Sys : in System; Result : in out Unbounded_String; Output : in Output_Format := String_Output) is begin null; end Compute_NoC_indirect_interference_Delay; procedure Compute_ectm_saf_transformation (Sys : in System; Result : in out Unbounded_String; Update : in Boolean; Output : in Output_Format := String_Output) is begin null; end Compute_ectm_saf_transformation; procedure Compute_ectm_wormhole_transformation (Sys : in System; Result : in out Unbounded_String; Update : in Boolean; Output : in Output_Format := String_Output) is begin null; end Compute_ectm_wormhole_transformation; procedure Compute_wcctm_saf_transformation (Sys : in System; Result : in out Unbounded_String; Update : in Boolean; Output : in Output_Format := String_Output) is begin null; end Compute_wcctm_saf_transformation; procedure Compute_wcctm_wormhole_transformation (Sys : in System; Result : in out Unbounded_String; Update : in Boolean; Output : in Output_Format := String_Output) is begin null; end Compute_wcctm_wormhole_transformation; procedure Compute_Spacewire_SCM_transformation (Sys : in out System; Result : in out Unbounded_String; Update : in Boolean; Output : in Output_Format := String_Output) is sys_Result : System; number : integer; a_network : generic_network_ptr; ite1 : Networks_Iterator; a_task : generic_task_ptr; Ite2 : tasks_Iterator; a_message : generic_message_ptr; ite3 : messages_Iterator; a_processor : generic_processor_ptr; ite4 : processors_Iterator; ite5 : Tasks_Dependencies_Iterator; A_Dep : Dependency_Ptr; begin Put_Debug ("Call Compute_Spacewire_SCM_transformation"); result:=empty_string; initialize(sys_Result); if Output = Xml_Output then Set_Tag; else Set_Empty; end if; if (get_number_of_elements (sys.Networks) > 0) then reset_iterator (sys.Networks, ite1); loop current_element (sys.Networks, A_Network, ite1); Result := Result & to_unbounded_string("- Producing DAG for the Spacewire network : ") & a_network.name & unbounded_lf; Compute_Spacewire_transformation (Sys, spacewire_network_ptr(a_network), sys_Result); exit when is_last_element (sys.Networks, ite1); next_element (sys.Networks, ite1); end loop; Result := Result & to_unbounded_string("- Produced DAG : ") & unbounded_lf; number := integer(get_number_of_elements(sys_result.processors)); Result := Result & " - " & number'img & " Processor(s) : "; if (number>0) then reset_iterator (sys_result.processors, ite4); loop current_element (sys_result.processors, A_processor, ite4); Result := Result & " " & a_processor.name & " "; exit when is_last_element (sys_result.processors, ite4); next_element (sys_result.processors, ite4); end loop; result:=result & unbounded_lf; end if; number := integer(get_number_of_elements(sys_result.tasks)); Result := Result & " - " & number'img & " Task(s) : "; if (number>0) then reset_iterator (sys_result.tasks, ite2); loop current_element (sys_result.tasks, A_task, ite2); Result := Result & " " & a_task.name & " "; exit when is_last_element (sys_result.tasks, ite2); next_element (sys_result.tasks, ite2); end loop; result:=result & unbounded_lf; end if; number := integer(get_number_of_elements(sys_result.messages)); Result := Result & " - " & number'img & " Message(s) : "; if (number>0) then reset_iterator (sys_result.messages, ite3); loop current_element (sys_result.messages, A_message, ite3); Result := Result & " " & a_message.name & " "; exit when is_last_element (sys_result.messages, ite3); next_element (sys_result.messages, ite3); end loop; result:=result & unbounded_lf; end if; number := integer(get_number_of_elements(sys_result.dependencies.depends)); Result := Result & " - " & number'img & " Dependency(ies) : "; if (number>0) then reset_iterator (sys_result.dependencies.depends, ite5); loop current_element (sys_result.dependencies.depends, A_dep , ite5); if A_Dep.type_of_dependency = asynchronous_communication_dependency then if (a_dep.asynchronous_communication_orientation = from_task_to_object) then Result := Result & " " & a_dep.asynchronous_communication_dependent_task.name & "=>" & a_dep.asynchronous_communication_dependency_object.name & " "; else Result := Result & " " & a_dep.asynchronous_communication_dependency_object.name & "=>" & a_dep.asynchronous_communication_dependent_task.name & " "; end if; end if; exit when is_last_element (sys_result.dependencies.depends, ite5); next_element (sys_result.dependencies.depends, ite5); end loop; result:=result & unbounded_lf; end if; result:=result & unbounded_lf; result:=result & unbounded_lf; end if; if update then sys:=sys_result; end if; end Compute_Spacewire_SCM_transformation; end call_network_framework;