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