summaryrefslogtreecommitdiff
path: root/src/sim/dvfs_handler.hh
diff options
context:
space:
mode:
authorBrandon Potter <brandon.potter@amd.com>2016-11-09 14:27:40 -0600
committerBrandon Potter <brandon.potter@amd.com>2016-11-09 14:27:40 -0600
commita928a438b8a005e5b6059bc5db0687bf64abcfa6 (patch)
tree4a69371c4f8efdfe784bce80a63e58f8ace665cc /src/sim/dvfs_handler.hh
parent93d8e6b898a70a3f6dba9da385d5933683bf325f (diff)
downloadgem5-a928a438b8a005e5b6059bc5db0687bf64abcfa6.tar.xz
style: [patch 3/22] reduce include dependencies in some headers
Used cppclean to help identify useless includes and removed them. This involved erroneously included headers, but also cases where forward declarations could have been used rather than a full include.
Diffstat (limited to 'src/sim/dvfs_handler.hh')
-rw-r--r--src/sim/dvfs_handler.hh26
1 files changed, 1 insertions, 25 deletions
diff --git a/src/sim/dvfs_handler.hh b/src/sim/dvfs_handler.hh
index f587f7c25..23ac4bf50 100644
--- a/src/sim/dvfs_handler.hh
+++ b/src/sim/dvfs_handler.hh
@@ -53,13 +53,10 @@
#include <vector>
#include "debug/DVFS.hh"
-#include "params/ClockDomain.hh"
#include "params/DVFSHandler.hh"
-#include "params/VoltageDomain.hh"
#include "sim/clock_domain.hh"
#include "sim/eventq.hh"
#include "sim/sim_object.hh"
-#include "sim/voltage_domain.hh"
/**
* DVFS Handler class, maintains a list of all the domains it can handle.
@@ -156,28 +153,7 @@ class DVFSHandler : public SimObject
* @return Voltage for the requested performance level of the respective
* domain
*/
- double voltageAtPerfLevel(DomainID domain_id, PerfLevel perf_level) const
- {
- VoltageDomain *d = findDomain(domain_id)->voltageDomain();
- assert(d);
- PerfLevel n = d->numVoltages();
- if (perf_level < n)
- return d->voltage(perf_level);
-
- // Request outside of the range of the voltage domain
- if (n == 1) {
- DPRINTF(DVFS, "DVFS: Request for perf-level %i for single-point "\
- "voltage domain %s. Returning voltage at level 0: %.2f "\
- "V\n", perf_level, d->name(), d->voltage(0));
- // Special case for single point voltage domain -> same voltage for
- // all points
- return d->voltage(0);
- }
-
- warn("DVFSHandler %s reads illegal voltage level %u from "\
- "VoltageDomain %s. Returning 0 V\n", name(), perf_level, d->name());
- return 0.;
- }
+ double voltageAtPerfLevel(DomainID domain_id, PerfLevel perf_level) const;
/**
* Get the total number of available performance levels.