sim-se: Add prlimit system call
[gem5.git] / src / sim / voltage_domain.hh
index 9ffbe7bbc787e8c82c4a7c6975fa2fbfe55b10ad..e7e4f8180f3307145f2754dc907e278e184c8f74 100644 (file)
@@ -77,6 +77,10 @@ class VoltageDomain : public SimObject
      */
     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];
     }
 
@@ -107,7 +111,7 @@ class VoltageDomain : public SimObject
      * 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
@@ -122,10 +126,11 @@ class VoltageDomain : public SimObject
      */
     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 &section);
   private:
     typedef std::vector<double> Voltages;
     /**