44#include "debug/VoltageDomain.hh"
45#include "params/VoltageDomain.hh"
52 :
SimObject(
p), voltageOpPoints(
p.voltage), _perfLevel(0), stats(*this)
55 "voltage domain %s\n",
name());
59 std::greater<Voltages::value_type>()),
"DVFS: Voltage operation "\
60 "points not in descending order for voltage domain %s\n",
68 "DVFS: Requested voltage ID %d is outside the known "\
69 "range for domain %s.\n", perf_level,
name());
94 gem5_assert(
d->voltageDomain() ==
this,
"DVFS: Clock domain %s "\
95 "(id: %d) should not be registered with voltage domain "\
96 "%s\n",
d->name(),
d->domainID(),
name());
101 "level %d\n",
d->
name(),
d->domainID(), perf);
104 if (perf < perf_max) {
126 warn(
"DVFS: Perf level for voltage domain %s adapted to "\
127 "requested perf levels from source clock domains.\n",
name());
146 ADD_STAT(voltage, statistics::units::Volt::get(),
"Voltage in Volts")
virtual std::string name() const
Abstract superclass for simulation objects.
The source clock domains provides the notion of a clock domain that is connected to a tunable clock s...
A VoltageDomain is used to group clock domains that operate under the same voltage.
PerfLevel perfLevel() const
Get the voltage point of the domain.
double voltage() const
Get the current voltage.
const Voltages voltageOpPoints
List of possible minimum voltage at each of the frequency operational points, should be in descending...
void unserialize(CheckpointIn &cp) override
Unserialize an object.
VoltageDomainParams Params
void startup() override
Startup has all SrcClockDomains registered with this voltage domain, so try to make sure that all per...
void serialize(CheckpointOut &cp) const override
Serialize an object.
uint32_t numVoltages() const
SrcClockChildren srcClockChildren
bool sanitiseVoltages()
Recomputes the highest (fastest, i.e., numerically lowest) requested performance level of all associa...
SrcClockDomain::PerfLevel PerfLevel
VoltageDomain(const Params &p)
Derived & method(T *obj, V(T::*method)() const)
Extended functor that calls the specified method of the provided object.
#define ADD_STAT(n,...)
Convenience macro to add a stat to a statistics group.
#define fatal_if(cond,...)
Conditional fatal macro that checks the supplied condition and only causes a fatal error if the condi...
#define gem5_assert(cond,...)
The assert macro will function like a normal assert, but will use panic instead of straight abort().
Copyright (c) 2024 - Pranith Kumar Copyright (c) 2020 Inria All rights reserved.
std::ostream CheckpointOut
#define UNSERIALIZE_SCALAR(scalar)
#define SERIALIZE_SCALAR(scalar)
VoltageDomainStats(VoltageDomain &vd)
statistics::Value voltage
Stat for reporting voltage of the domain.