21 #ifndef SCHEDULER_INTERFACE_H
22 #define SCHEDULER_INTERFACE_H
29 #include "application_interface.h"
32 #define MAPPING_ALGORITHM(nom) Return_mapping_information waiting_queue_handler_mapping_ ## nom ## (Scheduler_interface &scheduler)
33 #define SCHEDULING_ALGORITHM(nom) void waiting_queue_handler_scheduling_ ## nom ## (Scheduler_interface &scheduler)
35 #define DEFAULT_MAPPING_ALGORITHM(nom) Return_mapping_information waiting_queue_handler_mapping_ ## nom ## (Scheduler_interface &scheduler) { \
36 return waiting_queue_handler_mapping_default_algo(scheduler); \
39 #define DEFAULT_SCHEDULING_ALGORITHM(nom) void waiting_queue_handler_scheduling_ ## nom ## (Scheduler_interface &scheduler) { \
40 waiting_queue_handler_scheduling_default_algo(scheduler); \
44 #define WAITING_QUEUE_HANDLER(nom) void waiting_queue_handler_## nom ##(Scheduler_interface &scheduler)
45 #define WAITING_QUEUE_HANDLER_REF(nom) waiting_queue_handler_## nom
46 #define CALL_WAITING_QUEUE_HANDLER(nom) waiting_queue_handler_## nom ##(scheduler)
47 #define CALL_MAPPING_ALGORITHM(nom) waiting_queue_handler_mapping_ ## nom ## (scheduler)
48 #define CALL_SCHEDULING_ALGORITHM(nom) waiting_queue_handler_scheduling_ ## nom ## (scheduler)
55 bool exit_mapping_algo;
56 RZ* implementation_RZ;
57 int implementation_ID;
63 exit_mapping_algo =
true;
69 exit_mapping_algo =
true;
70 implementation_RZ = _implementation_RZ;
71 implementation_ID = _implementation_ID;
77 exit_mapping_algo =
true;
78 implementation_RZ = _implementation_RZ;
79 implementation_ID = _implementation_ID;
85 exit_mapping_algo = exit_mapping_algorithm;
86 implementation_RZ = _implementation_RZ;
87 implementation_ID = _implementation_ID;
93 exit_mapping_algo = exit_mapping_algorithm;
94 implementation_RZ = _implementation_RZ;
95 implementation_ID = _implementation_ID;
100 rz_found = other.rz_found;
101 implementation_RZ = other.implementation_RZ;
102 implementation_ID = other.implementation_ID;
103 cfgFctPt = other.cfgFctPt;
112 return cfgFctPt != NULL;
115 bool exit_mapping_algorithm() {
116 return exit_mapping_algo;
119 void set_exit_mapping_algo(
bool exit_mapping_algorithm) {
120 exit_mapping_algo = exit_mapping_algorithm;
123 RZ* get_implementation_RZ() {
124 return implementation_RZ;
127 int get_implementation_ID() {
128 return implementation_ID;
500 MAPPING_ALGORITHM(default_algo);
501 SCHEDULING_ALGORITHM(default_algo);
505 MAPPING_ALGORITHM(AMAP_EDF);
506 SCHEDULING_ALGORITHM(AMAP_EDF);
virtual void Scheduler_print_finished_precedence_vector(int task_id)=0
Prints the list of finished predecessors for a task.
virtual int Scheduler_get_module_ID(SchedulerRequest &req)=0
Retrieve task ID associated with shceduler request.
virtual sc_time Scheduler_get_task_running_time(int task_id)=0
Get running time of the task since the last idle state.
virtual void Scheduler_set_current_task(RZ *rz, int task_id)=0
Set current task hosted by a reconfigurable zone.
virtual int Scheduler_get_application_number(void)=0
Get the number of applications.
virtual void Scheduler_emulate_scheduler_behavior(void)=0
Emulate scheduler behaviour in terms of execution time and energy consumption.
virtual bool Scheduler_are_tasks_waiting(void) const =0
Check if there are tasks waiting in the queue.
virtual SchedulerRequest & Scheduler_get_element(int position)=0
Get a reference to an element in the queue.
Definition: task_to_schedule_interface.h:28
virtual int Scheduler_get_current_module_ID(RZ *rz)=0
Get ID of task currently instantiated on a reconfigurable zone.
virtual RZ_config & Scheduler_get_rz_properties(string inst_name)=0
Get the RZ properties of the instance (Processor or Hw RZ)
virtual Application_interface * Scheduler_get_application_interface(int index)=0
Get the application interface from an index.
virtual SchedulerRequest & Scheduler_current_task_waiting()=0
Get request with the current task in waiting queue.
virtual Task_to_schedule_interface * Scheduler_get_task_to_schedule_ptr(int taskID)=0
Get pointer to the task 'taskID'.
virtual bool Scheduler_has_task_already_requested_mapping(int task_to_map, int request_owner)=0
Check if a task placement has already been demanded by the same predecessor.
virtual int Scheduler_get_waiting_queue_size(void)=0
Get waiting queue size.
virtual Task_state Scheduler_get_task_state(int task_id)=0
Get task state.
virtual void Scheduler_display_rz_current_module_table(void) const =0
Displays RZ occupation on the standard output.
Definition: config_fct_point.h:31
Definition: reconfigurable_zone.h:62
virtual void Scheduler_set_scheduler_active(int taskid)=0
Set scheduler active for task 'taskid'.
virtual vector< RZ * > Scheduler_get_compatible_rz_vector(int task_id)=0
Get the list of reconfigurable zones that fit task 'task_id'.
virtual ostream & Scheduler_get_output_stream(void)=0
Get output stream.
virtual void Scheduler_display_task_state_table(void) const =0
Display task state table on the standard output.
WAITING_QUEUE_HANDLER(default_algo)
Definition: scheduling.cpp:176
Definition: rz_config.h:36
virtual void Scheduler_display_waiting_queue(void) const =0
Display waiting queue.
virtual void Scheduler_rerun_task(SchedulerRequest &req)=0
Changes a task from MAPPED to RUNNING state.
virtual bool Scheduler_is_task_preempted(int taskid) const =0
Check if task is preempted.
virtual double Scheduler_get_power_effort(void) const =0
Get scheduler power effort.
virtual double Scheduler_get_area_effort(void) const =0
Get scheduler area effort.
virtual double Scheduler_get_performance_effort(void) const =0
Get scheduler performance effort.
virtual const char * Scheduler_get_name(void) const =0
Get scheduler instance name.
virtual Config_fct_point & Scheduler_get_current_fct_point(RZ *rz)=0
Get the current fct. point of the RZ (Processor or Hw RZ)
Definition: application_interface.h:29
Definition: scheduler_request.h:47
virtual bool Scheduler_last_task_waiting(void) const =0
Reserved.
virtual SchedulerRequest Scheduler_next_task_waiting()=0
Reserved.
Task_state
Definition: task_implementation.h:40
virtual bool Scheduler_set_blank(int hosting_rz_id)=0
Set blank a reconfigurable zone.
virtual bool Scheduler_is_RZ_blank(RZ *rz)=0
Check if RZ is blank or used by a task.
virtual vector< RZ * > Scheduler_get_all_rz_vector(void)=0
Get the list of all reconfigurable zones used in the architecture.
Definition: scheduler_interface.h:138
virtual void Scheduler_update_queue(void)=0
Update priority queue after changes (e.g. priority change)
virtual void Scheduler_reset_current_position_in_waiting_queue()=0
Reserved.
virtual bool Scheduler_exist_rz_properties(string inst_name)=0
test if the RZ properties of the instance exists (Processor or Hw RZ)
virtual void Scheduler_notify_request_owner_module_ready(int owner, int ready)=0
Notify the owner of a request that it has been granted (i.e. the module is instantiated on the FPGA a...
virtual void Scheduler_send_update_parameters_to_module(RZ *rz)=0
Send parameters to update algorithms.
virtual void Scheduler_erase_current_task_waiting()=0
Reserved.
virtual void Scheduler_configure_task(RZ *rz, int id, int implID, int requestOwner)=0
Launch task configuration through either HW of SW reconfiguration unit.
virtual void Scheduler_add_finished_precedence(int task_mapped, int precedence)=0
Add a new finished precedence to a task.
virtual int Scheduler_position_of_current_element(void)=0
Get position of the current waiting queue element.