Go to the documentation of this file.
45 #include "debug/ClockDomain.hh"
46 #include "params/ClockDomain.hh"
47 #include "params/DerivedClockDomain.hh"
48 #include "params/SrcClockDomain.hh"
54 ADD_STAT(clock,
"Clock period in ticks")
77 freqOpPoints(
p->clock),
78 _domainID(
p->domain_id),
79 _perfLevel(
p->init_perf_level)
86 fatal_if(!vdom,
"DVFS: Empty voltage domain specified for "\
91 "DVFS: Number of frequency and voltage scaling points do "\
92 "not match: %d:%d ID: %d %s.\n", vdom->
numVoltages(),
98 "DVFS: Frequency operation points not in descending order for "\
112 if (clock_period == 0) {
113 fatal(
"%s has a clock period of zero\n",
name());
118 (*m)->updateClockPeriod();
124 "Setting clock period to %d ticks for source clock %s\n",
129 (*c)->updateClockPeriod();
185 SrcClockDomainParams::create()
192 parent(*
p->clk_domain),
193 clockDivider(
p->clk_divider)
198 fatal(
"Clock divider param cannot be less than 1");
214 (*m)->updateClockPeriod();
222 "Setting clock period to %d ticks for derived clock %s\n",
227 (*c)->updateClockPeriod();
232 DerivedClockDomainParams::create()
#define fatal(...)
This implements a cprintf based fatal() function.
Derived & scalar(T &value)
#define UNSERIALIZE_SCALAR(scalar)
const std::vector< Tick > freqOpPoints
List of possible frequency operational points, should be in descending order An empty list correspond...
double voltage() const
Get the current voltage.
PerfLevel perfLevel() const
uint32_t numVoltages() const
double voltage() const
Get the current voltage this clock domain operates at.
uint64_t Tick
Tick count type.
The source clock domains provides the notion of a clock domain that is connected to a tunable clock s...
The derived clock domains provides the notion of a clock domain that is connected to a parent clock d...
void updateClockPeriod()
Called by the parent clock domain to propagate changes.
bool validPerfLevel(PerfLevel perf_level) const
Checks whether the performance level requested exists in the current domain configuration.
VoltageDomain * _voltageDomain
Voltage domain this clock domain belongs to.
void unserialize(CheckpointIn &cp) override
Unserialize an object.
ClockDomain::ClockDomainStats stats
void unserialize(CheckpointIn &cp) override
Unserialize an object.
The ClockDomain provides clock to group of clocked objects bundled under the same clock domain.
Tick clkPeriodAtPerfLevel() const
uint32_t domainID() const
PerfLevel _perfLevel
Current performance level the domain is set to.
std::vector< Clocked * > members
Pointers to members of this clock domain, so that when the clock period changes, we can update each m...
void registerSrcClockDom(SrcClockDomain *src_clock_dom)
Register a SrcClockDomain with this voltage domain.
const uint32_t _domainID
Software recognizable id number for the domain, should be unique for each domain.
#define ADD_STAT(n,...)
Convenience macro to add a stat to a statistics group.
bool sanitiseVoltages()
Recomputes the highest (fastest, i.e., numerically lowest) requested performance level of all associa...
ClockDomainStats(ClockDomain &cd)
A VoltageDomain is used to group clock domains that operate under the same voltage.
ClockDomain & parent
Reference to the parent clock domain this clock domain derives its clock period from.
void serialize(CheckpointOut &cp) const override
Serialize an object.
Stats::Value clock
Stat to report clock period of clock domain.
DerivedClockDomain(const Params *p)
#define SERIALIZE_SCALAR(scalar)
VoltageDomain * voltageDomain() const
Get the voltage domain.
virtual const std::string name() const
void addDerivedDomain(DerivedClockDomain *clock_domain)
Add a derived domain.
SrcClockDomain(const Params *p)
void serialize(CheckpointOut &cp) const override
Serialize an object.
std::vector< DerivedClockDomain * > children
Pointers to potential derived clock domains so we can propagate changes.
ClockDomain(const Params *p, VoltageDomain *voltage_domain)
const uint64_t clockDivider
Local clock divider of the domain.
std::ostream CheckpointOut
void signalPerfLevelUpdate()
Inform other components about the changed performance level.
#define fatal_if(cond,...)
Conditional fatal macro that checks the supplied condition and only causes a fatal error if the condi...
Tick clockPeriod() const
Get the clock period.
Tick _clockPeriod
Pre-computed clock period in ticks.
void startup() override
startup() is the final initialization call before simulation.
Abstract superclass for simulation objects.
Generated on Wed Sep 30 2020 14:02:14 for gem5 by doxygen 1.8.17