typedef VoltageDomainParams Params;
VoltageDomain(const Params *p);
+ typedef SrcClockDomain::PerfLevel PerfLevel;
+
/**
* Get the current voltage.
*
*/
double voltage() const { return voltageOpPoints[_perfLevel]; }
- uint32_t numVoltages() const { return (uint32_t)voltageOpPoints.size(); }
+ /**
+ * Get the voltage at specified performance level.
+ *
+ * @param perf_level Performance level for which the voltage is requested
+ * @return Voltage of the domain at specified performance level
+ */
+ double voltage(PerfLevel perf_level) const
+ {
+ chatty_assert(perf_level < numVoltages(), "VoltageDomain %s "\
+ "request for voltage perf level %u is outside "\
+ "of numVoltages %u", name(), perf_level,
+ numVoltages());
+ return voltageOpPoints[perf_level];
+ }
- typedef SrcClockDomain::PerfLevel PerfLevel;
+ uint32_t numVoltages() const { return (uint32_t)voltageOpPoints.size(); }
/**
* Set the voltage point of the domain.
* Startup has all SrcClockDomains registered with this voltage domain, so
* try to make sure that all perf level requests from them are met.
*/
- void startup();
+ void startup() override;
/**
* Recomputes the highest (fastest, i.e., numerically lowest) requested
*/
bool sanitiseVoltages();
- void regStats();
+ void regStats() override;
+
+ void serialize(CheckpointOut &cp) const override;
+ void unserialize(CheckpointIn &cp) override;
- void serialize(std::ostream &os);
- void unserialize(Checkpoint *cp, const std::string §ion);
private:
typedef std::vector<double> Voltages;
/**