2
\$\begingroup\$

I have a C application running on TI CC2650 SENSORTAG microcontroller that performs gesture recognition. Is there any way I can figure out its estimated power usage probably through Raspberry Pi or something, so that I can use it to compare the actual power consumed when I synthesize it on a FPGA? This is an academic project targetted at Hardware acceleration.

\$\endgroup\$
  • 11
    \$\begingroup\$ Why not just run it on the pi and measure the power consumed? Its a lot faster (and easier) than formulating some 'estimate' which you have no means of verifying anyway without a physical comparison. \$\endgroup\$ – JIm Dearden Aug 2 '17 at 10:40
  • 3
    \$\begingroup\$ Is there a way to estimate power? Yes. Will it give a meaningful number? Probably not unless you put so much time and effort into it that it would be easier to build it and measure the power draw. And as Jim pointed out what use is an estimate when you have no idea how accurate it is? \$\endgroup\$ – Andrew Aug 2 '17 at 10:44
  • 6
    \$\begingroup\$ One ascii character = 0.00015 Volts of power consumption \$\endgroup\$ – Harrichael Aug 2 '17 at 15:52
  • \$\begingroup\$ @Harrichael That means I have to multiply 0.00015 volts with the number of ASCII characters in my program? \$\endgroup\$ – Shankhadeep Mukerji Aug 2 '17 at 16:23
  • 6
    \$\begingroup\$ @ShankhadeepMukerji: Harrichael's comment is clearly trolling, because volts is not a unit of power measurement. Do yourself a favor and get in the habit of checking dimensional consistency. \$\endgroup\$ – Ben Voigt Aug 2 '17 at 20:04
9
\$\begingroup\$

Your equivalent question is to measure the length of a plank without a measure.

You can always eyeball it. The Mic datasheet will provide the current consumption under various conditions, with different peripherals turned on. That's your best bet.

\$\endgroup\$
24
\$\begingroup\$

What you are trying to do won't really work. First a "C program" doesn't consume a particular amount of power.

A particular program performing a particular task on a particular processor may cause a reasonably measurable increase in power draw by that processor, or not. The power draw of a processor will only change significantly if it would otherwise go into some kind of low power mode if the "program" wasn't running. On many small systems, not doing one thing only means doing more of other things. The only effect of running a particular piece of code might be to respond with higher latency to new events, for example.

Even if you can measure a reasonably repeatable power increase in one processor due to running a particular program, that is little indication of anything useful for the same task performed some other way using different technology. You really should not expect the power increase due to a RPi running a particular program to have a meaningful correlation to the power required to run a FPGA that performs the same function.

\$\endgroup\$
  • 3
    \$\begingroup\$ Actually there is a way I have found in some literature. The Microcontroller has a instruction set where each instruction needs a specific amount of power. He can translate his program into assembler code to get all instruction. Than he knows exactly what instructions are executed and can calculate the consumed power by adding the required power for each instruction. The only problem is finding out the power consumption per Instruction. Maybe it can be found in the datasheet or he can ask the TI support for some information \$\endgroup\$ – S.G Aug 2 '17 at 11:23
  • 3
    \$\begingroup\$ @S.G The main problem here is the C -> FPGA translation, estimating how much power it would take on a Raspberry Pi is likely easier. \$\endgroup\$ – pipe Aug 2 '17 at 11:25
  • 8
    \$\begingroup\$ @S.G: It seems he wants to find the power required on a RPi, then use that to estimate power for the same task implemented in a FPGA. Basically, that's just plain not going to work. \$\endgroup\$ – Olin Lathrop Aug 2 '17 at 11:40
  • 3
    \$\begingroup\$ @S.G: Nobody knows or cares about the power consumption of individual instructions executed. Just think about how the data processed will have a great influence. \$\endgroup\$ – JimmyB Aug 2 '17 at 11:51
  • 5
    \$\begingroup\$ @S.G "the power consumption is influenced by the amount of data" - Not only the amount of data, but also the data itself. The most obvious example: if ( x == y ) { doSomething(); } - Vastly different resource use depending on whether or not x==y at runtime. More subtle differences may be found in things like x++. This may require a little more (or less?) power if x overflows for instance. \$\endgroup\$ – JimmyB Aug 2 '17 at 12:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.