pwr: Closing power and thermal feedback loop
authorDavid Guillen Fandos <david.guillen@arm.com>
Mon, 6 Jun 2016 16:16:44 +0000 (17:16 +0100)
committerDavid Guillen Fandos <david.guillen@arm.com>
Mon, 6 Jun 2016 16:16:44 +0000 (17:16 +0100)
This patch makes thermal models use the power figures
calculated by power models. Since there is a circular
dependency between power and thermal (and thermal was
pushed before) this patch closes that loop.

Change-Id: I8bd5acf6a5026fdbbcfac47e33d27397f24a6f7d
Reviewed-by: Stephan Diestelhorst <stephan.diestelhorst@arm.com>
src/sim/power/thermal_domain.cc

index 208c5bab455d3590e2534e7682625a2e443f92f5..11f48371ea1bbd5365f772bb8b37c9585ce607b4 100644 (file)
@@ -110,7 +110,8 @@ LinearEquation
 ThermalDomain::getEquation(ThermalNode * tn, unsigned n, double step) const
 {
     LinearEquation eq(n);
+    double power = subsystem->getDynamicPower() + subsystem->getStaticPower();
     if (tn == node)
-        eq[eq.cnt()] = 1.75f; // Fake 1.75 Watts for now, to be changed to PM
+        eq[eq.cnt()] = power;
     return eq;
 }