RecoSim  1.0
 All Classes Files Functions Variables Enumerations
Public Member Functions | List of all members
Reconfiguration_manager Class Reference
Inheritance diagram for Reconfiguration_manager:
Reconfiguration_manager_base Scheduler_interface Monitoring_interface QoS_interface

Public Member Functions

 Reconfiguration_manager (sc_module_name instname, vector< RZ * > rzs, vector< Task > tasks, void(*handler)(Scheduler_interface &), FPGA *device, ofstream &logfile, sc_trace_file *mtf, map< string, RZ_config * > &table)
 
virtual void b_transport_module (int id, tlm_generic_payload &trans, sc_time &delay)
 
virtual void b_transport_testbench (int id, tlm_generic_payload &trans, sc_time &delay)
 
void Scheduler_display_waiting_queue (void) const
 Display waiting queue.
 
bool Scheduler_are_tasks_waiting (void) const
 Check if there are tasks waiting in the queue. More...
 
int Scheduler_get_waiting_queue_size (void)
 Get waiting queue size. More...
 
int Scheduler_position_of_current_element (void)
 Get position of the current waiting queue element. More...
 
SchedulerRequestScheduler_get_element (int position)
 Get a reference to an element in the queue. More...
 
void Scheduler_update_queue (void)
 Update priority queue after changes (e.g. priority change)
 
bool Scheduler_last_task_waiting (void) const
 Reserved.
 
void Scheduler_erase_current_task_waiting ()
 Reserved.
 
SchedulerRequestScheduler_current_task_waiting ()
 Get request with the current task in waiting queue. More...
 
SchedulerRequest Scheduler_next_task_waiting ()
 Reserved.
 
void Scheduler_reset_current_position_in_waiting_queue ()
 Reserved.
 
void display_waiting_queue (void) const
 
- Public Member Functions inherited from Reconfiguration_manager_base
 SC_HAS_PROCESS (Reconfiguration_manager_base)
 
 Reconfiguration_manager_base (sc_module_name instname, vector< RZ * > rzs, vector< Task > tasks, void(*handler)(Scheduler_interface &), FPGA *device, ofstream &logfile, sc_trace_file *mtf, map< string, RZ_config * > &table)
 
int addApplication (string appName, string appPrefix, vector< Manager_interface * > table, double qos, int appInstanceID=-1)
 
void applicationDefined (void)
 
void set_scheduler_execution_time (sc_time t)
 
void set_generate_zeros_in_csv (bool gen)
 
void display_occupation_rates (void)
 
void generateSimulationResultFile (void)
 
void update_occupation_rate_end_simulation (void)
 
void enable_debug_signals_trace (void)
 
void activate_trace (void)
 
void generateCSVResultFile (string filename)
 
bool isSimulationOK (void)
 
vector< RZ * > Scheduler_get_compatible_rz_vector (int task_id)
 Get the list of reconfigurable zones that fit task 'task_id'. More...
 
sc_time Scheduler_get_task_running_time (int task_id)
 Get running time of the task since the last idle state. More...
 
vector< RZ * > Scheduler_get_all_rz_vector (void)
 Get the list of all reconfigurable zones used in the architecture. More...
 
int Scheduler_get_current_module_ID (RZ *rz)
 Get ID of task currently instantiated on a reconfigurable zone. More...
 
bool Scheduler_is_RZ_blank (RZ *rz)
 Check if RZ is blank or used by a task. More...
 
int Scheduler_get_module_ID (SchedulerRequest &)
 Retrieve task ID associated with shceduler request. More...
 
int Scheduler_get_application_number (void)
 Get the number of applications. More...
 
Application_interfaceScheduler_get_application_interface (int index)
 Get the application interface from an index. More...
 
bool Scheduler_exist_rz_properties (string inst_name)
 test if the RZ properties of the instance exists (Processor or Hw RZ) More...
 
bool Scheduler_exist_rz_properties (RZ *rz)
 test if the RZ properties of the instance exists (Processor or Hw RZ) More...
 
RZ_configScheduler_get_rz_properties (string inst_name)
 Get the RZ properties of the instance (Processor or Hw RZ) More...
 
