[sim-wg] Regarding Power consumption

Chad Metcalf metcalfc at gmail.com
Wed Feb 14 11:33:18 PST 2007


So power consumption of the CPU came up in the con-call yesterday, briefly.

So I think this is going to be a rough estimate sort of calculation. You can
gather some metrics about the average consumption for the various states.
Hook into the microcontroller power management McuSleep interface and keep
track of how long you stay in a particular state.

These TEPs might provide more insight.

http://www.tinyos.net/tinyos-2.x/doc/html/tep112.html
http://www.tinyos.net/tinyos-2.x/doc/html/tep115.html

Though I'm not sure these are simulated. You might need to add the
functionality.

I think precise CPU calculations are more towards ATEMU or AVORVA style
simulation.

Cheers
Chad

On 2/3/07, Venkatesh S. <svenkat at cedt.iisc.ernet.in> wrote:
>
>  Hello :
>
>      As per the direction of Phil, I looked around the HPL implementation
> of the I/O maps for Atmega Microcontroller. There is a file which has the
> implementation of the pin's functionality (set and clear).  Instead of
> getting the pin status at a particular interval of time, I thought of having
> some modifications in the file itself.  The Pin configuration file (
> HPLAtm128GeneralIOPinP.nc in the sim directory) has commands which sets or
> clears that pin by calling the macros.
>
>      Power estimation can be done in such a way that the Pin configuration
> file maintains the track of total time spent in clear/set states and at the
> same time update the Power-Estimator-Engine.  The power estimator engine
> based on the port and pin numbers, computes the energy spent over the time.
> The port-pin have to be specified to the power-estimator and also the amount
> of current that is drawn by the pin for each set/clear.
>
>      For example, if a Led is considered, then pin A0, A1, A2 are mapped
> to led0, led1 and led2.  But getting this information to the
> Power-Estimator-Engine is where i have got stuck.  To just test this around,
> i had a header file, which specifies the ports that are used and their
> current consumption, accordingly the Power-Estimator-Engine computes the
> energy spent.
>
>      The Energy computation is from the basic principles E = V x I x t.
> For example if i consider Led, I = 2.2 mA on a mica2 mote, and V = 3v, t
> is the time spent in the On state of Led (in other words, pin being active
> low).  I took a normal blink application, which On's and Off's the led0 for
> every 1 second.  From the boot time, for 10 secs, the pin is held active low
> for 5 times, which means, E = (3 * 2.2 * 1) * 5 = 33 mA (approximately).
> When i looked at the implementation of the Tinyos-1.x power Tossim, it
> used to do the same way.  My feel is instead of keeping the the Voltage
> constant(as done in Tinyos-1.x), it has to vary over the time.  To do
> that, we need to have a voltage-discharge curve over the time.
>
>      I need some guidance for implementing the CPU profiling part.
>
>
>
>
> --
> Regards,
> Venkatesh S
>
>
>
>
>
>
>
>
>
>
> _______________________________________________
> Sim-wg mailing list
> Sim-wg at Millennium.Berkeley.EDU
> https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/sim-wg
>
>


-- 
Chad @ Home
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.millennium.berkeley.edu/pipermail/sim-wg/attachments/20070214/e13a29e9/attachment.htm


More information about the Sim-wg mailing list