[Tinyos-help] PowerTOSSIM question

Victor Shnayder shnayder at eecs.harvard.edu
Mon Mar 14 12:22:32 PST 2005

Samitinjoy Pal wrote:
> Hi,
> I am trying to use PowerTOSSIM and I followed all your instructions
> but it seems that the CPU is always in idle STATE which leaves me
> in a confused STATE.
> I looked at PowerStateM.nc and the PowerState.cpuState expects
> a input sm. But I am not sure where is the source of this signal
> + there is no active STATE in the list here.
> I ran bunch of apps and there is never "POWER: Mote %d CPU_STATE"
> in any of the myapp.trace. I even ran an apps with multiplication.
> Please help.

TOSSIM does not model the time the CPU transitions from IDLE to ACTIVE, so 
to get ACTIVE power, you have to use the cpu cycle counting code (which 
gives an estimate that is added to the total during postprocessing).  So 
unless you explicitly put the CPU in a low power state, the CPU will always 
remain in IDLE state as far as TOSSIM is concerned.

Hopefully that makes sense.  You can also try looking at the SenSys04 paper 
which has a more detailed description.


> Thanks a bunch,
> Samit
> // Code from PowerStateM.nc
>      async command void PowerState.cpuState(uint8_t sm) {
>           char cpu_power_state[8][20] = {"IDLE", \
>                                          "ADC_NOISE_REDUCTION", \
>                                          "POWER_DOWN", \
>                                          "POWER_SAVE", \
>                                          "RESERVED", \
>                                          "RESERVED", \
>                                          "STANDBY", \
>                                          "EXTENDED_STANDBY"};
>           if(!prof_on) return;
>           dbg(DBG_POWER, "POWER: Mote %d CPU_STATE %s at %lld\n",
> NODE_NUM, cpu_power_state[sm],
>               tos_state.tos_time);
>      }
> _______________________________________________
> Tinyos-help mailing list
> Tinyos-help at Millennium.Berkeley.EDU
> http://mail.Millennium.Berkeley.EDU/mailman/listinfo/tinyos-help

More information about the Tinyos-help mailing list