RZ_configScheduler_get_rz_properties (RZ *rz)
 Get the RZ properties of the RZ (Processor or Hw RZ) More...
 
Config_fct_pointScheduler_get_current_fct_point (RZ *rz)
 Get the current fct. point of the RZ (Processor or Hw RZ) More...
 
void Scheduler_emulate_scheduler_behavior (void)
 Emulate scheduler behaviour in terms of execution time and energy consumption.
 
void Scheduler_set_scheduler_active (int taskid)
 Set scheduler active for task 'taskid'. More...
 
bool Scheduler_has_task_already_requested_mapping (int task_to_map, int request_owner)
 Check if a task placement has already been demanded by the same predecessor. More...
 
void Scheduler_add_finished_precedence (int task_mapped, int precedence)
 Add a new finished precedence to a task. More...
 
void Scheduler_notify_request_owner_module_ready (int owner, int ready)
 Notify the owner of a request that it has been granted (i.e. the module is instantiated on the FPGA and ready to receive data). More...
 
void Scheduler_send_update_parameters_to_module (RZ *rz)
 Send parameters to update algorithms. More...
 
void Scheduler_print_finished_precedence_vector (int task_id)
 Prints the list of finished predecessors for a task. More...
 
void Scheduler_configure_task (RZ *rz, int id, int implID, int requestOwner)
 Launch task configuration through either HW of SW reconfiguration unit. More...
 
void Scheduler_rerun_task (SchedulerRequest &)
 Changes a task from MAPPED to RUNNING state. More...
 
void Scheduler_set_current_task (RZ *rz, int task_id)
 Set current task hosted by a reconfigurable zone. More...
 
Task_state Scheduler_get_task_state (int task_id)
 Get task state. More...
 
bool Scheduler_set_blank (RZ *rz)
 Set blank a reconfigurable zone. More...
 
bool Scheduler_set_blank (int hosting_rz_id)
 Set blank a reconfigurable zone. More...
 
Task_state Scheduler_get_task_state (RZ *rz)
 Get state of the task instantiated on a reconfigurable zone. More...
 
bool Scheduler_is_task_preempted (int taskid) const
 Check if task is preempted. More...
 
double Scheduler_get_performance_effort (void) const
 Get scheduler performance effort. More...
 
double Scheduler_get_power_effort (void) const
 Get scheduler power effort. More...
 
double Scheduler_get_area_effort (void) const
 Get scheduler area effort. More...
 
const char * Scheduler_get_name (void) const
 Get scheduler instance name. More...
 
ostream & Scheduler_get_output_stream (void)
 Get output stream. More...
 
void Scheduler_display_task_state_table (void) const
 Display task state table on the standard output.
 
void Scheduler_display_rz_current_module_table (void) const
 Displays RZ occupation on the standard output.
 
Task_to_schedule_interfaceScheduler_get_task_to_schedule_ptr (int taskID)
 Get pointer to the task 'taskID'.
 
void setMonitoringEvent (int threadNumber)
 
void notifyStartOfSchedulingEventMonitoringEvent ()
 
void notifyEndOfSchedulingEventMonitoringEvent ()
 
void notifyUpdateRZStateEvent ()
 
void notifyUpdateTaskStateEvent ()
 
RZ_configgetRZProperties (string inst_name)
 Get the RZ properties of the instance (Processor or RZ) More...
 
sc_event & endOfSchedulingEvent (int id)
 Get the event notified at the end of the scheduling decision. The monitoring thread can wait on the event. More...
 
sc_event & startOfSchedulingEvent (int id)
 Get the event notified at the start of the scheduling decision. The monitoring thread can wait on the event. More...
 
sc_event & updateRZStateEvent (int id)
 Get the event notified when the RZ state changed. The monitoring thread can wait on the event. More...
 
sc_event & updateTaskStateEvent (int id)
 Get the event notified when the task state changed. The monitoring thread can wait on the event. More...
 
vector< Application > & getApplications ()
 Get the list of application(s) More...
 
sc_trace_file * getTraceFile () const
 Get the trace file. More...
 
Scheduler_interfacegetShedulerInterface ()
 Get the scheduler interface. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from Reconfiguration_manager_base
static vector< Application > * getApplicationVectorPtr (void)
 
static void endApplication (string appname, bool ok)
 
