------------------------------------------------------------------------------ ------------------------------------------------------------------------------ -- Cheddar is a GNU GPL real time scheduling analysis tool. -- This program provides services to automatically check performances -- of real time architectures. -- -- Copyright (C) 2002-2010, by Frank Singhoff, Alain Plantec, Jerome Legrand -- -- The Cheddar project was started in 2002 by -- the LISyC Team, University of Western Britanny. -- -- Since 2008, Ellidiss technologies also contributes to the development of -- Cheddar and provides industrial support. -- -- 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: 97 $ -- $Date: 2007-07-20 15:17:15 +0200 (Fri, 20 Jul 2007) $ -- $Author: singhoff $ ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ with Ada.Numerics.Aux; use Ada.Numerics.Aux; with Text_IO; use Text_IO; with Framework_Config; use Framework_Config; with Processor_Set; use Processor_Set; use Processor_Set.Generic_Processor_Set; with Ada.Strings.Unbounded; use Ada.Strings.Unbounded; with unbounded_strings; use unbounded_strings; use unbounded_strings.strings_table_package; use unbounded_strings.unbounded_string_list_package; with Parameters; use Parameters; with Parameters.extended; use Parameters.extended; use Parameters.Framework_Parameters_Table_Package; with Scheduler_Interface; use Scheduler_Interface; with Processor_Set; use Processor_Set; use Processor_Set.Generic_Processor_Set; with Processors; use Processors; with processor_interface; use processor_interface; with Caches; use Caches; use Caches.Caches_Table_Package; use Processors.Core_Units_Table_Package; with Address_Space_Set; use Address_Space_Set; use Address_Space_Set.Generic_Address_Space_Set; with Task_Set; use Task_Set; use Task_Set.Generic_Task_Set; with Systems; use Systems; with Call_Framework; use Call_Framework; with Call_Framework_Interface; use Call_Framework_Interface; use Call_Framework_Interface.Framework_Response_Package; use Call_Framework_Interface.Framework_Request_Package; with framework; use framework; with Call_Scheduling_Framework; use Call_Scheduling_Framework; with Multiprocessor_Services; use Multiprocessor_Services; with Multiprocessor_Services_Interface; use Multiprocessor_Services_Interface; use Multiprocessor_Services_Interface.Scheduling_Result_Per_Processor_Package; with GNAT.Command_Line; with GNAT.OS_Lib; use GNAT.OS_Lib; with Version; use Version; with Ada.Exceptions; use Ada.Exceptions; with Task_Groups; use Task_Groups; with Task_Group_Set; use Task_Group_Set; with Tasks; use Tasks; with Task_Dependencies; use Task_Dependencies; with Architecture_Factory; use Architecture_Factory; with Task_Group_Transformation; use Task_Group_Transformation; with Comprehensive_Call; procedure DGMF_Merge is Sys_Multiframe : System; Sys_Transaction : System; A_core : Core_Unit_Ptr; Cores : Core_Units_Table; begin -- Platform entities initialize(Sys_Multiframe); Add_core_unit(Sys_Multiframe.core_units, a_core, to_unbounded_string("core1"), preemptive, 100, 1.0, 101, 102, 103, to_unbounded_string(""), Posix_1003_Highest_Priority_First_Protocol); add(Cores, a_core); add_processor(Sys_Multiframe.processors, to_unbounded_string("cpu1"), to_unbounded_string("a_network"), Cores); Add_Address_Space(Sys_Multiframe.address_spaces, to_unbounded_string("addr1"), to_unbounded_string("cpu1"), 0, 0, 0, 0); -- Task Groups Add_Task_Group (Sys_Multiframe.Task_Groups, To_Unbounded_String("G1"), Multiframe_Type); Add_Task_Group (Sys_Multiframe.Task_Groups, To_Unbounded_String("G2"), Multiframe_Type); Add_Task_Group (Sys_Multiframe.Task_Groups, To_Unbounded_String("G3"), Multiframe_Type); Add_Task_Group (Sys_Multiframe.Task_Groups, To_Unbounded_String("G4"), Multiframe_Type); Add_Task_Group (Sys_Multiframe.Task_Groups, To_Unbounded_String("G5"), Multiframe_Type); Add_Task_Group (Sys_Multiframe.Task_Groups, To_Unbounded_String("G6"), Multiframe_Type); -- Tasks Add_Task (Sys_Multiframe.Tasks, Sys_Multiframe.Task_Groups, To_Unbounded_String("G1"), To_Unbounded_String("T11"), to_unbounded_string("cpu1"), to_unbounded_string("addr1"), Frame_Task_Type, 2, -- start_time 1, -- capacity 5, -- min_separation 20, -- deadline 0, -- jitter 0, -- blocking 5, -- priority 0, -- criticality SCHED_FIFO); Add_Task (Sys_Multiframe.Tasks, Sys_Multiframe.Task_Groups, To_Unbounded_String("G2"), To_Unbounded_String("T21"), to_unbounded_string("cpu1"), to_unbounded_string("addr1"), Frame_Task_Type, 0, -- start_time 2, -- capacity 5, -- min_separation 20, -- deadline 0, -- jitter 0, -- blocking 1, -- priority 0, -- criticality SCHED_FIFO); Add_Task (Sys_Multiframe.Tasks, Sys_Multiframe.Task_Groups, To_Unbounded_String("G3"), To_Unbounded_String("T31"), to_unbounded_string("cpu1"), to_unbounded_string("addr1"), Frame_Task_Type, 0, -- start_time 2, -- capacity 5, -- min_separation 20, -- deadline 0, -- jitter 0, -- blocking 1, -- priority 0, -- criticality SCHED_FIFO); Add_Task (Sys_Multiframe.Tasks, Sys_Multiframe.Task_Groups, To_Unbounded_String("G1"), To_Unbounded_String("T12"), to_unbounded_string("cpu1"), to_unbounded_string("addr1"), Frame_Task_Type, 0, -- start_time 2, -- capacity 5, -- min_separation 20, -- deadline 0, -- jitter 0, -- blocking 5, -- priority 0, -- criticality SCHED_FIFO); Add_Task (Sys_Multiframe.Tasks, Sys_Multiframe.Task_Groups, To_Unbounded_String("G2"), To_Unbounded_String("T22"), to_unbounded_string("cpu1"), to_unbounded_string("addr1"), Frame_Task_Type, 0, -- start_time 1, -- capacity 5, -- min_separation 20, -- deadline 0, -- jitter 0, -- blocking 1, -- priority 0, -- criticality SCHED_FIFO); Add_Task (Sys_Multiframe.Tasks, Sys_Multiframe.Task_Groups, To_Unbounded_String("G3"), To_Unbounded_String("T32"), to_unbounded_string("cpu1"), to_unbounded_string("addr1"), Frame_Task_Type, 0, -- start_time 1, -- capacity 5, -- min_separation 20, -- deadline 0, -- jitter 0, -- blocking 1, -- priority 0, -- criticality SCHED_FIFO); Add_Task (Sys_Multiframe.Tasks, Sys_Multiframe.Task_Groups, To_Unbounded_String("G4"), To_Unbounded_String("T41"), to_unbounded_string("cpu1"), to_unbounded_string("addr1"), Frame_Task_Type, 4, -- start_time 2, -- capacity 10, -- min_separation 10, -- deadline 0, -- jitter 0, -- blocking 2, -- priority 0, -- criticality SCHED_FIFO); Add_Task (Sys_Multiframe.Tasks, Sys_Multiframe.Task_Groups, To_Unbounded_String("G5"), To_Unbounded_String("T51"), to_unbounded_string("cpu1"), to_unbounded_string("addr1"), Frame_Task_Type, 0, -- start_time 1, -- capacity 10, -- min_separation 10, -- deadline 0, -- jitter 0, -- blocking 1, -- priority 0, -- criticality SCHED_FIFO); Add_Task (Sys_Multiframe.Tasks, Sys_Multiframe.Task_Groups, To_Unbounded_String("G6"), To_Unbounded_String("T61"), to_unbounded_string("cpu1"), to_unbounded_string("addr1"), Frame_Task_Type, 0, -- start_time 1, -- capacity 10, -- min_separation 10, -- deadline 0, -- jitter 0, -- blocking 1, -- priority 0, -- criticality SCHED_FIFO); -- Dependencies Add_One_Task_Dependency (Sys_Multiframe.Dependencies, Search_Task(Sys_Multiframe.Tasks, To_Unbounded_String("T11")), Search_Task(Sys_Multiframe.Tasks, To_Unbounded_String("T21"))); Add_One_Task_Dependency (Sys_Multiframe.Dependencies, Search_Task(Sys_Multiframe.Tasks, To_Unbounded_String("T11")), Search_Task(Sys_Multiframe.Tasks, To_Unbounded_String("T31"))); Add_One_Task_Dependency (Sys_Multiframe.Dependencies, Search_Task(Sys_Multiframe.Tasks, To_Unbounded_String("T12")), Search_Task(Sys_Multiframe.Tasks, To_Unbounded_String("T22"))); Add_One_Task_Dependency (Sys_Multiframe.Dependencies, Search_Task(Sys_Multiframe.Tasks, To_Unbounded_String("T12")), Search_Task(Sys_Multiframe.Tasks, To_Unbounded_String("T32"))); Add_One_Task_Dependency (Sys_Multiframe.Dependencies, Search_Task(Sys_Multiframe.Tasks, To_Unbounded_String("T22")), Search_Task(Sys_Multiframe.Tasks, To_Unbounded_String("T32"))); Add_One_Task_Dependency (Sys_Multiframe.Dependencies, Search_Task(Sys_Multiframe.Tasks, To_Unbounded_String("T41")), Search_Task(Sys_Multiframe.Tasks, To_Unbounded_String("T51"))); -- Task_Groups -- IO Write_To_Xml_File(Sys_Multiframe, To_Unbounded_String ("merge_dgmf.xml")); Multiframe_To_Transaction_Sys_Crossref(Sys_Multiframe, Sys_Transaction, true); Write_To_Xml_File(Sys_Transaction, To_Unbounded_String ("merge_transaction.xml")); end DGMF_Merge;