WARP Project Forums - Wireless Open-Access Research Platform

You are not logged in.

#1 2009-Nov-30 04:35:12

Alessia
Member
Registered: 2009-Nov-30
Posts: 4

How to modify the way Backoff counter is counted down...

Dear All,

I am wondering how one can change the way the backoff counter is counted down when sensing the communication channel. I would like to know whether there is a specific source file which is mainly in charge of handling the counter management and count down. More specifically, we would like to satisfy a certain set of conditions before allowing the counter to be counter down.

I appreciate your kind concern and am looking forward to hearing from you.

Kind Regards,
Alessia

Offline

 

#2 2009-Nov-30 08:43:04

murphpo
Administrator
From: Mango Communications
Registered: 2006-Jul-03
Posts: 5159

Re: How to modify the way Backoff counter is counted down...

The backoff counter in the OFDM reference design uses one of the timers in warp_timer pcore. Each timer (there are 8 in the core) can be configured to use/ignore the core's 'idlefordifs' input to pause/resume. Each timer can also be paused/resumed with software calls to warp_timer_pause(id) and warp_timer_resume(id), where ID selects which timer (in [0,7]) to affect.

Offline

 

#3 2009-Dec-01 03:06:03

Alessia
Member
Registered: 2009-Nov-30
Posts: 4

Re: How to modify the way Backoff counter is counted down...

Thanks buddy for the quick response. Based on your suggestions, I came up with the following (kinda!!) solution:

In the main() loop, we are gonna put the following while loop which resides within the infinite while(1) to check the status of backoff counter:


while (Condition_to_be_satisfied_while_backoff_is_running) {
       
      if (warp_timer_isActive(BACKOFF) && !warp_timer_isPaused(BACKOFF))
                warp_timer_pause(BACKOFF);
}

      if (warp_timer_isActive(BACKOFF) && warp_timer_isPaused(BACKOFF))
                warp_timer_resume(BACKOFF);
}

In a nutshell, if a bunch of conditions are hold, we enter the while loop and check whether: 1) Backoff counter is running, i.e., contains a non-zero value, and 2) Backoff counter is not paused. If so, we pause the backoff timer. As long as the conditions are satisfied, we stay in the same loop and due to the fact that we have already paused the backoff timer, we simply skip the if loop and do nothing. However, once the conditions are not hold anymore, we get out of the while loop. Subsequently, we check whether 1) Is there any active backoff, i.e., the backoff timer with non-zero content and 2) Is the timer is paused. If so, we resume the timer. We do all these again and again.

Now here is our question: Assume that backoff counter contains a non-zero value but has been paused. Now I wonder if warp_timer_isActive(BACKOFF) returns zero or one. Would you guys comment on this?

Thanks for the great forum and very nice community :)

Alessia

Offline

 

#4 2009-Dec-02 10:28:55

murphpo
Administrator
From: Mango Communications
Registered: 2006-Jul-03
Posts: 5159

Re: How to modify the way Backoff counter is counted down...

You need to be careful adding other loops to the while(1){warpmac_pollPeripherals()} loop. Any delays between calls to pollPeripherals will delay both Ethernet and wireless packet processing. You can safely poll the status of the timer in each loop iteration (this actually happens by default in warpmac_pollTimer()), but you don't want to add any delays between loop iterations.

Offline

 

Board footer