Go to the documentation of this file.
41 #include "debug/EnergyCtrl.hh"
44 #include "params/EnergyCtrl.hh"
49 dvfsHandler(
p->dvfs_handler),
51 domainIDIndexToRead(0),
56 fatal_if(!
p->dvfs_handler,
"EnergyCtrl: Needs a DVFSHandler for a "
57 "functioning system.\n");
67 assert((daddr & 3) == 0);
72 pkt->
setLE<uint32_t>(0);
73 warn_once(
"EnergyCtrl: Disabled handler, ignoring read from reg %i\n",
138 panic(
"Tried to read EnergyCtrl at offset %#x / reg %i\n", daddr,
141 pkt->
setLE<uint32_t>(result);
156 assert((daddr & 3) == 0);
161 warn_once(
"EnergyCtrl: Disabled handler, ignoring write %u to "\
208 panic(
"Tried to write EnergyCtrl at offset %#x\n", daddr);
239 if (next_event != 0) {
253 warn(
"Existing EnergyCtrl, but no enabled DVFSHandler found.\n");
bool scheduled() const
Determine if the current event is scheduled.
void makeAtomicResponse()
Addr pioAddr
Address that the device listens to.
void init() override
init() is called after all C++ SimObjects have been created and all ports are connected.
PerfLevel numPerfLevels(PerfLevel domain_id) const
Get the total number of available performance levels.
#define UNSERIALIZE_SCALAR(scalar)
void init() override
init() is called after all C++ SimObjects have been created and all ports are connected.
uint64_t Tick
Tick count type.
double voltageAtPerfLevel(DomainID domain_id, PerfLevel perf_level) const
Read the voltage of the specified domain at the specified performance level.
static uint32_t ticksTokHz(Tick period)
void deschedule(Event &event)
Tick read(PacketPtr pkt) override
Read command sent to the device.
bool validDomainID(DomainID domain_id) const
Check whether a domain ID is known to the handler or not.
bool isEnabled() const
Check enable status of the DVFS handler, when the handler is disabled, no request should be sent to t...
Tick when() const
Get the time that the event is scheduled.
Tick clkPeriodAtPerfLevel(DomainID domain_id, PerfLevel perf_level) const
Read the clock period of the specified domain at the specified performance level.
EventFunctionWrapper updateAckEvent
void startup() override
startup() is the final initialization call before simulation.
void schedule(Event &event, Tick when)
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 updatePLAck()
Update the acknowledgment that is read back by the software to confirm newly requested performance le...
Addr pioSize
Size that the device's address range.
uint32_t perfLevelAck
Acknowledgment (PERF_LEVEL_ACK) RO register, software polls this register to read back the status of ...
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
Tick transLatency() const
Get transition latency to switch between performance levels.
const std::string & name()
#define SERIALIZE_SCALAR(scalar)
static uint32_t toMicroVolt(double voltage)
T getLE() const
Get the data in the packet byte swapped from little endian to host endian.
Tick write(PacketPtr pkt) override
Write command sent to the device.
A Packet is used to encapsulate a transfer between two objects in the memory system (e....
@ DVFS_HANDLER_TRANS_LATENCY
uint32_t domainIDIndexToRead
Index for getting the domain ID from the domain ID list available with the DVFS handler.
Tick pioDelay
Delay that the device experinces on an access.
void setLE(T v)
Set the value in the data pointer to v as little endian.
std::ostream CheckpointOut
uint32_t domainID
Cluster ID (DOMAIN_ID) R/W register, programmed to ID of the domain for which the set/get performance...
#define fatal_if(cond,...)
Conditional fatal macro that checks the supplied condition and only causes a fatal error if the condi...
void serialize(CheckpointOut &cp) const override
Serialize an object.
DVFSHandler * dvfsHandler
EnergyCtrl(const Params *p)
bool perfLevel(DomainID domain_id, PerfLevel perf_level)
Set a new performance level for the specified domain.
#define panic(...)
This implements a cprintf based panic() function.
void unserialize(CheckpointIn &cp) override
Unserialize an object.
Tick curTick()
The current simulated tick.
Generated on Wed Sep 30 2020 14:02:10 for gem5 by doxygen 1.8.17