sim: Thermal model style fixes

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>
This commit is contained in:
Andreas Sandberg
2021-01-19 10:29:27 +00:00
parent 14663f9c48
commit bfff0c40df
2 changed files with 23 additions and 9 deletions

View 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)

View File

@@ -40,16 +40,16 @@
#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