Bug 1142

Summary: Wrong 802.11p Slot time
Product: ns-3 Reporter: Michele Segata <michele.segata>
Component: wifiAssignee: Nicola Baldo <nicola>
Status: RESOLVED FIXED    
Severity: minor CC: ns-bugs, ruben
Priority: P5    
Version: ns-3.10   
Hardware: All   
OS: All   
See Also: https://www.nsnam.org/bugzilla/show_bug.cgi?id=945
Attachments: quick fix

Description Michele Segata 2011-05-13 05:45:07 UTC
By looking at the source code of the WifiMac class (src/devices/wifi/wifi-mac.cc) I have found a wrong slot time value for 802.11p CCH and SCH, in particular, at lines 340 and 351, you find:

SetSlot(Microseconds(16));

instead of 13 micros.

802.11p uses an OFDM PHY layer in the 5.9 GHz band, BW 10MHz and table 17-15 at page 626 of the 802.11-2007 standard says that the slot time for OFDM with 10MHz BW must use a 13 micros slot time, which is indeed how it is done in WifiMac::Configure80211_10MHz.

In my opinion, WifiMac::Configure80211p_CCH and WifiMac::Configure80211p_SCH should simply invoke WifiMac::Configure80211_10MHz.

NB: this error is present also in the ns-3.10 release.

Best

Michele Segata
Comment 1 Ruben Merz 2011-05-13 05:54:35 UTC
I looked into http://dx.doi.org/10.1109/IEEESTD.2010.5514475 (IEEE 802.11p) and it does not mention anything. The same for http://dx.doi.org/10.1109/IEEESTD.2006.254109 (IEEE 1609.4-2006, which says "The specific designations of these channels and the specification of the PHY are defined in IEEE Std 802.11, as amended by IEEE P802.11p."). So I would refer to 802.11-2007.
Comment 2 Nicola Baldo 2011-05-13 06:37:17 UTC
I did the same check and I came to the same conclusion, i.e., the slot time is defined by 802.11-2007 section 17.3.8.6 Slot time:

"The slot time for the OFDM PHY shall be 9 s for 20 MHz channel spacing, shall be 13 µs for 10 MHz
channel spacing, and shall be 21 µs for 5 MHz channel spacing.
Where dot11RegulatoryClassesRequired is true, the value of the slot time shall be increased by the value of
3 µs × coverage class. The default value of coverage class shall be zero."

I have been wondering whether 802.11p or 1609.4 specify any non-zero coverage class (this could justify a 16us slot) but after a quick search I would say that this is not the case.
Comment 3 Nicola Baldo 2011-05-13 06:48:36 UTC
Created attachment 1112 [details]
quick fix

I think the Configure80211p_CCH and Configure80211p_SCH methods will eventually go away when bug 945 is resolved, but I would leave them around for the moment being.

That said, here's a proposed patch. Ruben, Michele, do you think this is satisfactory?
Comment 4 Michele Segata 2011-05-13 07:09:27 UTC
(In reply to comment #3)
> Created attachment 1112 [details]
> quick fix
> 
> I think the Configure80211p_CCH and Configure80211p_SCH methods will eventually
> go away when bug 945 is resolved, but I would leave them around for the moment
> being.
> 
> That said, here's a proposed patch. Ruben, Michele, do you think this is
> satisfactory?

Yes, this is exactly what I meant :)
Comment 5 Ruben Merz 2011-05-13 11:30:30 UTC
(In reply to comment #3)
> Created attachment 1112 [details]
> quick fix
> 
> I think the Configure80211p_CCH and Configure80211p_SCH methods will eventually
> go away when bug 945 is resolved, but I would leave them around for the moment
> being.
> 
> That said, here's a proposed patch. Ruben, Michele, do you think this is
> satisfactory?

When a patch removes code, I always like it :-)
+1
Comment 6 Nicola Baldo 2011-05-13 11:40:47 UTC
changeset:   7162:c29fbeddbc04
tag:         tip
user:        Nicola Baldo <nbaldo@cttc.es>
date:        Fri May 13 17:40:37 2011 +0200
summary:     Bug 1142 - Wrong 802.11p Slot time