sim: Thermal model style fixes
authorAndreas Sandberg <andreas.sandberg@arm.com>
Tue, 19 Jan 2021 10:29:27 +0000 (10:29 +0000)
committerAndreas Sandberg <andreas.sandberg@arm.com>
Wed, 20 Jan 2021 09:57:30 +0000 (09:57 +0000)
Fix various style issues in the thermal model implementation.

Change-Id: Ie31c862a23885f32f2931e927d7f87b7992bd099
Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/39220
Reviewed-by: Gabe Black <gabe.black@gmail.com>
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
src/sim/power/thermal_model.cc
src/sim/power/thermal_model.hh

index 408642ccfa432f173f57207cc9793c2767e3d1fd..9f970dedede45652a91f1c02d481d02da6c54ef2 100644 (file)
@@ -39,6 +39,7 @@
 
 #include "base/statistics.hh"
 #include "params/ThermalCapacitor.hh"
+#include "params/ThermalModel.hh"
 #include "params/ThermalReference.hh"
 #include "params/ThermalResistor.hh"
 #include "sim/clocked_object.hh"
@@ -253,24 +254,37 @@ ThermalModel::startup()
     schedule(stepEvent, curTick() + SimClock::Int::s * _step);
 }
 
-void ThermalModel::addDomain(ThermalDomain * d) {
+void
+ThermalModel::addDomain(ThermalDomain * d)
+{
     domains.push_back(d);
     entities.push_back(d);
 }
-void ThermalModel::addReference(ThermalReference * r) {
+
+void
+ThermalModel::addReference(ThermalReference * r)
+{
     references.push_back(r);
     entities.push_back(r);
 }
-void ThermalModel::addCapacitor(ThermalCapacitor * c) {
+
+void
+ThermalModel::addCapacitor(ThermalCapacitor * c)
+{
     capacitors.push_back(c);
     entities.push_back(c);
 }
-void ThermalModel::addResistor(ThermalResistor * r) {
+
+void
+ThermalModel::addResistor(ThermalResistor * r)
+{
     resistors.push_back(r);
     entities.push_back(r);
 }
 
-double ThermalModel::getTemp() const {
+double
+ThermalModel::getTemp() const
+{
     // Just pick the highest temperature
     double temp = 0;
     for (auto & n : eq_nodes)
index 81c1de8f2149086d1b5473462f1e296cd4564e7b..295e5080f5d2d66863664a87866b2b50b0f38bc8 100644 (file)
 
 #include <vector>
 
-#include "params/ThermalCapacitor.hh"
-#include "params/ThermalModel.hh"
-#include "params/ThermalReference.hh"
-#include "params/ThermalResistor.hh"
 #include "sim/clocked_object.hh"
 #include "sim/power/thermal_domain.hh"
 #include "sim/power/thermal_entity.hh"
 #include "sim/power/thermal_node.hh"
 #include "sim/sim_object.hh"
 
+struct ThermalCapacitorParams;
+struct ThermalModelParams;
+struct ThermalReferenceParams;
+struct ThermalResistorParams;
 
 /**
  * A ThermalResistor is used to model a thermal resistance between two