10-11-2018 05:54 PM
I have been trying to measure power consumption of he algorithms that I have been working on so far and was sure that PAPI(tool) supports calling hardware events and there is a way to measure power consumed by the Arm processor running Digilent's linux, on the Zynq 7000 series all-programmable SoC of the Zedboard.
However, I have dug into how to cross-compile and configure PAPI on a regular X86_64 architecture like with an intel Skylake processor but, could have any luck as to how exactly PAPI could be configured for ARM A9 first and then cross-compile a piece of code such that it would spit out how much power got consumed by running the algorithm.
Is there any other way to measure power consumed by a code (say a matrix multiplication c/c++ code) with say some calls in it, reading hardware counters.
I tried to configure PAPI on an intel X86_64 processor for use on Arm Cortex A9 with armv7l architecture, using the options as follows:
./configure --with-CPU=arm --with-arch=armv7l --with-os=linux --with-libpfm4 --with-perf-tools --with-ffsll --with-waltimer=cycle --with-virtualtimer=clock_cputime_id --with-tls=__thread CC="arm-linux-gnueabi-gcc" CXX="arm-linux-gnueabi-g++" --host=arm-none-linux-gnueabi
I wasn't sure as to these options would configure properly for the arm processor and am looking for help with this and also after I configure it, How do I measure the power and which of the specific functions in PAPI would measure power consumption? And how do I frame them properly?
Any help is appreciated. You can also email me at email@example.com if any.
10-16-2018 03:07 AM - edited 10-16-2018 03:20 AM
Apologies but i am not familiar with PAPI, does it use an I2C bus to read out the current and voltage at the time the command is run to give a power reading?
On our demo boards we have either a Maxim or TI Pm Bus that can be used to measure the power on each of the rails.
There is an associated resolution of this bus as well, how long will the function be active?
10-20-2018 11:54 AM
PAPI is a Performance API tool which can be cross-compiled for ARM processors on any of the boards as a matter of fact and should work on the Zedboard to. The way how PAPI works is that it has function calls which interact with the hardware performance counters that are there on the ARM processors. Whilst there are 6 hardware performance counters on the ARM processor in the Zedboard or any ARM Cortext-A9 MPCore processor to that fact, these ARM processors do not have the hardware counters that can probe into the Power rails is what I have found out.
However, I was able to get a rough estimate of power from the pins on J21 by reading an ideal power consumption and after booting linux on the Arm processor and running the code on it gave another reading and by subtracting the run-time power from the idle power, I roughly estimated it to be the power that was consumed by the entire process but was never able to measure the consumption on a fine-grain level.
You said, and I quote, " On our demo boards we have either a Maxim or TI Pm Bus that can be used to measure the power on each of the rails. "
My query on this is that how do you do it? and what are the demo boards that you were referring to. I am sure the zc702 is much more sophisticated than the Zedboard but I was working on the zedboards and I did not find a way to measure power "when a code was implemented on an ARM processor with linux running on it" and not using any of the Vivado tools.
And I did not properly understand your question and the rest in this particular sentence that you mentioned in the last that
" There is an associated resolution of this bus as well, how long will the function be active? "
Looking forward for a reply. Thank you for responding to my post.
10-22-2018 10:42 AM