Version 10 (modified by murphpo, 5 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
    • Configure the Rx RF interface to stay active during Tx
    • 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:


// Tx on RF A, Rx on RF B


// Rx on RF A, Tx on RF B

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 PHY 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

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

Keep Rx RF Interface Enabled
The reference code disables the Rx circuits on every RF interface when any interface is currently transmitting. For FDD the Rx interface must be configued to say in Rx mode independent of the Tx state of another interface. This is achieved by modifying the framework's wlan_rx_config_ant_mode() function in wlan_phy_util.c. Changes are required to 5 lines (add 3 lines, comment-out 2 lines), identified by the inline comments below:

    // Disable PHY control of all RF interfaces - selected interfaces to re-enabled below
    radio_controller_setCtrlSource(RC_BASEADDR, RC_ALL_RF, RC_REG0_RXEN_CTRLSRC, RC_CTRLSRC_REG);

    // Disable all RF interfaces that are already software-controlled
    radio_controller_TxRxDisable(RC_BASEADDR, RC_ALL_RF); // FDD-NoMAC

    switch (ant_mode) {
        case RX_ANTMODE_SISO_ANTA:
            //radio_controller_setCtrlSource(RC_BASEADDR, RC_RFA, RC_REG0_RXEN_CTRLSRC, RC_CTRLSRC_HW); // ref code
            radio_controller_RxEnable(RC_BASEADDR, RC_RFA); // FDD-NoMAC

        case RX_ANTMODE_SISO_ANTB:
            //radio_controller_setCtrlSource(RC_BASEADDR, RC_RFB, RC_REG0_RXEN_CTRLSRC, RC_CTRLSRC_HW); // ref code
            radio_controller_RxEnable(RC_BASEADDR, RC_RFB); // FDD-NoMAC

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

    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_RFA, RC_PARAMID_TXGAIN_BB, 3);
        else              radio_controller_setRadioParam(RC_BASEADDR, RC_RFA, RC_PARAMID_TXGAIN_BB, 1);

        // Tune the RF A interface to the requested channel
        radio_controller_setCenterFrequency(RC_BASEADDR, RC_RFA, 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_RFB, RC_PARAMID_TXGAIN_BB, 3);
        radio_controller_setCenterFrequency(RC_BASEADDR, RC_RFB, RC_5GHZ, 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.


(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