with Paes_Utilities; use Paes_Utilities; with Systems; use Systems; with Ada.Numerics.Float_Random ; use Ada.Numerics.Float_Random ; with Ada.Strings.Unbounded; use Ada.Strings.Unbounded; with unbounded_strings; use unbounded_strings; with Tasks; use Tasks; with Task_Set; use Task_Set; with Resources; use Resources; With Resource_set; use Resource_set; with Scheduler; use Scheduler; with Scheduler_Interface; use Scheduler_Interface; with framework_config; use framework_config; -- This package defines subprograms needed -- to instanciate PAES for the Functions-to-Tasks (F2T) -- architecture exploration problem -- package Chromosome_Data_Manipulation is -- Global variables -- -- Initial_System is the Cheddar-ADL model -- of the initial design Initial_System : System; -- Hyperperiod_of_Initial_Taskset is the hyperperiod -- of the initial design -- Hyperperiod_of_Initial_Taskset : integer; -- The_Scheduler is the priority assignment -- policy used in the scheduling simulation The_Scheduler : Schedulers_Type; -- values of Task_priority and Sched_policy varaibles -- depend of the The_Scheduler value -- for example: -- *) The_Scheduler = Rate_Monotonic_Protocol -- =>> Task_priority = 1 || Sched_policy = SCHED_FIFO -- *) The_Scheduler = Earliest_Deadline_First_Protocol -- =>> Task_priority = 0 || Sched_policy = SCHED_OTHERS -- Task_priority : Integer; Sched_policy : Policies; -- This variable represents the maximum hyperperiod -- of the explored solutions -- Max_hyperperiod : integer; -- This variable is used to differentiate the cases: -- when Using_preprocessed_initial_sol = false; i.e. the initial -- solution is 1-1 fcts-tasks mapping -- otherwise, we use the preprocessed initial solution -- Using_preprocessed_initial_sol : boolean := false; One_to_one_mapping_solution : solution; -- These subprograms are the specific implementation -- of PAES generic subprograms, that will be used -- in order to instanciate PAES_method/Exhaustive_method -- for the F2T architecture exploration problem -- procedure init_F2T; procedure mutate_F2T (s : in out solution; eidx : in Natural); procedure generate_next_solution_F2T (s : in out solution; m : in out chrom_Type; space_search_is_exhausted : out boolean); -- This procedure is used to normalize a mutated solution -- exemple to normalize a solution: -- [5 2 5 3 4 5 2] => after normalization [1 2 1 3 4 1 2] -- procedure normalize(s : in out solution); -- This function returns true if the function with "function_index" -- index is the only function assigned to the task that it belongs -- according the solution "s" -- function is_isolated(function_index : integer; s : solution) return boolean; -- This function returns the number of tasks from a given -- candidate solution "s" -- function Number_of_tasks (s : in solution) return integer; -- This procedure applies F2T rules on a given candidate solution "S" -- in order to generate the corresponding CheddarADL model -- --Procedure Appling_clustering_rules (A_sys : in out System; -- s : in solution); Procedure Transform_Chromosome_To_CheddarADL_Model (A_sys : in out System; s : in solution); -- This procedure creates a CheddarADL model a core_unit, a processor -- and an address_Space -- procedure Create_system (A_system : in out System); end Chromosome_Data_Manipulation;