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>
#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)
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
*/
void setSubSystem(SubSystem * ss);
- void serialize(CheckpointOut &cp) const override;
- void unserialize(CheckpointIn &cp) override;
-
private:
double _initTemperature;
ThermalNode * node;
#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"
/**
{
}
-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 {
{
}
-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
{
}
-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
{
}
-void
-ThermalModel::serialize(CheckpointOut &cp) const
-{
- SERIALIZE_SCALAR(_step);
-}
-
-void
-ThermalModel::unserialize(CheckpointIn &cp)
-{
- UNSERIALIZE_SCALAR(_step);
-}
-
void
ThermalModel::doStep()
{
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;
private:
/* Resistance value in K/W */
- double _resistance;
+ const double _resistance;
/* Nodes connected to the resistor */
ThermalNode * node1, * node2;
};
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;
private:
/* Capacitance value in J/K */
- double _capacitance;
+ const double _capacitance;
/* Nodes connected to the resistor */
ThermalNode * node1, * node2;
};
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;
};
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 */
EventFunctionWrapper stepEvent;
/** Step in seconds for thermal updates */
- double _step;
-
+ const double _step;
};
#endif