Scheduler
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
temperatureAndAgingModel.h
Go to the documentation of this file.
1 
10 #ifndef TEMPERATURE_AND_AGING_MODEL_H
11 #define TEMPERATURE_AND_AGING_MODEL_H
12 
13 #include <string>
14 #include <utility>
15 
16 #include <utils/configuration.h>
17 
18 #include "temperatureModel.h"
19 #include <scheduler/processor.h>
20 
21 namespace Scheduler
22 {
23 
25 {
26 public:
27  static constexpr const char *configKey = "temperatureAndAging";
28 public:
29  TemperatureAndAgingModel(std::shared_ptr<Utils::Configuration> conf);
31  double updateTemperature(double timeInterval, struct PowerParams *params,
32  double taskPowerCoeff, double freq) override;
33  void printTemperatureHistory(std::string filename) override;
34  void printEnergyHistory(std::string filename) override;
35  double getTemperature() override;
36  double getConsumedLifetime();
37 private:
38  static const constexpr double k = 8.617/100000;//Boltzmann constant in eV/K
39  double T0{20.0}; /*previous temperature*/
40  const double Ta{20.0}; /*ambient temperature*/
41  const double R{1.5}; /*thermal resistance*/
42  const double C{150}; /*thermal capacity*/
43  double A{0.0};
44  double T{0.0};
45  double power{0.0};
46  double previousTime{0.0};
47  Utils::Record temperatureHistory;
48  Utils::Record energyHistory;
49  Utils::Record instantaneousAgingHistory;
50  Utils::Record cumulativeAgingHistory;
51  bool logTemperature{false};
52  bool logEnergy{false};
53  bool logAging{false};
54  const double endTime{0.0};
55  double recordingTimeRatio{0.0};
56 
57  double consumedLifetime{0.0};
58  const double activationEnergy{0.0}; //to be expressed in eV
59  const double formFactor{0.0};
60 
61  void computeAndLog();
62  void computeAging();
63 };
64 
65 }
66 
67 
68 
69 #endif
void printTemperatureHistory(std::string filename) override
static constexpr const char * configKey
double updateTemperature(double timeInterval, struct PowerParams *params, double taskPowerCoeff, double freq) override
string filename
Definition: aging.py:5
TemperatureAndAgingModel(std::shared_ptr< Utils::Configuration > conf)
void printEnergyHistory(std::string filename) override