WARP Project Forums - Wireless Open-Access Research Platform

You are not logged in.

#1 2011-Jun-22 04:22:58

amitesh.sharma
Member
Registered: 2011-Jun-17
Posts: 5

Scrambler

Hi All,

I need to know what is the initialization sequence being used for scrambler. And on what factors would it depend.

Regards,
Amitesh

Offline

 

#2 2011-Jun-22 21:12:28

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

Re: Scrambler

Our PHY uses an explicitly declared repeating sequence of scrambling bytes (see ofdm_tx_supermimo_init.m).

Offline

 

#3 2015-Mar-11 17:07:37

northk
Member
Registered: 2013-Dec-18
Posts: 40

Re: Scrambler

Hi,

I also would like to know more about the implementation of the scrambler.
I check the standard, and it says: "When transmitting, the initial state of the scrambler shall be set to a pseudorandom nonzero state."
I would like to know, will the TX node randomly reset the initial seed of the scrambler for each packet transmission? Or, it only randomly selects the seed once, and keep using the same seed for every transmission?

Thanks,

Offline

 

#4 2015-Mar-11 20:11:35

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

Re: Scrambler

Just to clarify- the question above (from 2011) is about the older OFDM Reference Design.

In the 802.11 Reference Design the Tx PHY scrambler has two modes.

In the first mode the scrambler state is not reset after a packet is transmitted. The end state from the previous Tx becomes the initial state for the next Tx. In a sense, the previous packet's length is the seed for the next packet's scrambler state. This is the default mode in the ref design.

The second mode resets the scrambler state on every Tx. This is useful for debugging if you need to generate identical waveforms for multiple transmissions of a given payload.

Offline

 

#5 2015-Mar-13 11:17:53

northk
Member
Registered: 2013-Dec-18
Posts: 40

Re: Scrambler

Thank you very much for the reply, and thanks for the clarify.

Offline

 

#6 2015-Apr-02 14:23:16

northk
Member
Registered: 2013-Dec-18
Posts: 40

Re: Scrambler

Hi,

Currently, I need the 802.11 Reference Design to operate in the second mode for my experiment.
How could I switch to the second mode?
(Just change the second bit of the REG_TX_Config to 1?
Can I set this bit in the C files by adding this line:
REG_SET_BITS(WLAN_TX_REG_CFG, WLAN_TX_REG_CFG_RESET_SCRAMBLING_PER_PKT);
in the function wlan_phy_init() in wlan_mac_low.c ?)

Also, just to make sure that I understand it correctly: If the 802.11 Reference Design is operating in the second mode, it will reset the scrambler state to the same seed (is it the "all ones" seed?) before each transmission and thus generates identical waveforms for the same payload. Is it correct? Will the waveform of ACKs also be identical?

Thanks,

Offline

 

#7 2015-Apr-02 14:45:20

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

Re: Scrambler

How could I switch to the second mode?
(Just change the second bit of the REG_TX_Config to 1?
Can I set this bit in the C files by adding this line:

REG_SET_BITS(WLAN_TX_REG_CFG, WLAN_TX_REG_CFG_RESET_SCRAMBLING_PER_PKT);

in the function wlan_phy_init() in wlan_mac_low.c ?)

Yes, exactly.

Also, just to make sure that I understand it correctly: If the 802.11 Reference Design is operating in the second mode, it will reset the scrambler state to the same seed (is it the "all ones" seed?) before each transmission and thus generates identical waveforms for the same payload. Is it correct? Will the waveform of ACKs also be identical?

Right- the scrambler is a 7-bit LFSR implemented as a chain of D flip flops ("Register" blocks in Sysgen). When RESET_SCRAMBLING_PER_PKT is enabled every DFF is reset to '1' at the start of every Tx. Packets with identical payloads will generate identical waveforms in this mode. The PHY doesn't care about packet type (DATA, ACK, etc).

One consideration when using this mode- the 802.11 scrambler is designed to "whiten" transmitted waveforms. Changing the seed across MAC re-transmissions overcomes the occasional bad waveform (typically one with higher-than-tolerated PAPR). If you fix the seed at all 1's, your experimental results may be biased by the characteristics of your specific waveform.

Offline

 

#8 2015-Apr-03 12:05:37

northk
Member
Registered: 2013-Dec-18
Posts: 40

Re: Scrambler

Thank you very much for the clarify and the suggested consideration.

Offline

 

#9 2015-Apr-06 13:46:59

northk
Member
Registered: 2013-Dec-18
Posts: 40

Re: Scrambler

Hi,

Is it possible to set the REG_SET_BITS(WLAN_TX_REG_CFG, WLAN_TX_REG_CFG_RESET_SCRAMBLING_PER_PKT);
using the wlan_exp framework?
I didn't find this command in the website: https://warpproject.org/docs/mango-wlan … ht=filter#
Just to make sure. It will be very convenient if it can be set using the wlan_exp framework.

Offline

 

#10 2015-Apr-06 15:17:29

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

Re: Scrambler

We have not implemented a wlan_exp command to control the scrambling mode. However there is a simple way to add this to the C code.

The wlan_exp node class defines a method node._set_low_param(param, values). This method acts as a "pipe" from wlan_exp to the code in CPU Low, bypassing any interpretation by CPU High. It should be used with care - it is dangerous to change state in CPU Low while the PHYs and DCF state machine are running. This pipe should only be used to change parameters that will not disrupt MAC/PHY state. Changing the Tx PHY scrambling mode is a good use of this method.

To enable scrambling mode control via the _set_low_param() method:
-Select a new param ID that does not overlap the existing IDs in wlan_mac_low.h

-Add your new param control code to the IPC message handler in wlan_mac_low.c using the new param ID.

-In Python call node._set_low_param(<new param ID>, <scrambling mode 0 or 1>)

For example:

Code:

//in wlan_mac_low.h
#define LOW_PARAM_TX_SCRAMBLER_MODE 0x1000

//in wlan_mac_low.c / case IPC_MBOX_LOW_PARAM: / case IPC_REG_WRITE_MODE:
case LOW_PARAM_TX_SCRAMBLER_MODE:
	if( ipc_msg_from_high_payload[1] == 1 ) {
		REG_SET_BITS(WLAN_TX_REG_CFG, WLAN_TX_REG_CFG_RESET_SCRAMBLING_PER_PKT); 
	} else {
		REG_CLEAR_BITS(WLAN_TX_REG_CFG, WLAN_TX_REG_CFG_RESET_SCRAMBLING_PER_PKT); 
	}
break;

The benefit of this approach is you can implement the wlan_exp -> CPU Low path without modifying any code in CPU High. You will still need to maintain your CPU Low code modifications across future updates of the Reference Design. But this is much easier than maintaining High and Low changes.

Offline

 

#11 2015-Apr-07 15:36:27

northk
Member
Registered: 2013-Dec-18
Posts: 40

Re: Scrambler

Thanks a lot for the information.

Offline

 

Board footer