static void verifySimulationTimes (void)
 
static sc_time getMaximumSimulationTime (void)
 
static FPGAgetFPGAptr (void)
 
- Public Attributes inherited from Reconfiguration_manager_base
multi_passthrough_target_socket
< Reconfiguration_manager_base
module_target_socket
 
multi_passthrough_target_socket
< Reconfiguration_manager_base
testbench_target_socket
 
multi_passthrough_initiator_socket
< Reconfiguration_manager_base
module_initiator_socket
 
multi_passthrough_initiator_socket
< Reconfiguration_manager_base
testbench_initiator_socket
 
- Protected Member Functions inherited from Reconfiguration_manager_base
void scheduler_thread (void)
 
void send_next_module_ready (int module_id, int module_ready_id)
 
void send_current_module_ready (int module_id)
 
void send_module_ready_to_testbench (int tbid, int module_ready_id)
 
void notify_request_owner_module_ready (int owner_id, int ready_module_id)
 
void send_update_parameters (int module_id, Algorithm_Parameters *rz)
 
void init_maps (void)
 
void transcoder_initialisation_method (int id, sc_dt::uint64 data)
 
void configure_task (int id, int implID, RZ *rz)
 
void reconfiguration_engine_thread (void)
 
void hardware_reconfiguration_engine_thread (int unitID)
 
void software_reconfiguration_engine_thread (int unitID)
 
void check_deadline (int task_id)
 
void notify_simulation_controller (void)
 
bool is_task_preempted (int id) const
 
bool is_task_preempted (string taskname) const
 
void add_task_to_preemption_list (int id)
 
void remove_task_from_preemption_list (int id)
 
void set_target_phase (tlm_phase phase)
 
void set_icap_reconf_task (int hw_unit, int id)
 
void set_icap_idle (int hw_unit)
 
void set_software_loader_config_task (int sw_unit, int id)
 
void set_software_loader_idle (int sw_unit)
 
void set_task_state (int id, int rz_id, Task_state state)
 
void set_rz_state (int rz_id, RZState state)
 
int get_hosting_rz_id (int taskid)
 
void update_occupation_rate (int rz_id, RZState newState)
 
void set_initiator_phase (int id, tlm_phase phase)
 
void set_scheduler_idle (void)
 
void set_scheduler_active (int taskID)
 
void occupation_rate_update_thread (void)
 
void update_resources_trace (int rz_id, int task_id)
 
void update_processor_occupation_rate (void)
 
void set_hyperperiod_status (int hpid)
 
void display_map_compatible_RZ (void)
 
void display_map_current_module (void)
 
void display_task_state_table (void) const
 
void display_rz_current_module_table (void) const
 
bool task_runs_on_implementation_type (int taskID, PEImplementation impl)
 
int getApplicationIncludingTask (int taskID)
 
void deadline_check_thread (int appID)
 
int getRZID (RZ *rz)
 
void set_task_context_save (int task_id, int rz_id)
 
void set_task_context_restore (int task_id, int rz_id)
 
int get_module_ID (string moduleName)
 
void update_deadline (int modID)
 
void rz_configuration_request_thread (int rzid)
 
- Protected Attributes inherited from Reconfiguration_manager_base
Memory_manager m_mm
 
sc_event scheduler_thread_event
 
ofstream * fout
 
sc_trace_file * tf
 
trace_packet_manager_ttrace_packet
 
map< int, vector< RZ * > > map_compatible_rz
 
map< RZ *, int > map_current_module
 
vector< Task_statetask_state_table
 
vector< Manager_interface * > modules_table
 
vector< RZ * > rz_table
 
TaskImplementationprevious_implementation_on_RZ
 
TaskImplementationcurrent_implementation_on_RZ
 
vector< int > preempted_tasks_list
 
vector< Running_time_informationrunning_time_table
 
ReconfigurationUnithw_reconfiguration_units
 
list< ConfigurationRequestreconfiguration_waiting_list
 
sc_event * hw_reconfiguration_event_table
 
ReconfigurationUnitsw_reconfiguration_units
 
list< ConfigurationRequestsoftware_reconfiguration_waiting_list
 
sc_event * sw_reconfiguration_event_table
 
