wiki:802.11/app_notes/FDD-NoMAC

Version 6 (modified by murphpo, 7 years ago) (diff)

--

802.11 Reference Design App Note: FDD NoMAC

This application note presents an extension of the 802.11 Reference Design to support frequency-division duplexing. This extension supports the AP and STA applications for CPU High and a custom FDD-capable NoMAC in CPU Low (note 1). The design uses both RF interfaces on two WARP v3 nodes. The RF A and B interfaces are tuned to different channels, and traffic flows in different directions at each interface, as illustrated below.

----------                 -----------
    RF A | >-- 2.4 GHz --> | RF A
AP       |                 |       STA
    RF B | <--  5 GHz  --< | RF B
----------                 -----------

This app note requires 802.11 Reference Design version 1.6.1 or newer (the lower MAC framework in previous designs did not support the two-step Rx processing flow required for this extension).

C Code Changes

Extending the 802.11 Reference Design to support FDD requires only C code changes. There are 3 stages of code modifications required:

  1. Update the high MAC (AP & STA) to use different RF interfaces for Tx and Rx
  2. Update the lower MAC framework to:
    • Tune the RF A and B interfaces to different channels
    • Disable logic paths that block simultaneous Tx/Rx PHY events
  3. Update the NoMAC application to handle simultaneous Tx/Rx

1. AP & STA Changes

The upper and lower MAC frameworks already support setting different antennas for Tx and Rx. By default each high MAC application sets the Tx and Rx antennas at boot using the selections defined in the top-level macros named WLAN_DEFAULT_TX_ANTENNA and WLAN_DEFAULT_RX_ANTENNA. For this 2-node FDD link we must update the AP and STA to use opposite antennas for Tx and Rx.

At the top of wlan_mac_ap.c and wlan_mac_sta.c, modify the existing macros to:

AP:

// Tx on RF A, Rx on RF B
#define  WLAN_DEFAULT_TX_ANTENNA  TX_ANTMODE_SISO_ANTA
#define  WLAN_DEFAULT_RX_ANTENNA  RX_ANTMODE_SISO_ANTB

STA:

// Rx on RF A, Tx on RF B
#define  WLAN_DEFAULT_TX_ANTENNA  TX_ANTMODE_SISO_ANTB
#define  WLAN_DEFAULT_RX_ANTENNA  RX_ANTMODE_SISO_ANTA

2. MAC Low Framework Changes

The lower MAC framework manages control of the MAC and PHY cores and the circuits in the RF interfaces. In the reference code the framework enables protection signals between the Tx PHY, Rx PHY and MAC cores that automatically reset the Rx PHY whenever the Tx PHY is active. These signals guarantee the node never receives its own transmissions, either through leakage from the Tx to Rx analog circuits on one interface or between RF interfaces when both are enabled. The lower framework also tunes both RF interfaces to the same center frequency whenever the MAC application requests a different channel.

Tx/Rx Interlock : the PHY-level mutual-exclusion between Tx and Rx is enabled in two configuration registers, one in the Rx PHY, the other in the MAC core. To disable the interlock:

In wlan_phy_util.c modify the wlan_phy_init() function:

// Config bit WLAN_RX_REG_CFG_USE_TX_SIG_BLOCK holds Rx PHY inputs at 0 when Tx PHY is active
//  Reference code sets this bit - must be disabled for FDD
// REG_SET_BITS(WLAN_RX_REG_CFG, WLAN_RX_REG_CFG_USE_TX_SIG_BLOCK); // ref code
REG_CLEAR_BITS(WLAN_RX_REG_CFG, WLAN_RX_REG_CFG_USE_TX_SIG_BLOCK);

In wlan_mac_low.c modify the wlan_mac_hw_init() function:

