diff --git a/src/sim/power/PowerModel.py b/src/sim/power/PowerModel.py index 2047c645b7..cfbd8cb66e 100644 --- a/src/sim/power/PowerModel.py +++ b/src/sim/power/PowerModel.py @@ -1,4 +1,4 @@ -# Copyright (c) 2016-2018 ARM Limited +# Copyright (c) 2016-2018, 2021 Arm Limited # All rights reserved. # # The license below extends only to copyright in the software and shall @@ -63,4 +63,4 @@ class PowerModel(SimObject): pm_type = Param.PMType("All", "Type of power model") # Ambient temperature to be used when no thermal model is present - ambient_temp = Param.Float(25.0, "Ambient temperature") + ambient_temp = Param.Temperature("25.0C", "Ambient temperature") diff --git a/src/sim/power/ThermalDomain.py b/src/sim/power/ThermalDomain.py index 3fd5cadbf9..57c53b2910 100644 --- a/src/sim/power/ThermalDomain.py +++ b/src/sim/power/ThermalDomain.py @@ -1,4 +1,4 @@ -# Copyright (c) 2015 ARM Limited +# Copyright (c) 2015, 2021 Arm Limited # All rights reserved. # # The license below extends only to copyright in the software and shall @@ -46,4 +46,4 @@ class ThermalDomain(SimObject): ] # Static temperature which may change over time - initial_temperature = Param.Float(25.0, "Initial temperature") + initial_temperature = Param.Temperature("25.0C", "Initial temperature") diff --git a/src/sim/power/ThermalModel.py b/src/sim/power/ThermalModel.py index 2894dd8eba..90710e19e0 100644 --- a/src/sim/power/ThermalModel.py +++ b/src/sim/power/ThermalModel.py @@ -1,4 +1,4 @@ -# Copyright (c) 2015 ARM Limited +# Copyright (c) 2015, 2021 Arm Limited # All rights reserved. # # The license below extends only to copyright in the software and shall @@ -77,7 +77,7 @@ class ThermalReference(SimObject, object): ] # Static temperature which may change over time - temperature = Param.Float(25.0, "Operational temperature in Celsius") + temperature = Param.Temperature("25.0C", "Operational temperature") # Represents a thermal capacitor diff --git a/src/sim/power/power_model.cc b/src/sim/power/power_model.cc index fbc67d34b9..42515ace86 100644 --- a/src/sim/power/power_model.cc +++ b/src/sim/power/power_model.cc @@ -66,7 +66,7 @@ PowerModel::PowerModel(const Params &p) // The temperature passed here will be overwritten, if there is // a thermal model present for (auto & pms: states_pm){ - pms->setTemperature(p.ambient_temp); + pms->setTemperature(p.ambient_temp.toCelsius()); } dynamicPower diff --git a/src/sim/power/thermal_domain.cc b/src/sim/power/thermal_domain.cc index a5eb33c8e6..b0868becfe 100644 --- a/src/sim/power/thermal_domain.cc +++ b/src/sim/power/thermal_domain.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 ARM Limited + * Copyright (c) 2015, 2021 Arm Limited * All rights reserved * * The license below extends only to copyright in the software and shall @@ -49,7 +49,7 @@ #include "sim/sub_system.hh" ThermalDomain::ThermalDomain(const Params &p) - : SimObject(p), _initTemperature(p.initial_temperature), + : SimObject(p), _initTemperature(p.initial_temperature.toCelsius()), node(NULL), subsystem(NULL), ADD_STAT(currentTemp, "Temperature in centigrade degrees") { diff --git a/src/sim/power/thermal_model.cc b/src/sim/power/thermal_model.cc index a37240b9b1..c57e284c9c 100644 --- a/src/sim/power/thermal_model.cc +++ b/src/sim/power/thermal_model.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 ARM Limited + * Copyright (c) 2015, 2021 Arm Limited * All rights reserved * * The license below extends only to copyright in the software and shall @@ -51,7 +51,7 @@ * ThermalReference */ ThermalReference::ThermalReference(const Params &p) - : SimObject(p), _temperature(p.temperature), node(NULL) + : SimObject(p), _temperature(p.temperature.toCelsius()), node(NULL) { }