diff options
author | Nilay Vaish <nilay@cs.wisc.edu> | 2014-10-11 15:02:23 -0500 |
---|---|---|
committer | Nilay Vaish <nilay@cs.wisc.edu> | 2014-10-11 15:02:23 -0500 |
commit | e8ed7b1d1b5bef31e9874f679a5797c2e00d06f1 (patch) | |
tree | 421c9c50377aa664958685914f5504c4c019e21f /ext/dsent/model/TransitionInfo.h | |
parent | a098fad174d8559037602b248b8e6f7f46bfebbb (diff) | |
download | gem5-e8ed7b1d1b5bef31e9874f679a5797c2e00d06f1.tar.xz |
ext: add the source code for DSENT
This patch adds a tool called DSENT to the ext/ directory. DSENT
is a tool that models power and area for on-chip networks. The next
patch adds a script for using the tool.
Diffstat (limited to 'ext/dsent/model/TransitionInfo.h')
-rw-r--r-- | ext/dsent/model/TransitionInfo.h | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/ext/dsent/model/TransitionInfo.h b/ext/dsent/model/TransitionInfo.h new file mode 100644 index 000000000..6f00cb86a --- /dev/null +++ b/ext/dsent/model/TransitionInfo.h @@ -0,0 +1,50 @@ +#ifndef __DSENT_MODEL_TRANSITION_INFO_H__ +#define __DSENT_MODEL_TRANSITION_INFO_H__ + +#include "util/CommonType.h" + +namespace DSENT +{ + /** + * \brief This class contains the number of transitions and the frequency multiplier information + */ + class TransitionInfo + { + public: + TransitionInfo(); + TransitionInfo(double number_transitions_00_, double number_transitions_01_, double number_transitions_11_); + ~TransitionInfo(); + + public: + inline double getNumberTransitions00() const { return m_number_transitions_00_; } + inline double getNumberTransitions01() const { return m_number_transitions_01_; } + inline double getNumberTransitions11() const { return m_number_transitions_11_; } + inline double getFrequencyMultiplier() const { return m_frequency_multiplier_; } + inline double getProbability0() const { return m_probability_1_; } + inline double getProbability1() const { return m_probability_1_; } + + inline void setNumberTransitions00(double value_) { m_number_transitions_00_ = value_; } + inline void setNumberTransitions01(double value_) { m_number_transitions_01_ = value_; } + inline void setNumberTransitions11(double value_) { m_number_transitions_11_ = value_; } + inline void setFrequencyMultiplier(double value_) { m_frequency_multiplier_ = value_; } + + void update(); + TransitionInfo scaleFrequencyMultiplier(double frequency_multiplier_) const; + + void print(std::ostream& ost_) const; + + private: + // m_number_transitions_xy_ defines number of transitions from x to y + double m_number_transitions_00_; + double m_number_transitions_01_; + double m_number_transitions_11_; + // The multiplier that defines the ratio of the transition frequency and the main core clock frequency + double m_frequency_multiplier_; + // Probability of being at state 0/1 + double m_probability_0_; + double m_probability_1_; + }; // class TransitionInfo +} // namespace DSENT + +#endif // __DSENT_MODEL_TRANSITION_INFO_H__ + |