Andreas Sandberg has uploaded this change for review. (
https://gem5-review.googlesource.com/c/public/gem5/+/39221 )
Change subject: sim: Don't serialise params in thermal models
......................................................................
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.sandb...@arm.com>
---
M src/sim/power/thermal_domain.cc
M src/sim/power/thermal_domain.hh
M src/sim/power/thermal_model.cc
M src/sim/power/thermal_model.hh
4 files changed, 3 insertions(+), 80 deletions(-)
diff --git a/src/sim/power/thermal_domain.cc
b/src/sim/power/thermal_domain.cc
index a2276c5..b0868be 100644
--- a/src/sim/power/thermal_domain.cc
+++ b/src/sim/power/thermal_domain.cc
@@ -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 @@
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
diff --git a/src/sim/power/thermal_domain.hh
b/src/sim/power/thermal_domain.hh
index 421f340..9da753e 100644
--- a/src/sim/power/thermal_domain.hh
+++ b/src/sim/power/thermal_domain.hh
@@ -93,9 +93,6 @@
*/
void setSubSystem(SubSystem * ss);
- void serialize(CheckpointOut &cp) const override;
- void unserialize(CheckpointIn &cp) override;
-
private:
double _initTemperature;
ThermalNode * node;
diff --git a/src/sim/power/thermal_model.cc b/src/sim/power/thermal_model.cc
index 306a4fa..c57e284 100644
--- a/src/sim/power/thermal_model.cc
+++ b/src/sim/power/thermal_model.cc
@@ -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 @@
{
}
-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 @@
{
}
-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 @@
{
}
-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
@@ -181,18 +144,6 @@
}
void
-ThermalModel::serialize(CheckpointOut &cp) const
-{
- SERIALIZE_SCALAR(_step);
-}
-
-void
-ThermalModel::unserialize(CheckpointIn &cp)
-{
- UNSERIALIZE_SCALAR(_step);
-}
-
-void
ThermalModel::doStep()
{
// Calculate new temperatures!
diff --git a/src/sim/power/thermal_model.hh b/src/sim/power/thermal_model.hh
index 295e508..3d9b36d 100644
--- a/src/sim/power/thermal_model.hh
+++ b/src/sim/power/thermal_model.hh
@@ -62,9 +62,6 @@
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;
@@ -91,9 +88,6 @@
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 @@
private:
/* Capacitance value in J/K */
- double _capacitance;
+ const double _capacitance;
/* Nodes connected to the resistor */
ThermalNode * node1, * node2;
};
@@ -128,11 +122,8 @@
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 @@
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 @@
EventFunctionWrapper stepEvent;
/** Step in seconds for thermal updates */
- double _step;
-
+ const double _step;
};
#endif
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/39221
To unsubscribe, or for help writing mail filters, visit
https://gem5-review.googlesource.com/settings
Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: Idc4438b68c0db1fe312d37888c901f2ea87b1d60
Gerrit-Change-Number: 39221
Gerrit-PatchSet: 1
Gerrit-Owner: Andreas Sandberg <andreas.sandb...@arm.com>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s