WARP Project Forums - Wireless Open-Access Research Platform

You are not logged in.

#1 2017-Jul-06 16:21:16

OTurner2013
Member
Registered: 2017-Jun-09
Posts: 17

detected bits

Hello again :)

I would like to see the raw detected bits, ie after De-spread, Demod, Descramble. Is there a way to that?

I had 2 thoughts, both are easter egg hunts for me:
1. Get raw bytes off packet buffer then convert to bit stream, not sure if there will be an issue due to padding for PHY to fill in channel estimations. (not sure how to access this, maybe in wlan_mac_pkt_buf_util.c)
2. in wlan_platform_low, there is a Xil_Out32 that can be written to a log/fil

Any help in the right direction is appreciated.

Offline

 

#2 2017-Jul-06 23:06:19

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

Re: detected bits

The Rx packet buffer contains all payload bits decoded by the PHY. The DSSS Rx PHY does not write the SYNC or SFD fields to the packet buffer (see here for good guide to the 802.11 DSSS frame format).  You can access the decoded bytes by reading the Rx packet buffer anywhere in the C code.

Each Rx packet buffer starts with the rx_frame_info_t struct (metadata about the packet), then the PHY header (SIGNAL, SERVICE), then the MAC header+payload. See wlan_mac_pkt_buf_util.h for more details.

To access the Rx packet buffer contents from C:

Code:

u8* pkt_buf_addr;
u8* phy_header;
mac_header_80211* mac_header;

% Retrieve memory address for Rx packet buffer index rx_pkt_buf
pkt_buf_addr = (u8*)CALC_PKT_BUF_ADDR(platform_common_dev_info.rx_pkt_buf_baseaddr, rx_pkt_buf);

% Compute memory address for PHY header in current Rx packet buffer
phy_header = (u8*)(pkt_buf_addr + PHY_RX_PKT_BUF_PHY_HDR_OFFSET);

% Compute memory address for MAC header in current Rx packet buffer
mac_header = (mac_header_80211*)((u8*)(pkt_buf_addr + PHY_RX_PKT_BUF_MPDU_OFFSET));

From those pointers you can read specific byte offsets with your choice of C (Xil_In8(ptr+N), phy_header[N], etc).

Offline

 

#3 2017-Jul-11 15:43:33

OTurner2013
Member
Registered: 2017-Jun-09
Posts: 17

Re: detected bits

Am I correct in assuming that we will have to receive the SFD octets correctly to get the payload?

Thanks!

Offline

 

#4 2017-Jul-11 15:48:44

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

Re: detected bits

Right, the DSSS Rx pipeline will reset if the SFD is not detected following the SYNC field.

Offline

 

#5 2017-Jul-11 16:11:58

OTurner2013
Member
Registered: 2017-Jun-09
Posts: 17

Re: detected bits

In the DSSS Rx model, is there a way I can access the bits going into the Sync Block from the Descramble?

Offline

 

#6 2017-Jul-12 08:39:43

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

Re: detected bits

The DSSS Rx pipeline only writes decoded header/payload bytes to the packet buffer. The PHY preamble (SYNC, SFD) is processed by the PHY but not recorded anywhere. Monitoring the raw output of the descrambler would require modifying the Rx PHY model in System Generator/Simulink.

One option would be to add the descrambler output as another input to the ChipScope core, then use ChipScope Analyzer to extract the data. However this approach will not capture the bits for every packet (ChipScope uses JTAG to communicate with the hardware, so it's much too slow to offload data for every packet). Alternatively you could modify the DSSS Rx PHY control logic to write all descrambled bits to the packet buffer, or to another shared memory area (like a System Generator Shared Memory block). Any of these changes will require re-exporting the Rx PHY model from Sysgen, updating the XPS design then re-building the 802.11 hardware project in XPS.

Offline

 

#7 2017-Jul-14 10:20:59

OTurner2013
Member
Registered: 2017-Jun-09
Posts: 17

Re: detected bits

going back to your July 7th response. I added a getBit function to wlan_mac_df.c

When accessing the decoded bytes from the Rx packet buffer, how is the buffer index buf_idx defined?
here the Rx packet buffer index rx_pkt_buf

Code:

pkt_buf_addr = (u8*)CALC_PKT_BUF_ADDR(platform_common_dev_info.rx_pkt_buf_baseaddr, rx_pkt_buf);

Last edited by OTurner2013 (2017-Jul-18 07:36:33)

Offline

 

#8 2017-Jul-21 10:54:45

OTurner2013
Member
Registered: 2017-Jun-09
Posts: 17

Re: detected bits

Please answer some Xilinx License questions to complete PHY modification. Above mentions Sysgen and XPS rebuild

Recommended Tools for WARP v3:
"Xilinx ISE Design Suite: 14.4 System Edition"
Complete installation of ISE System Edition?

Xilinx wrote:

Unfortunately, Xilinx no longer offers our ISE tools for purchase.  However, we do provide ISE with any purchase of Vivado.  There are two Vivado suites available; "Design" and "System".  (Your license will entitle the last release version of ISE and any version prior. (To version 11.1)

The Design edition enables the ISE Embedded Edition while the Vivado System purchase enables the ISE system edition so please check the ISE support matrix at https://www.xilinx.com/products/design- … suite.html to make sure you purchase the correct Vivado to enable the features you need.

There are 2 possible licenses needs. Will I need both?
option 1: Vivado System allows ISE systems: Sysgen for Simulink Models
option 2: Vivado Design allows Xilinx Platform Studio (XPS)

Thanks for your help.

Offline

 

#9 2017-Jul-21 11:34:10

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

Re: detected bits

You definitely don't need both - Vivado System Edition is the superset of Vivado Design Edition.

Vivado System Edition definitely includes a license for XPS & ISE System Generator. I do not know whether Vivado Design Edition includes ISE System Generator. I would guess not, as it does not include Vivado System Generator. You'll have to buy licenses via a Xilinx distributor (typically Avnet) - the sales rep might be able to confirm.

Offline

 

Board footer