// Config bit WLAN_MAC_CTRL_MASK_BLOCK_RX_ON_TX blocks Rx pkt detection events when MAC core
//  TX_PHY_ACTIVE latch is active - must be disabled for FDD
// REG_SET_BITS(WLAN_MAC_REG_CONTROL, WLAN_MAC_CTRL_MASK_BLOCK_RX_ON_TX); //ref code
REG_CLEAR_BITS(WLAN_MAC_REG_CONTROL, WLAN_MAC_CTRL_MASK_BLOCK_RX_ON_TX);

Different Channels on RF A/B : the reference code tunes all RF interfaces to the same center frequency any time the MAC application requests a new channel. The RF interfaces are tuned in the wlan_mac_low_set_radio_channel(u32 channel) function in wlan_mac_low.c. The channel argument is an 802.11 channel index. This function also enables/disables the Rx PHY DSSS receiver when tuned to a 5 GHz channel, as DSSS transmissions only occur in 2.4 GHz channels.

A fully-general FDD implementation would modify this function to support a channel argument per RF interface. However this app note adopts the simpler scheme of:

  • Always disable DSSS Rx
  • Tune RF A to the channel requested by the MAC
  • Tune RF B to channel 36 (5180 MHz)

The modified wlan_mac_low_set_radio_channel() function is:

void wlan_mac_low_set_radio_channel(u32 channel) {
    // FDD-NoMAC version of wlan_mac_low_set_radio_channel()
    //  Disables DSSS Rx
    //  Tunes RF A to requested channel, RF B to channel 36

    // Always disable DSSS Rx
    wlan_phy_DSSS_rx_disable();

    if (wlan_verify_channel(mac_param_chan) == XST_SUCCESS) {

        // Update the framework's global variables for channel/band
        mac_param_chan = channel;

        if(mac_param_chan <= 14) mac_param_band = RC_24GHZ;
        else                     mac_param_band = RC_5GHZ;

        // Adjust Tx baseband gain when switching to 5GHz channels; this adjustment makes
        //  the actual Tx power set via the Tx VGA more accurate
        if(channel >= 36) radio_controller_setRadioParam(RC_BASEADDR, RC_RF_A, RC_PARAMID_TXGAIN_BB, 3);
        else              radio_controller_setRadioParam(RC_BASEADDR, RC_RF_A, RC_PARAMID_TXGAIN_BB, 1);

        // Tune the RF A interface to the requested channel
        radio_controller_setCenterFrequency(RC_BASEADDR, RC_RF_A, mac_param_band, wlan_mac_low_wlan_chan_to_rc_chan(mac_param_chan));

        // Tune the RF B interface to channel 36
        radio_controller_setRadioParam(RC_BASEADDR, RC_RF_B, RC_PARAMID_TXGAIN_BB, 3);
        radio_controller_setCenterFrequency(RC_BASEADDR, RC_RF_B, mac_param_band, wlan_mac_low_wlan_chan_to_rc_chan(36));
    } else {
        xil_printf("Invalid channel selection %d\n", mac_param_chan);
    }
}

3. NoMAC Application Changes

Finally the NoMAC application must be modified to support simultaneous Tx and Rx operations. In the reference code NoMAC implements two callback functions, frame_transmit() and frame_receive(). The lower MAC framework calls these functions to handle new Tx and Rx events. By default these callbacks block during a Tx/Rx event until the corresponding PHY event is complete. In order to support FDD operation these functions must be generalized to not block during PHY events. Instead the callbacks are responsible for starting the Tx/Rx processing and new functions are implemented to finish Tx/Rx processing.

TODO


(1) This app note intentionally does not use the DCF application in CPU Low. The 802.11 DCF is designed explicitly for TDD operation. The DCF assumes all nodes transmit and receive on a common channel and that nodes cannot transmit while receiving. Further it seeks to achieve transmission by 1 node at a time with well-defined rules for when nodes are allowed to transmit following activity on the common channel. All these properties are incompatible with FDD. Building a random-access MAC for an FDD system would be an interesting project but is far beyond the scope of this app note.

Attachments (1)

Download all attachments as: .zip