WARP Project Forums - Wireless Open-Access Research Platform

You are not logged in.

#1 2016-Jan-13 17:52:47

jadonabhinav
Member
Registered: 2016-Jan-11
Posts: 7

General Code Architecture

I usually work on the GNU-Radio. I am new to WARP code architecture. Here is what I am able to make out from limited analysis of the code. Since all the processing here is done on the hardware unlike GNU Radio. The code should be in a form of bit file that can be used to program the FPGA. The bit file is not readable . The readable form of the code is written in C and Matlab. I figured out that the Matlab System Generator is used to generate the C code from the Matlab code. Is everything I said right ?
My first question is If I modify the matlab model file (simulink) to my need, can I recompile the code ? Is this the right way to go about tailoring the code to your need ?
My second question is Should I delve into the C code for better understanding instead ?
My third question is should the modification I make to the MATLAB code should be done taking in  view that the code is being implemented in the hardware and typically the algorithms that are implemented on hardware differ from that implementations on generic hardware

Thanks in advance

Offline

 

#2 2016-Jan-13 20:53:44

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

Re: General Code Architecture

As a baseline, you can think of the WARP v3 node as an FPGA development board with various peripherals, including two RF interfaces. You can program the FPGA with whatever waveform and protocol processing is required for your research application.

We recommend a design flow that combines Xilinx System Generator cores with an embedded MicroBlaze processor. The Sysgen cores implement the real-time waveform processing, and the MicroBlaze runs C code for protocol implementations and peripheral I/O. We use this design flow for our reference designs (described below). The design flow is introduced in our Getting Started tutorials.

System Generator cores are designed in Simulink. The output of a Sysgen model is a pcore (peripheral core), bundling the HDL and cores which implement the logic design. The MicroBlaze CPU, Sysgen cores, and other peripheral controllers (Ethernet, UART, memory, etc) are integrated into one FPGA design using Xilinx XPS. The MicroBlaze C code is compiled using the Xilinx SDK.

Building a complete FPGA design from scratch is a big project. Recognizing this, we (i.e. the Mango team) maintain two complete reference designs you can use as starting points for your project.

The WARPLab Reference Design implements a PHY prototyping framework that uses WARP hardware for waveform Tx/Rx and MATLAB for waveform processing. In WARPLab the hardware buffers Tx and Rx waveforms, transmitting and receiving them in real time at 40MSps. The raw waveforms are transferred via Ethernet between the hardware and MATLAB. With WARPLab you can define custom Tx signals and implement any Rx waveform processing you need, all in m code. We provide a few example scripts, including  SISO OFDM and MIMO OFDM Tx/Rx examples.

The 802.11 Reference Design implements the MAC and PHY from IEEE 802.11. The MAC and PHY implementations run entirely in the FPGA in real time, enabling interaction among both WARP v3 nodes and commercial Wi-Fi devices. The full source code for the MAC and PHY are included. You can use the 802.11 Ref Design to explore a wide variety of real-time MAC/PHY extensions. We also provide a Python framework (wlan_exp) for running experiments with the 802.11 Ref Design. Python scripts can configure many WARP v3 nodes, execute experiments and retrieve results, all in real time.

We're happy to make suggestions on how to apply these designs  if you can describe your project in more detail.

Offline

 

#3 2016-Jan-17 10:06:43

jadonabhinav
Member
Registered: 2016-Jan-11
Posts: 7

Re: General Code Architecture

My application for now is pretty simple, I need to count the number of samples above a preset RSSI value. For this I was looking at the simulink model you have for the Rx chain. The first block in the chain outputs the value of RSSI, RX_I and RX_Q among other things. How do i go about changing the code now for my application.

Offline

 

#4 2016-Jan-17 17:09:14

jadonabhinav
Member
Registered: 2016-Jan-11
Posts: 7

Re: General Code Architecture

So, I read up a little more about the general code architecture. I now have a better understanding about WARP.
Here is what i have understood.
There is an FPGA code that implements the Microblaze processor on the FPGA complete with peripheral cores and instruction and data memory.
The cores are peripherals to the processors. much like device controllers , they help emulate PHY .
The micro-blaze processor runs the MAC state machine.
The Matlab Simulink models are converted to the C code and this C code is then used to program the pheripheral cores and the processor. This results in a bit file that is uploaded on to the FPGA.

My next question is : Is the filter that is responsible for clearing out the noise, implemented on the RF Frontend or its implemented in the RX chain ? I basically want to transmit/receive 5MHz bandwidth signals rather than the usual 20 MHz bandwidth signals. My guess is its implemented in the RF Frontend, it is possible for me to alter the bandwidth and the central frequency of the filter.

Thanks in advance !

Last edited by jadonabhinav (2016-Jan-18 10:23:34)

Offline

 

#5 2016-Jan-18 19:54:57

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

Re: General Code Architecture

The MAX2829 (the RF transceiver in each RF interface) implements low-pass filters in its Tx and Rx paths. The bandwidths of these filters are programmable from software via the radio_controller driver. Refer to the MAX2829 datasheet for the actual filter responses. The 802.11 reference design sets the filter bandwidths for a 20MHz bandwidth in wlan_phy_util.c.

Offline

 

#6 2016-Jan-18 19:57:31

jadonabhinav
Member
Registered: 2016-Jan-11
Posts: 7

Re: General Code Architecture

Regarding the details of my application . My application for now is pretty simple, I need to count the number of samples above a preset RSSI value. For this I was looking at the simulink model you have for the Rx chain. The first block in the chain outputs the value of RSSI, RX_I and RX_Q among other things. How do i go about changing the code now for my application  ?

Offline

 

#7 2016-Jan-18 22:18:30

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

Re: General Code Architecture

My application for now is pretty simple, I need to count the number of samples above a preset RSSI value.

Do you need to build this energy detection as an extension of the 802.11 Reference Design? If not, I would strongly encourage you to start with the WARPLab Reference Design. WARPLab can record long IQ and RSSI traces, then move them to MATLAB for analysis. It would be a simple WARPLab script to capture samples for N seconds, read the captured RSSI into MATLAB, then count the number of RSSI samples which exceed some threshold.

Offline

 

Board footer