void(* waiting_queue_handler_ptr )(Scheduler_interface &)
 
int nb_calls_scheduler
 
sc_time scheduler_busy_time
 
vector< vector< int > > finished_precedence_vectors
 
vector< sc_event * > monitoring_end_of_scheduling_event_list
 
vector< sc_event * > monitoring_start_of_scheduling_event_list
 
vector< sc_event * > monitoring_update_rz_state_event_list
 
vector< sc_event * > monitoring_update_task_state_event_list
 
QoS_managementqos_management
 
vector< Tasktask_table
 
double total_energy_consumption
 
map< string, RZ_config * > rz_parameter_table
 
sc_time * deadlines_table
 
sc_buffer< ConfigurationRequest > * rz_configuration_request_buffer
 
sc_event * rz_configured_event
 
bool simulationOK
 
- Static Protected Attributes inherited from Reconfiguration_manager_base
static sc_time SCHEDULER_EXECUTION_TIME = sc_time(0, SC_US)
 
static double SCHEDULER_ENERGY_CONSUMPTION = 0
 
static double ENERGY_CONSUMPTION_LIMIT = 5000
 
static bool GENERATE_ZERO_FILLED_LINE_IN_CSV = false
 
static double SCHEDULER_PERFORMANCE_EFFORT = 100
 
static double SCHEDULER_POWER_EFFORT = 0
 
static double SCHEDULER_AREA_EFFORT = 0
 
static int NB_HW_RECONFIGURATION_UNITS = 1
 
static int NB_SW_RECONFIGURATION_UNITS = 1
 
static bool ALL_DEPENDENCIES_REQUIRED_BEFORE_REQUEST = true
 
static sc_time TRACE_WINDOW_FUNCTION_LENGTH = sc_time(10000.0, SC_US)
 
static sc_time MAXIMUM_SIMULATION_TIME = sc_time(5.0, SC_SEC)
 
static int nbApplicationTerminated = 0
 
static int RZ_TASK_BLANK = -1
 
static bool CONSIDER_WAITING_STATE_AS_RUNNING_MODE = false
 
static bool SEND_CONFIGURATION_NOTIFICATION_AFTER_IDLE_STATE = true
 
static vector< ApplicationapplicationVector
 
static FPGAfpga = 0
 

Member Function Documentation

void Reconfiguration_manager::b_transport_module ( int  id,
tlm_generic_payload &  trans,
sc_time &  delay 
)
virtual

Blocking transport function, called by any module identified by its id. The function checks whether it is a 'End of computation' request or a 'Preemption point found' request (not handled yet). The function then puts into the waiting queue every following module, known using the corresponding list accessible via the Manager interface.

Implements Reconfiguration_manager_base.

void Reconfiguration_manager::b_transport_testbench ( int  id,
tlm_generic_payload &  trans,
sc_time &  delay 
)
virtual

Blocking transport function, called by the testbench. The testbench has to check the availability of the entry point it wants to use. The function puts the entry point into the waiting queue for instantiation.

Implements Reconfiguration_manager_base.

bool Reconfiguration_manager::Scheduler_are_tasks_waiting ( void  ) const
virtual

Check if there are tasks waiting in the queue.

Returns
true if tasks are waiting to be instantiated

Implements Scheduler_interface.

SchedulerRequest & Reconfiguration_manager::Scheduler_current_task_waiting ( )
virtual

Get request with the current task in waiting queue.

brief Get request with the highest priority inside waiting queue return Top request

Returns
request

Implements Scheduler_interface.

SchedulerRequest & Reconfiguration_manager::Scheduler_get_element ( int  position)
virtual

Get a reference to an element in the queue.

Parameters
positionPosition of the element to retrieve from the queue
Returns
Reference to the scheduler request

Implements Scheduler_interface.

int Reconfiguration_manager::Scheduler_get_waiting_queue_size ( void  )
virtual

Get waiting queue size.

brief Remove highest priority request from the queue

Returns
Waiting queue size

Implements Scheduler_interface.

int Reconfiguration_manager::Scheduler_position_of_current_element ( void  )
virtual

Get position of the current waiting queue element.

Returns
Position

Implements Scheduler_interface.


The documentation for this class was generated from the following files: