sim: Don't serialise params in thermal models
ThermalDomain and ThermalReference shouldn't serialise their params. Change-Id: Idc4438b68c0db1fe312d37888c901f2ea87b1d60 Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com> Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/39221 Reviewed-by: Gabe Black <gabe.black@gmail.com> 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:
@@ -46,7 +46,6 @@
|
||||
#include "sim/linear_solver.hh"
|
||||
#include "sim/power/thermal_model.hh"
|
||||
#include "sim/probe/probe.hh"
|
||||
#include "sim/serialize.hh"
|
||||
#include "sim/sub_system.hh"
|
||||
|
||||
ThermalDomain::ThermalDomain(const Params &p)
|
||||
@@ -80,18 +79,6 @@ ThermalDomain::emitUpdate()
|
||||
ppThermalUpdate->notify(node->temp);
|
||||
}
|
||||
|
||||
void
|
||||
ThermalDomain::serialize(CheckpointOut &cp) const
|
||||
{
|
||||
SERIALIZE_SCALAR(_initTemperature);
|
||||
}
|
||||
|
||||
void
|
||||
ThermalDomain::unserialize(CheckpointIn &cp)
|
||||
{
|
||||
UNSERIALIZE_SCALAR(_initTemperature);
|
||||
}
|
||||
|
||||
|
||||
LinearEquation
|
||||
ThermalDomain::getEquation(ThermalNode * tn, unsigned n, double step) const
|
||||
|
||||
@@ -93,9 +93,6 @@ class ThermalDomain : public SimObject, public ThermalEntity
|
||||
*/
|
||||
void setSubSystem(SubSystem * ss);
|
||||
|
||||
void serialize(CheckpointOut &cp) const override;
|
||||
void unserialize(CheckpointIn &cp) override;
|
||||
|
||||
private:
|
||||
double _initTemperature;
|
||||
ThermalNode * node;
|
||||
|
||||
@@ -45,7 +45,6 @@
|
||||
#include "sim/clocked_object.hh"
|
||||
#include "sim/linear_solver.hh"
|
||||
#include "sim/power/thermal_domain.hh"
|
||||
#include "sim/serialize.hh"
|
||||
#include "sim/sim_object.hh"
|
||||
|
||||
/**
|
||||
@@ -56,18 +55,6 @@ ThermalReference::ThermalReference(const Params &p)
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
ThermalReference::serialize(CheckpointOut &cp) const
|
||||
{
|
||||
SERIALIZE_SCALAR(_temperature);
|
||||
}
|
||||
|
||||
void
|
||||
ThermalReference::unserialize(CheckpointIn &cp)
|
||||
{
|
||||
UNSERIALIZE_SCALAR(_temperature);
|
||||
}
|
||||
|
||||
LinearEquation
|
||||
ThermalReference::getEquation(ThermalNode * n, unsigned nnodes,
|
||||
double step) const {
|
||||
@@ -83,18 +70,6 @@ ThermalResistor::ThermalResistor(const Params &p)
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
ThermalResistor::serialize(CheckpointOut &cp) const
|
||||
{
|
||||
SERIALIZE_SCALAR(_resistance);
|
||||
}
|
||||
|
||||
void
|
||||
ThermalResistor::unserialize(CheckpointIn &cp)
|
||||
{
|
||||
UNSERIALIZE_SCALAR(_resistance);
|
||||
}
|
||||
|
||||
LinearEquation
|
||||
ThermalResistor::getEquation(ThermalNode * n, unsigned nnodes,
|
||||
double step) const
|
||||
@@ -130,18 +105,6 @@ ThermalCapacitor::ThermalCapacitor(const Params &p)
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
ThermalCapacitor::serialize(CheckpointOut &cp) const
|
||||
{
|
||||
SERIALIZE_SCALAR(_capacitance);
|
||||
}
|
||||
|
||||
void
|
||||
ThermalCapacitor::unserialize(CheckpointIn &cp)
|
||||
{
|
||||
UNSERIALIZE_SCALAR(_capacitance);
|
||||
}
|
||||
|
||||
LinearEquation
|
||||
ThermalCapacitor::getEquation(ThermalNode * n, unsigned nnodes,
|
||||
double step) const
|
||||
@@ -180,18 +143,6 @@ ThermalModel::ThermalModel(const Params &p)
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
ThermalModel::serialize(CheckpointOut &cp) const
|
||||
{
|
||||
SERIALIZE_SCALAR(_step);
|
||||
}
|
||||
|
||||
void
|
||||
ThermalModel::unserialize(CheckpointIn &cp)
|
||||
{
|
||||
UNSERIALIZE_SCALAR(_step);
|
||||
}
|
||||
|
||||
void
|
||||
ThermalModel::doStep()
|
||||
{
|
||||
|
||||
@@ -62,9 +62,6 @@ class ThermalResistor : public SimObject, public ThermalEntity
|
||||
typedef ThermalResistorParams Params;
|
||||
ThermalResistor(const Params &p);
|
||||
|
||||
void serialize(CheckpointOut &cp) const override;
|
||||
void unserialize(CheckpointIn &cp) override;
|
||||
|
||||
void setNodes(ThermalNode * n1, ThermalNode * n2) {
|
||||
node1 = n1;
|
||||
node2 = n2;
|
||||
@@ -75,7 +72,7 @@ class ThermalResistor : public SimObject, public ThermalEntity
|
||||
|
||||
private:
|
||||
/* Resistance value in K/W */
|
||||
double _resistance;
|
||||
const double _resistance;
|
||||
/* Nodes connected to the resistor */
|
||||
ThermalNode * node1, * node2;
|
||||
};
|
||||
@@ -91,9 +88,6 @@ class ThermalCapacitor : public SimObject, public ThermalEntity
|
||||
typedef ThermalCapacitorParams Params;
|
||||
ThermalCapacitor(const Params &p);
|
||||
|
||||
void serialize(CheckpointOut &cp) const override;
|
||||
void unserialize(CheckpointIn &cp) override;
|
||||
|
||||
LinearEquation getEquation(ThermalNode * tn, unsigned n,
|
||||
double step) const override;
|
||||
|
||||
@@ -104,7 +98,7 @@ class ThermalCapacitor : public SimObject, public ThermalEntity
|
||||
|
||||
private:
|
||||
/* Capacitance value in J/K */
|
||||
double _capacitance;
|
||||
const double _capacitance;
|
||||
/* Nodes connected to the resistor */
|
||||
ThermalNode * node1, * node2;
|
||||
};
|
||||
@@ -128,11 +122,8 @@ class ThermalReference : public SimObject, public ThermalEntity
|
||||
LinearEquation getEquation(ThermalNode * tn, unsigned n,
|
||||
double step) const override;
|
||||
|
||||
void serialize(CheckpointOut &cp) const override;
|
||||
void unserialize(CheckpointIn &cp) override;
|
||||
|
||||
/* Fixed temperature value in centigrate degrees */
|
||||
double _temperature;
|
||||
const double _temperature;
|
||||
/* Nodes connected to the resistor */
|
||||
ThermalNode * node;
|
||||
};
|
||||
@@ -164,8 +155,6 @@ class ThermalModel : public ClockedObject
|
||||
void startup() override;
|
||||
void doStep();
|
||||
|
||||
void serialize(CheckpointOut &cp) const override;
|
||||
void unserialize(CheckpointIn &cp) override;
|
||||
private:
|
||||
|
||||
/* Keep track of all components used for the thermal model */
|
||||
@@ -184,8 +173,7 @@ class ThermalModel : public ClockedObject
|
||||
EventFunctionWrapper stepEvent;
|
||||
|
||||
/** Step in seconds for thermal updates */
|
||||
double _step;
|
||||
|
||||
const double _step;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user