50 #ifndef __SIM_DVFS_HANDLER_HH__
51 #define __SIM_DVFS_HANDLER_HH__
55 #include "debug/DVFS.hh"
56 #include "params/DVFSHandler.hh"
143 warn(
"DVFSHandler %s reads illegal frequency level %u from "\
144 "SrcClockDomain %s. Returning 0\n",
name(), perf_level, d->
name());
181 typedef std::map<DomainID, SrcClockDomain*>
Domains;
201 auto it =
domains.find(domain_id);
203 "DVFS: Could not find a domain for ID %d.\n",domain_id );
204 return domains.find(domain_id)->second;
264 #endif // __SIM_DVFS_HANDLER_HH__
std::map< DomainID, UpdateEvent > UpdatePerfLevelEvents
SrcClockDomain * findDomain(DomainID domain_id) const
Search for a domain based on the domain ID.
bool perfLevel(DomainID domain_id, PerfLevel perf_level)
Set a new performance level for the specified domain.
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 enableHandler
Disabling the DVFS handler ensures that all the DVFS migration requests are ignored.
panic_if(!root,"Invalid expression\n")
bool validDomainID(DomainID domain_id) const
Check whether a domain ID is known to the handler or not.
Tick clkPeriodAtPerfLevel(DomainID domain_id, PerfLevel perf_level) const
Read the clock period of the specified domain at the specified performance level. ...
SrcClockDomain * sysClkDomain
Clock domain of the system the handler is instantiated.
bool isEnabled() const
Check enable status of the DVFS handler, when the handler is disabled, no request should be sent to t...
void unserialize(CheckpointIn &cp) override
Unserialize an object.
PerfLevel numPerfLevels() const
Get the number of available performance levels for this clock domain.
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...
Tick transLatency() const
Get transition latency to switch between performance levels.
uint64_t Tick
Tick count type.
PerfLevel numPerfLevels(PerfLevel domain_id) const
Get the total number of available performance levels.
void serialize(CheckpointOut &cp) const override
Serialize an object.
ClockDomain declarations.
void perfLevel(PerfLevel perf_level)
Sets the current performance level of the domain.
DomainID domainIDToSet
ID of the domain that will be changed by the in-flight event.
double voltageAtPerfLevel(DomainID domain_id, PerfLevel perf_level) const
Read the voltage of the specified domain at the specified performance level.
The source clock domains provides the notion of a clock domain that is connected to a tunable clock s...
uint32_t numDomains() const
Get the number of domains assigned to this DVFS handler.
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
Tick clkPeriodAtPerfLevel() const
SrcClockDomain::PerfLevel PerfLevel
std::map< DomainID, SrcClockDomain * > Domains
static const Priority DVFS_Update_Pri
DVFS update event leads to stats dump therefore given a lower priority to ensure all relevant states ...
DomainID domainID(uint32_t index) const
Get the n-th domain ID, from the domains managed by this handler.
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 ...
Abstract superclass for simulation objects.
Update performance level event, encapsulates all the required information for a future call to change...