WARP Project Forums - Wireless Open-Access Research Platform

You are not logged in.

#1 2016-Jul-12 12:01:55

cancub
Member
Registered: 2015-Mar-06
Posts: 56

Difference between setting DIFS and TxDIFS

EDIT: sorry, I should have posted this in the MAC forum, but I don't know how to delete this post now.

The initialization of the DCF in wlan_mac_low.c has that two DIFS-related parameters being set:

Code:

wlan_mac_set_DIFS((T_DIFS)*10);
wlan_mac_set_TxDIFS(((T_DIFS)*10) - (TX_PHY_DLY_100NSEC));

Looking through the simulink models, it seems as though TxDIFS is the value that is used for the actual waiting procedure -- although I'm less than an amateur here. Can you comment on what the difference between these two parameters is? Is there a situation where I should only modify one parameter but not the other?

Last edited by cancub (2016-Jul-12 12:57:27)

Offline

 

#2 2016-Jul-12 14:26:56

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

Re: Difference between setting DIFS and TxDIFS

T_TxDIFS is T_DIFS minus the delay required for the Tx PHY to output the first sample of a new transmission.

A good way to understand this is to consider a fully-backlogged transmitter. After transmitting a DATA packet, it receives an ACK. After receiving the ACK the DIFS timers begin counting idle time. During this time the node prepares a new packet for transmission. Imagine the case where the node is lucky and draws 0 backoff slots. This means it is allowed to transmit its new packet exactly T_DIFS after the end of the previous ACK waveform (T_DIFS + 0*T_SLOT). However there is non-zero latency for the Tx PHY and Tx RF hardware to begin outputting a new waveform at the antenna port. Thus, the MAC core actually asserts the "start Tx" output before the end of the T_DIFS interval so that the actual waveform appears at the antenna port exactly when the DIFS ends. The difference between T_DIFS and T_TxDIFS must be a small fraction of T_SLOT, so that a node can determine that its terminal backoff slot was idle and still start it Tx PHY for transmission at the slot boundary.

This idea of DIFS vs TxDIFS is part of the 802.11 spec - see section 9.3 of IEEE 802.11-2012.

Offline

 

#3 2016-Jul-12 14:35:57

cancub
Member
Registered: 2015-Mar-06
Posts: 56

Re: Difference between setting DIFS and TxDIFS

I see. It makes sense to factor in the unavoidable delay between code/blocks and actually putting the frame on the medium. So then the two parameters are inextricably linked? If I were to alter one but not the other, I imagine that this would have some confusing consequences, so I guess my question is why would these be two functions rather than one function that takes the DIFS value and sets both parameters? Wouldn't the current setup leave open the opportunity for user error in this regard (say, if someone decided to only use wlan_mac_set_DIFS elsewhere without also using the TxDIFS counterpart)?

Offline

 

Board footer