44 #ifndef __SIM_CLOCK_DOMAIN_HH__ 45 #define __SIM_CLOCK_DOMAIN_HH__ 50 #include "params/ClockDomain.hh" 51 #include "params/DerivedClockDomain.hh" 52 #include "params/SrcClockDomain.hh" 115 assert(std::find(members.begin(), members.end(),
c) == members.end());
116 members.push_back(c);
140 { children.push_back(clock_domain); }
181 static const DomainID emptyDomainID = -1;
198 return perf_level < numPerfLevels();
206 void perfLevel(PerfLevel perf_level);
228 assert(validPerfLevel(perf_level));
229 return freqOpPoints[perf_level];
241 void signalPerfLevelUpdate();
285 void updateClockPeriod();
VoltageDomain * voltageDomain() const
Get the voltage domain.
Stats::Value clock
Stat to report clock period of clock domain.
void addDerivedDomain(DerivedClockDomain *clock_domain)
Add a derived domain.
DerivedClockDomainParams Params
const uint64_t clockDivider
Local clock divider of the domain.
VoltageDomain * _voltageDomain
Voltage domain this clock domain belongs to.
PerfLevel perfLevel() const
Declaration of Statistics objects.
ClockDomainStats(ClockDomain &cd)
const uint32_t _domainID
Software recognizable id number for the domain, should be unique for each domain. ...
Tick clkPeriodAtPerfLevel(PerfLevel perf_level) const
The derived clock domains provides the notion of a clock domain that is connected to a parent clock d...
void serialize(CheckpointOut &cp) const override
Serialize an object.
virtual void startup()
startup() is the final initialization call before simulation.
const std::vector< Tick > freqOpPoints
List of possible frequency operational points, should be in descending order An empty list correspond...
bool validPerfLevel(PerfLevel perf_level) const
Checks whether the performance level requested exists in the current domain configuration.
uint64_t Tick
Tick count type.
ClockDomain & parent
Reference to the parent clock domain this clock domain derives its clock period from.
Tick clkPeriodAtPerfLevel() const
Helper class for objects that need to be clocked.
A VoltageDomain is used to group clock domains that operate under the same voltage.
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...
uint32_t domainID() const
std::vector< DerivedClockDomain * > children
Pointers to potential derived clock domains so we can propagate changes.
The ClockDomain provides clock to group of clocked objects bundled under the same clock domain...
std::vector< Clocked * > members
Pointers to members of this clock domain, so that when the clock period changes, we can update each m...
std::ostream CheckpointOut
ClockDomain(const Params *p, VoltageDomain *voltage_domain)
void registerWithClockDomain(Clocked *c)
Register a Clocked object with this ClockDomain.
void unserialize(CheckpointIn &cp) override
Unserialize an object.
Tick _clockPeriod
Pre-computed clock period in ticks.
SrcClockDomainParams Params
std::vector< Info * > stats
PerfLevel _perfLevel
Current performance level the domain is set to.
double voltage() const
Get the current voltage this clock domain operates at.
Abstract superclass for simulation objects.
Tick clockPeriod() const
Get the clock period.