--------------------------------- ----------------------------------------------- ------------------------------------------------------------------------------ -- 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 hierarchical_analysis_methods_temporary; use hierarchical_analysis_methods_temporary; with Text_IO; use Text_IO; 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 Systems; use Systems; 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 Ada.Exceptions; use Ada.Exceptions; 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 Parameters; use Parameters; with Parameters.extended; use Parameters.extended; use Parameters.Framework_Parameters_Table_Package; with tasks; use tasks; with Task_Set; use Task_Set; use Task_Set.Generic_Task_Set; with Resources; use Resources; with resource_Set; use resource_Set; use resource_Set.Generic_resource_Set; with address_space_Set; use address_space_Set; use address_space_Set.Generic_address_space_Set; with offsets; use offsets; use offsets.offsets_table_package; with buffer_set;use buffer_set; with buffers; use buffers; use buffers.buffer_roles_package; with queueing_systems; use queueing_systems; with message_set; use message_set; with messages; use messages; with task_dependencies; use task_dependencies; with dependencies; use dependencies; with objects;use objects; use objects.Generic_Object_Set_Package; with deployment_set; use deployment_set; with deployments; use deployments; with initialize_framework; use initialize_framework; procedure hierarchical_edf_schedulability_analysis is sys : system; deployment_test : Generic_deployment_Ptr; deployment_test2: Generic_deployment; a_core : core_unit_ptr; a_core_unit_table : core_units_table; T1_ref, T2_ref, HP_Serv_ref, LP_Serv_ref : generic_task_ptr; P1_ref : generic_processor_ptr; sink, source, sink_L, source_L: Generic_Objects_Set; begin Set_Initialize; Initialize(sys); Add_core_unit (sys.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(a_core_unit_table, a_core); add_processor(sys.processors, P1_ref, to_unbounded_string("processor1"), to_unbounded_string("a_network"), a_core_unit_table, time_unit_migration_type); Add_Address_Space(sys.address_spaces, to_unbounded_string("addr1"), to_unbounded_string("processor1"), 0, 0, 0, 0); Add_Task(sys.tasks, T1_ref, to_unbounded_string("T1"), to_unbounded_string("processor1"), to_unbounded_string("addr1"), Periodic_type, 0, 10, 50, 50, 0, 0, 3, 0, SCHED_FIFO); Add_Task(sys.tasks, T2_ref, to_unbounded_string("T2"), to_unbounded_string("processor1"), to_unbounded_string("addr1"), Periodic_type, 0, 8, 100, 100, 0, 0, 4, 0, SCHED_FIFO); Add_Task(sys.tasks, HP_Serv_ref, to_unbounded_string("HP_Server"), to_unbounded_string("processor1"), to_unbounded_string("addr1"), Scheduling_Task_type, 0, 2, 5, 5, 3, 0, 1, 0, SCHED_FIFO); Add_Task(sys.tasks, LP_Serv_ref, to_unbounded_string("LP_Server"), to_unbounded_string("processor1"), to_unbounded_string("addr1"), Scheduling_Task_type, 0, 8, 20, 20, 12, 0, 2, 0, SCHED_FIFO); initialize(source_L); initialize(sink_L); add(sink,generic_object_ptr(T1_ref)); add(sink,generic_object_ptr(T2_ref)); add(source,generic_object_ptr(LP_Serv_ref)); Add_deployment(sys.deployments, to_unbounded_string("Low_Priority_Deferrable_Server"), source, sink, to_unbounded_string("scheduling_sequence.xml"));deployment_test:=get_random_element(sys.deployments); Put_line(" Result for busy period" & compute_partition_internal_busy_period(deployment_test,4,200.0,false)'IMG); Put_line(" Result for gaps" & compute_partition_internal_gaps(deployment_test,4,200.0,false)'IMG); initialize(source); initialize(sink); add(sink,generic_object_ptr(HP_Serv_ref)); add(sink,generic_object_ptr(LP_Serv_ref)); add(source,generic_object_ptr(P1_ref)); Add_deployment(sys.deployments, to_unbounded_string("static_example"), source, sink, to_unbounded_string("scheduling_sequence.xml")); Put_line(" Result for servers interference" & compute_server_interference(sys.deployments,T1_ref,200.0,false)'IMG); Put_line(" Result for T1 WCRT" & compute_wcrt(sys,T1_ref,false)'IMG); Put_line(" Result for T2 WCRT" & compute_wcrt(sys,T2_ref,false)'IMG); Write_To_Xml_File(sys,"hierarchical_double_deployment.xml"); end hierarchical_edf_schedulability_analysis;