diff options
author | Akash Bagdia <akash.bagdia@arm.com> | 2013-08-19 03:52:28 -0400 |
---|---|---|
committer | Akash Bagdia <akash.bagdia@arm.com> | 2013-08-19 03:52:28 -0400 |
commit | e7e17f92db8b249aaf99eb93a2447937d78270d5 (patch) | |
tree | 980dd4678997a5c360ed770b2ce1a225cd0eea32 /src/sim/clock_domain.hh | |
parent | a8480fe1c34db25ae8acb5f79d571bc924e0daeb (diff) | |
download | gem5-e7e17f92db8b249aaf99eb93a2447937d78270d5.tar.xz |
power: Add voltage domains to the clock domains
This patch adds the notion of voltage domains, and groups clock
domains that operate under the same voltage (i.e. power supply) into
domains. Each clock domain is required to be associated with a voltage
domain, and the latter requires the voltage to be explicitly set.
A voltage domain is an independently controllable voltage supply being
provided to section of the design. Thus, if you wish to perform
dynamic voltage scaling on a CPU, its clock domain should be
associated with a separate voltage domain.
The current implementation of the voltage domain does not take into
consideration cases where there are derived voltage domains running at
ratio of native voltage domains, as with the case where there can be
on-chip buck/boost (charge pumps) voltage regulation logic.
The regression and configuration scripts are updated with a generic
voltage domain for the system, and one for the CPUs.
Diffstat (limited to 'src/sim/clock_domain.hh')
-rw-r--r-- | src/sim/clock_domain.hh | 29 |
1 files changed, 27 insertions, 2 deletions
diff --git a/src/sim/clock_domain.hh b/src/sim/clock_domain.hh index c3f53e675..619f30696 100644 --- a/src/sim/clock_domain.hh +++ b/src/sim/clock_domain.hh @@ -56,10 +56,12 @@ * Forward declaration */ class DerivedClockDomain; +class VoltageDomain; /** * The ClockDomain provides clock to group of clocked objects bundled - * under the same clock domain. The clock domains provide support for + * under the same clock domain. The clock domains, in turn, are + * grouped into voltage domains. The clock domains provide support for * a hierarchial structure with source and derived domains. */ class ClockDomain : public SimObject @@ -74,6 +76,11 @@ class ClockDomain : public SimObject Tick _clockPeriod; /** + * Voltage domain this clock domain belongs to + */ + VoltageDomain *_voltageDomain; + + /** * Pointers to potential derived clock domains so we can propagate * changes. */ @@ -82,7 +89,10 @@ class ClockDomain : public SimObject public: typedef ClockDomainParams Params; - ClockDomain(const Params *p) : SimObject(p), _clockPeriod(0) {} + ClockDomain(const Params *p, VoltageDomain *voltage_domain) : + SimObject(p), + _clockPeriod(0), + _voltageDomain(voltage_domain) {} /** * Get the clock period. @@ -92,6 +102,21 @@ class ClockDomain : public SimObject inline Tick clockPeriod() const { return _clockPeriod; } /** + * Get the voltage domain. + * + * @return Voltage domain this clock domain belongs to + */ + inline VoltageDomain *voltageDomain() const { return _voltageDomain; } + + + /** + * Get the current voltage this clock domain operates at. + * + * @return Voltage applied to the clock domain + */ + inline double voltage() const; + + /** * Add a derived domain. * * @param Derived domain to add as a child |