22 #ifndef TASK_IMPLEMENTATION_H
23 #define TASK_IMPLEMENTATION_H
25 #define SC_INCLUDE_DYNAMIC_PROCESSES
36 enum RZState {RZ_BLANK, RZ_RECONFIG, RZ_MAPPED, RZ_ACTIVE, RZ_RUNNING};
37 const string RZState_string[
NB_RZ_STATES] = {
"Blank",
"Reconfiguring",
"Mapped",
"Active",
"Running"};
40 enum Task_state {INACTIVE, QUEUED, CONFIG, MAPPED, RUNNING, PREEMPTED_MAPPED, PREEMPTED_INACTIVE, WAITING, IDLE, STATIC, CONTEXT_SAVE, CONTEXT_RESTORE};
41 const string Task_state_string[12] = {
"INACTIVE",
"QUEUED",
"CONFIG",
"MAPPED",
"RUNNING",
"PREEMPTED_MAPPED",
"PREEMPTED_INACTIVE",
"WAITING",
"IDLE",
"STATIC",
"CONTEXT_SAVE",
"CONTEXT_RESTORE"};
50 string implementation_name;
53 string algorithm_name;
55 sc_time compressedReconfigurationTime;
56 sc_time preloadReconfigurationTime;
57 sc_time contextSwitchTime;
59 map<RZState, sc_time> occupationTimes;
64 sc_time worst_case_execution_time;
65 sc_time best_case_execution_time;
66 double energy_consumption;
77 compressedReconfigurationTime = sc_time(comp, SC_NS);
78 preloadReconfigurationTime = sc_time(preload, SC_NS);
79 contextSwitchTime = sc_time(switchTime, SC_NS);
84 size_t position(full_name.find_last_of(
"."));
85 implementation_name = full_name.substr(position + 1, full_name.size());
86 task_name = full_name.substr(0, position);
89 occupationTimes[RZ_RUNNING] = SC_ZERO_TIME;
90 occupationTimes[RZ_ACTIVE] = SC_ZERO_TIME;
100 string getFullName(
void);
101 string getTaskName(
void);
102 string getImplementationName(
void);
103 string getNetlistName(
void);
104 string getAlgorithmName(
void);
106 sc_time getCompressedReconfigurationTime(
void);
107 sc_time getPreloadReconfigurationTime(
void);
108 sc_time getContextSwitchTime(
void);
109 void addOccupationTime(RZState state, sc_time t);
110 sc_time getOccupationTime(RZState state);
112 sc_time getWorstCaseExecutionTime(
void)
const;
113 sc_time getBestCaseExecutionTime(
void)
const;
114 double getFrequency(
void)
const;
115 double getEnergyConsumption(
void)
const;
116 double getPidle(
void)
const;
117 double getPrun(
void)
const;
119 void setWorstCaseExecutionTime(sc_time);
120 void setBestCaseExecutionTime(sc_time);
121 void setFrequency(
double);
122 void setEnergyConsumption(
double);
123 void setPidle(
double);
124 void setPrun(
double);
125 void setNetlistName(
string);
126 void setAlgorithmName(
string);
const int NB_RZ_STATES
Definition: task_implementation.h:35
Task_state
Definition: task_implementation.h:40
Definition: task_implementation.h:46