Go to the documentation of this file.
46 #ifndef __SIM_DVFS_HANDLER_HH__
47 #define __SIM_DVFS_HANDLER_HH__
51 #include "debug/DVFS.hh"
52 #include "params/DVFSHandler.hh"
137 return d->clkPeriodAtPerfLevel(perf_level);
139 warn(
"DVFSHandler %s reads illegal frequency level %u from "\
140 "SrcClockDomain %s. Returning 0\n",
name(), perf_level,
d->name());
177 typedef std::map<DomainID, SrcClockDomain*>
Domains;
197 auto it =
domains.find(domain_id);
199 "DVFS: Could not find a domain for ID %d.\n",domain_id );
200 return domains.find(domain_id)->second;
260 #endif // __SIM_DVFS_HANDLER_HH__
PerfLevel numPerfLevels() const
Get the number of available performance levels for this clock domain.
Update performance level event, encapsulates all the required information for a future call to change...
PerfLevel numPerfLevels(PerfLevel domain_id) const
Get the total number of available performance levels.
SrcClockDomain * sysClkDomain
Clock domain of the system the handler is instantiated.
SrcClockDomain * findDomain(DomainID domain_id) const
Search for a domain based on the domain ID.
uint64_t Tick
Tick count type.
The source clock domains provides the notion of a clock domain that is connected to a tunable clock s...
double voltageAtPerfLevel(DomainID domain_id, PerfLevel perf_level) const
Read the voltage of the specified domain at the specified performance level.
bool validDomainID(DomainID domain_id) const
Check whether a domain ID is known to the handler or not.
UpdatePerfLevelEvents updatePerfLevelEvents
Map from domain IDs -> perf level update events, records in-flight change requests per domain ID.
bool isEnabled() const
Check enable status of the DVFS handler, when the handler is disabled, no request should be sent to t...
Tick clkPeriodAtPerfLevel(DomainID domain_id, PerfLevel perf_level) const
Read the clock period of the specified domain at the specified performance level.
static DVFSHandler * dvfsHandler
Static pointer to the single DVFS hander for all the update events.
bool enableHandler
Disabling the DVFS handler ensures that all the DVFS migration requests are ignored.
void unserialize(CheckpointIn &cp) override
Unserialize an object.
DomainID domainIDToSet
ID of the domain that will be changed by the in-flight event.
PerfLevel perfLevelToSet
Target performance level of the in-flight event.
static const Priority DVFS_Update_Pri
DVFS update event leads to stats dump therefore given a lower priority to ensure all relevant states ...
uint32_t numDomains() const
Get the number of domains assigned to this DVFS handler.
DomainID domainID(uint32_t index) const
Get the n-th domain ID, from the domains managed by this handler.
void serialize(CheckpointOut &cp) const override
Serialize an object.
std::vector< DomainID > domainIDList
List of IDs avaiable in the domain list.
Tick transLatency() const
Get transition latency to switch between performance levels.
virtual const std::string name() const
std::map< DomainID, SrcClockDomain * > Domains
#define panic_if(cond,...)
Conditional panic macro that checks the supplied condition and only panics if the condition is true a...
void perfLevel(PerfLevel perf_level)
Sets the current performance level of the domain.
SrcClockDomain::DomainID DomainID
std::ostream CheckpointOut
const Tick _transLatency
This corresponds to the maximum transition latency associated with the hardware transitioning from a ...
SrcClockDomain::PerfLevel PerfLevel
DVFSHandler(const Params *p)
void updatePerfLevel()
Updates the performance level by modifying the clock and the voltage of the associated clocked object...
std::map< DomainID, UpdateEvent > UpdatePerfLevelEvents
bool perfLevel(DomainID domain_id, PerfLevel perf_level)
Set a new performance level for the specified domain.
PerfLevel perfLevel(DomainID domain_id) const
Get the current performance level of a domain.
DVFS Handler class, maintains a list of all the domains it can handle.
Abstract superclass for simulation objects.
Generated on Wed Sep 30 2020 14:02:14 for gem5 by doxygen 1.8.17