ESP32-C3-DevKitM

On the Power Estimation of a RISC‑V Platform using Performance Monitoring Counters and RTOS Events

Bachelorarbeit von Johannes Arnold

Abstract

With the advent of the “zett­abyte era” in the mid-2010s, power con­sump­ti­on has beco­me an
incre­asing topic of inte­rest as the num­ber of com­pu­ter sys­tems con­ti­nues to rise, affec­ting lar­ge
dat­a­cen­ters and con­su­mer gra­de devices as well as embedded sys­tems. Ener­gy moni­to­ring and
esti­ma­ti­on has a signi­fi­cant impact on a num­ber of key are­as, inclu­ding com­pi­ler opti­miza­ti­on,
sche­du­ling, ther­mal- and bat­tery life manage­ment, as well as poten­ti­al long-term eco­no­mic­al
and envi­ron­men­tal con­se­quen­ces.


While many con­tem­po­ra­ry CISC plat­forms incor­po­ra­te fea­tures such as RAPL to esti­ma­te
power con­sump­ti­on, esti­mat­ing the power con­su­med by a RISC pro­ces­sor often pres­ents a
grea­ter chall­enge in the absence of spe­cia­li­zed hard­ware exten­si­ons, par­ti­cu­lar­ly in the con­text
of embedded sys­tems.

This the­sis exami­nes the time and power con­sump­ti­on cha­rac­te­ristics of a com­mon embedded
RISC‑V pro­ces­sor using a diver­se set of algo­rith­ms repre­sen­ta­ti­ve of an embedded sys­tem. It
employs a bespo­ke bench­mar­king frame­work desi­gned around the coll­ec­tion of PMC data.
The data is then sub­jec­ted to ana­ly­sis and trans­for­ma­ti­on, and used to train and eva­lua­te a
gene­ra­li­zed model, ther­eby enab­ling the pre­dic­tion of the system’s power con­sump­ti­on from
PMC data alo­ne.


The final model was able to pre­dict the SoC’s cur­rent draw with an error of around 0.88 %
when using data from bench­marks it was not trai­ned on. This out­co­me pro­vi­des com­pel­ling
evi­dence that PMC data can be effec­tively employ­ed for the afo­re­men­tio­ned use cases. The
cor­re­la­ti­ons iden­ti­fied from PMC bench­mar­king data are then ali­gned with the tra­cing frame­work
of a con­tem­po­ra­ry RTOS, which could also bene­fit from run-time ener­gy sta­tis­tics.