[sim-wg] Agenda for 3/13 telecon

Philip Levis pal at cs.stanford.edu
Tue Mar 13 23:03:21 PDT 2007


On Mar 13, 2007, at 10:59 PM, Venkatesh S. wrote:

>
>
>     I had taken a simple blink application, but I wanted to take a  
> network application and simulate the network and get the results  
> (both in AVRORA and our T2 power model).  To do so, I am stuck in  
> the discussion items and I am briefing out the same.
>
> Discussion Items:
>
> 1.        Added the ADC functionality in TOSSIM, but need to  
> discuss regarding the ADC model.
>
>            To know about the MCU state of ADC_NR, I needed this  
> part to be done.  So, I thought of porting the ADC functionalities  
> which is present in tos/chips/ATM128/adc to the simulation.  I  
> didn’t change much, but modified the ATM128AdcP.nc to return a  
> random number in the “getData” command.  I wanted to bring the  
> notion of interrupt and for signaling the “dataReady(data)” event.   
> Is there a way to bring the notion of interrupt?
>
> 2.        Adding the functionality of MCU ACTIVE state
>
>            For an MCU to be ACTIVE, he has to service any of the  
> peripherals over the time.  The peripherals are SPI busses, UART  
> busses, ADC, external oscillator, accessing external memory such as  
> flash.  I think I need to access some registers to know about it,  
> but not sure which all.
>
> 3.        Adding the SPI functionality in TOSSIM
>
>           When looking through the micaz platform, I found two  
> files in the platform/micaz/chips/cc2420/sim directory.  It was  
> providing the functionalities of the SPI pins of the  
> microcontroller and the radio pins.  Implementation for cc1000  
> radio was followed as per above.  What are the functionalities that  
> I need to add to this file and link the same to the radio?  Also, I  
> am thinking of binding this to the cc1000 radio, so that I can do  
> the Radio profiling.
>
> 4.        Radio profiling with SPI functionality
>
>     Radio profiling can be done either considering the MAC layer (B- 
> Mac of CC1000) or the Tossim MAC.  If we can have a simulation of  
> SPI, then binding the SpiPacket interface to the simulator will do  
> the packet level simulation retaining the MAC layer above it  
> (CC1000).  When I think of porting this MAC to simulation, I need  
> to know the RSSI which is linked to ADC block.
>
> 5.        Difficulty in getting the AVRORA results
>
>     I used AVRORA tool for running the T2 Blink application, it  
> worked fine.   When I tried the same with a network application  
> (MultihopOscilloscope), I was unable to get the energy profiling of  
> the radio.  This happens with the T2 code, but for T1 it works fine.
>
>
>
> So chad, if I get some inputs on the above discussion, then I may  
> be completing the first stage in a couple of weeks.
>
>

Basically, I think that the best way to approach this is to move the  
simulation boundary down. Right now, the ADC and the radio are  
simulated at a high level: getData(), send(). This makes it tough to  
monitor power states. If you take a look at chips/atm128/timer/sim,  
you can find a down to the register simulation of Timer0 for the  
atmega128. Because TOSSIM actually keeps track of all of the  
simulated registers, then things like MCU power state can fall out  
naturally: if you have low-level simulation of all peripherals, then  
the control bits will be right and McuSleepC will do the right thing.

For the sake of the radio, this basically means simulating its  
control lines and SPI commands. There is already a 1.x CC2420  
simulation implementation, so you might be able to start there.

I'm not sure what this entails with respect to an ADC.

Phil


More information about the Sim-wg mailing list