Go to the documentation of this file.
46 #include "debug/ClockDomain.hh"
47 #include "params/ClockDomain.hh"
48 #include "params/DerivedClockDomain.hh"
49 #include "params/SrcClockDomain.hh"
59 ADD_STAT(clock, statistics::units::
Tick::get(),
"Clock period in ticks")
82 freqOpPoints(
p.clock),
83 _domainID(
p.domain_id),
84 _perfLevel(
p.init_perf_level)
91 fatal_if(!vdom,
"DVFS: Empty voltage domain specified for "\
96 "DVFS: Number of frequency and voltage scaling points do "\
97 "not match: %d:%d ID: %d %s.\n", vdom->
numVoltages(),
103 "DVFS: Frequency operation points not in descending order for "\
117 if (clock_period == 0) {
118 fatal(
"%s has a clock period of zero\n",
name());
123 (*m)->updateClockPeriod();
129 "Setting clock period to %d ticks for source clock %s\n",
134 (*c)->updateClockPeriod();
191 parent(*
p.clk_domain),
192 clockDivider(
p.clk_divider)
197 fatal(
"Clock divider param cannot be less than 1");
213 (*m)->updateClockPeriod();
221 "Setting clock period to %d ticks for derived clock %s\n",
226 (*c)->updateClockPeriod();
#define fatal(...)
This implements a cprintf based fatal() function.
std::vector< Clocked * > members
Pointers to members of this clock domain, so that when the clock period changes, we can update each m...
ClockDomainStats(ClockDomain &cd)
SrcClockDomain(const Params &p)
VoltageDomain * voltageDomain() const
Get the voltage domain.
void unserialize(CheckpointIn &cp) override
Unserialize an object.
void startup() override
startup() is the final initialization call before simulation.
void registerSrcClockDom(SrcClockDomain *src_clock_dom)
Register a SrcClockDomain with this voltage domain.
uint32_t domainID() const
#define UNSERIALIZE_SCALAR(scalar)
void addDerivedDomain(DerivedClockDomain *clock_domain)
Add a derived domain.
const uint32_t _domainID
Software recognizable id number for the domain, should be unique for each domain.
void unserialize(CheckpointIn &cp) override
Unserialize an object.
bool validPerfLevel(PerfLevel perf_level) const
Checks whether the performance level requested exists in the current domain configuration.
statistics::Value clock
Stat to report clock period of clock domain.
void signalPerfLevelUpdate()
Inform other components about the changed performance level.
void updateClockPeriod()
Called by the parent clock domain to propagate changes.
void serialize(CheckpointOut &cp) const override
Serialize an object.
virtual std::string name() const
The ClockDomain provides clock to group of clocked objects bundled under the same clock 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...
uint64_t Tick
Tick count type.
gem5::ClockDomain::ClockDomainStats stats
Abstract superclass for simulation objects.
double voltage() const
Get the current voltage this clock domain operates at.
#define SERIALIZE_SCALAR(scalar)
DerivedClockDomain(const Params &p)
PerfLevel _perfLevel
Current performance level the domain is set to.
void serialize(CheckpointOut &cp) const override
Serialize an object.
double voltage() const
Get the current voltage.
PerfLevel perfLevel() const
Tick _clockPeriod
Pre-computed clock period in ticks.
Derived & scalar(T &value)
const uint64_t clockDivider
Local clock divider of the domain.
std::ostream CheckpointOut
A VoltageDomain is used to group clock domains that operate under the same voltage.
ClockDomain(const Params &p, VoltageDomain *voltage_domain)
#define fatal_if(cond,...)
Conditional fatal macro that checks the supplied condition and only causes a fatal error if the condi...
Reference material can be found at the JEDEC website: UFS standard http://www.jedec....
const std::vector< Tick > freqOpPoints
List of possible frequency operational points, should be in descending order An empty list correspond...
uint32_t numVoltages() const
Tick clockPeriod() const
Get the clock period.
VoltageDomain * _voltageDomain
Voltage domain this clock domain belongs to.
std::vector< DerivedClockDomain * > children
Pointers to potential derived clock domains so we can propagate changes.
ClockDomain & parent
Reference to the parent clock domain this clock domain derives its clock period from.
Tick clkPeriodAtPerfLevel() const
Generated on Tue Feb 8 2022 11:47:13 for gem5 by doxygen 1.8.17