[sim-wg] RE: Incorporation of Mica2 simulation

Venkatesh S. svenkat at cedt.iisc.ernet.in
Sun Jun 17 23:13:11 PDT 2007


Hello all:
    I regret for not updating a file under CVS, the file name is HplCC1000InitP.nc.  I have corrected the same and uploaded.  Apart from that, everything is fine for compilation.  Kindly let me know if there are any problems while compiling.

Cheers, 
Venkatesh S


-----Original Message-----
From: sim-wg-bounces at Millennium.Berkeley.EDU on behalf of Venkatesh S.
Sent: Sat 6/16/2007 2:37 PM
To: Philip Levis
Cc: simwg
Subject: [sim-wg] RE: Incorporation of Mica2 simulation
 
Hello Phil,

     I have updated the CVS with the recent modified files.  I was able to correct myself with the bugs that I had and the radio simulation is working fine. There is a slight change in the Radio simulating part.

     MICA2 's CC1000 Radio is simulated in TOSSIM based on the SPI event loop.  At the start, the radio_ticks are issued every RADIO_OSC_FREQ/RADIO_DATA_RATE (14000000/19200) simulator ticks.  All subsequent SPI events use sim_ticks_per_sec/radio_ticks (1000000000/729).  If a node wants to transmit data (TxNode) , it acquires access to the SPI events of all neighbouring receiver nodes(RxNodes) that are connected to the TxNode.    The TxNode issues SPI events to the RxNodes which now start receiving the transmitted data byte stream.  The TxNode releases access to the SPI event loop on all recievers and are free to use this loop.

     I have considered the TestAM application and modified the same to test the Acks.  More details can be found in Usage.txt present in the apps/tests/TestAM directory.

     While getting the memory part to work, I faced a problem in one of the #define's.

#define IRQ_PORT_E_PIN(bit) (uint8_t)&EICRB, ISC##bit##0, ISC##bit##1, bit in file  HplAtm128InterruptPinC.

     what does this indicate?  

     I was able to find the definitions of ISCXX and included the same in a header file, but even then I get a error message saying, the first parameter is not a constant in line 
new HplAtm128InterruptPinP(IRQ_PORT_D_PIN(0)) as IntPin0, which is present in HplAtm128InterruptPinC file.  

     Its pointing to the &EIRB.  

     Can anyone suggest me how to go around with this problem?

--
Regards, 
Venkatesh S



-----Original Message-----
From: Philip Levis [mailto:pal at cs.stanford.edu]
Sent: Mon 6/11/2007 10:14 PM
To: Venkatesh S.
Cc: simwg; Chad Metcalf
Subject: Re: Incorporation of Mica2 simulation
 
On Jun 9, 2007, at 9:16 AM, Venkatesh S. wrote:

> Hi phil,
>    The first update was to just compile for mica2 simulation  
> without inclusion of the CC1000 radio simulation.
> I have updated the CVS for CC1000 Radio simulation.
>
> CORE logic:
>    1) ADC0 sampling:  The MAC layer samples the ADC0 port for  
> receiveing RSSI and decides whether the medium is busy or free.  To  
> do this, the HplAtm128AdcP was modified to incorporate the same.   
> Here, the input to the simulator will be the rssi-log for Mica2  
> platform.  The log is found in apps/tests/TestAM/rssi-log- 
> mica2.txt.  Once this is fed, at the ADC0, we get a simulated RSSI  
> value based on CPM, which is converted back to digital value and  
> signal the same to the MAC layer.
>    2) Once the MAC layer decides that the medium is free, it begins  
> its transmmission. Byte by Byte transmission is done in  
> HplCC100SpiP which is simulated as events.  For every byte  
> transmission, based on the neighbor Radio state, a spiReadByte  
> event in allocated.
>
> Problems Facing:
>    1)  If the event time is just sim_time(), the service of the  
> write events takes first without subsequent events of the read  
> events for the other nodes. So, I changed to the event time to  
> trigger at sim_time()+10002.  Is that correct?
I don't understand. It seems like if one node writes a byte to  
transmit for the SPI, then other nodes should have receive events at  
approximately (8 * (sim_ticks_per_second/radio_bits_per_second)).  
They should not get a receive event until the last bit has been  
transmitted, rather than when the first bit starts transmitting.

>    2)  I am using the standard application for testing(TestAM).   
> For Broadcast, since there is no ack, nodes transmit.  Reception is  
> also working fine.  If the application is simulated for 10 seconds  
> it has to have 10 packets Tx and Rx, but it is only doing 2 packets  
> Rx and Tx.  I couldn't figure out where the actual bug is. I badly  
> need help in this.
If you fix part 1) above, I might be able to take a look later this  
week.


Phil









-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.millennium.berkeley.edu/pipermail/sim-wg/attachments/20070618/c8c7650c/attachment.htm


More information about the Sim-wg mailing list