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"
61class DerivedClockDomain;
143 {
children.push_back(clock_domain); }
The ClockDomain provides clock to group of clocked objects bundled under the same clock domain.
VoltageDomain * _voltageDomain
Voltage domain this clock domain belongs to.
std::vector< DerivedClockDomain * > children
Pointers to potential derived clock domains so we can propagate changes.
VoltageDomain * voltageDomain() const
Get the voltage domain.
ClockDomain(const Params &p, VoltageDomain *voltage_domain)
Tick _clockPeriod
Pre-computed clock period in ticks.
Tick clockPeriod() const
Get the clock period.
std::vector< Clocked * > members
Pointers to members of this clock domain, so that when the clock period changes, we can update each m...
void registerWithClockDomain(Clocked *c)
Register a Clocked object with this ClockDomain.
void addDerivedDomain(DerivedClockDomain *clock_domain)
Add a derived domain.
double voltage() const
Get the current voltage this clock domain operates at.
gem5::ClockDomain::ClockDomainStats stats
Helper class for objects that need to be clocked.
The derived clock domains provides the notion of a clock domain that is connected to a parent clock d...
DerivedClockDomainParams Params
const uint64_t clockDivider
Local clock divider of the domain.
DerivedClockDomain(const Params &p)
ClockDomain & parent
Reference to the parent clock domain this clock domain derives its clock period from.
void updateClockPeriod()
Called by the parent clock domain to propagate changes.
Abstract superclass for simulation objects.
The source clock domains provides the notion of a clock domain that is connected to a tunable clock s...
bool validPerfLevel(PerfLevel perf_level) const
Checks whether the performance level requested exists in the current domain configuration.
Tick clkPeriodAtPerfLevel() const
const uint32_t _domainID
Software recognizable id number for the domain, should be unique for each domain.
Tick clkPeriodAtPerfLevel(PerfLevel perf_level) const
const std::vector< Tick > freqOpPoints
List of possible frequency operational points, should be in descending order An empty list correspond...
static const DomainID emptyDomainID
SrcClockDomainParams Params
void signalPerfLevelUpdate()
Inform other components about the changed performance level.
uint32_t domainID() const
void unserialize(CheckpointIn &cp) override
Unserialize an object.
Tick clockPeriod() const
Get the clock period.
PerfLevel numPerfLevels() const
Get the number of available performance levels for this clock domain.
void startup() override
startup() is the final initialization call before simulation.
void serialize(CheckpointOut &cp) const override
Serialize an object.
PerfLevel _perfLevel
Current performance level the domain is set to.
SrcClockDomain(const Params &p)
PerfLevel perfLevel() const
A VoltageDomain is used to group clock domains that operate under the same voltage.
Copyright (c) 2024 - Pranith Kumar Copyright (c) 2020 Inria All rights reserved.
std::ostream CheckpointOut
uint64_t Tick
Tick count type.
Declaration of Statistics objects.
statistics::Value clock
Stat to report clock period of clock domain.
ClockDomainStats(ClockDomain &cd)