The thermal model runs on the client side of CASTLE not to disrupt
the machine under test. It is based on a 4-degree Cauer R-C model
we devised for Ppro (Would probably extend to several P6 implementations
easily, as long as packaging materials tend to be same/similar property).
We consider constant ambient ~50C, from Intel Thermal design guidelines,
and compute conduction (Fourier's Conduction) and convection (Newton's
Cooling) to heatsink. We asssume constant airflow for convection
coefficient h. We consider heat spreader spreads heat uniformly,
so spreader and heatsink have uniform temperature. Package and die
have varying temperature though. The thermal model uses CASTLE generated
component power estimates for heat flow and computes temperatures
in all 4 levels with respect to the corresponding difference equations.
It is a separate autonomous thread that updates with finer timescales
than the CASTLE power model.
I implemented a small and portable LKM and user interface to program
and access P4 event counters, which we name PerformanceReader. After
this, I have also made a Profiler that has all the setup for periodic