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