[sim-wg] Re: Incorporation of Mica2 simulation
Philip Levis
pal at cs.stanford.edu
Mon Jun 11 09:44:55 PDT 2007
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
More information about the Sim-wg
mailing list