wiki:OFDMReferenceDesign/Applications/CSMA

OFDM Reference Design - CSMA Link

This application uses the OFDM Reference Design to build a wired-to-wireless bridge implementing the CSMA MAC protocol for the over-the-air link. It utilizes two WARP nodes, each connected via Ethernet to a separate PC. Every packet received on the WARP node's Ethernet interface is transmitted over the air, addressed to the other WARP node. Every packet received over the air is copied to the node's Ethernet interface. This bridging "tricks" the two PCs into believing they are connected directly over Ethernet. This application implements the same basic function as the Bridge application, but uses a more sophisticated protocol for wireless medium access.

Requirements

  • 2 WARP SISO or MIMO kits (analog board in slot 4 optional)
  • 2 PCs with Ethernet interfaces

Setup

  1. Set the DIP switches on the WARP nodes to 0 and 1
  2. Connect each WARP node directly to the Ethernet interface of the PCs
  3. Configure the PC Ethernet interfaces with IP address on the same subnet (10.0.0.1 and 10.0.0.2, for example)
  4. Generate the FPGA configuration file for the design using the OFDM Reference Design project and the CSMAMAC source code
  5. Configure both WARP nodes using the same download.bit
  6. When it's working, the PCs will be able to ping each other, stream video (using VLC, for example), or any other point-to-point network application

Code

The code for this application is provided in csmaMac.c. The default OFDM Reference Design project includes CSMAMAC as a software project.

Protocol

This application uses our CSMA implementation. See the CSMAMAC page for a full description of the state machine and overview of the code.

Timing

The values below correspond to OFDM Reference Design v14

The basic packet exchange which defines the maximum throughput for CSMA is DATA-ACK-DATA. The timing of this exchange in our implementation is illustrated below. Please note the figure is not drawn to scale.

This figure assumes the following parameters:

  • SISO antenna configuration
  • 2 OFDM symbols for channel training per packet
  • 24 byte MAC header at QPSK (2 OFDM symbols)
  • Full rate modulation of QPSK (12 bytes per OFDM symbol) or 16-QAM (24 bytes per OFDM symbol)
  • 1484 byte payloads (1470 byte IP datagram + 14 byte Ethernet header)

This figure includes a random backoff period imposed after a node receives an ACK. This period is designed to prevent two fully-backlogged nodes from simultaneously attempting to transmit a new packet immediately after the previous DATA-ACK exchange completes. The backoff imposes a wait of an integral number of slot durations (a slot is 22µs in v14), with the slot count drawn randomly from [0,7].

Given this timing, the average minimum period for transmitting a new full-length DATA packet is 1263µs (for QPSK full rate) or 775µs (for 16-QAM full rate), implying a peak data throughput of 9.31Mbps for QPSK and 15.2Mbps for 16-QAM.

Benchmarks

Detailed benchmarks are available for the latest (v14) reference design's CSMA implementation.

Last modified 15 years ago Last modified on Dec 1, 2009, 1:13:05 PM