start_section : cpu0_log : array (time_units_range) of integer; cpu1_log : array (time_units_range) of integer; cpu2_log : array (time_units_range) of integer; cpu3_log : array (time_units_range) of integer; is_task : boolean; aux : integer; i : integer; j : integer; fff : string; end section; priority_section : aux := 1000000; is_task := false; for i in tasks_range loop if (simulation_time = 0) then fff := tasks.processor_name(i); put(fff, 0, 0); end if; if (tasks.ready(i)) and (tasks.period(i) < aux) then if (simulation_time = 0) then put(fff, 0, 0); end if; aux := tasks.period(i); j := i; is_task := true; end if; end loop; i := j; if (is_task = true) then if (tasks.cpu_nb(i) = 0) then cpu0_log(simulation_time) := 1; end if; if (tasks.cpu_nb(i) = 1) then cpu1_log(simulation_time) := 1; end if; if (tasks.cpu_nb(i) = 2) then cpu2_log(simulation_time) := 1; end if; if (tasks.cpu_nb(i) = 3) then cpu3_log(simulation_time) := 1; end if; end if; if (simulation_time = simulation_length - 1) then put(cpu0_log, 0, 99); put(cpu1_log, 1, 99); put(cpu2_log, 2, 99); put(cpu3_log, 3, 99); end if; end section; election_section : return min_to_index(tasks.period); end section;