wiki:OFDMReferenceDesign/Applications/Characterization

Version 3 (modified by rpl1, 15 years ago) (diff)

--

OFDM Reference Design - MAC/PHY Performance Characterization

This application characterizes the performance of the OFDM Reference Design and a user-supplied MAC implementation. This application utilizes multiple WARP nodes along with external PCs to orchestrate the experiments.

In this application, the WARP nodes have no MAC or IP addresses. Both nodes run the same program.

The following diagrams represent two possible topological configurations for the setup of this application:

Requirements

Setup

  1. Connect each WARP node directly to the Ethernet interface of the router
  2. Configure the PC Ethernet interfaces with IP address on the same subnet (10.0.0.1 and 10.0.0.2, for example)
  3. Connect each PC directly to the Ethernet interface of the router

OFDM Reference Design Code

Summary: The following extensions to the warp framework seeks to expand node control by allowing a server to relay requests to warpnodes. The requests are sent as different struct types. These structs will set board parameters to certain values using Command and Traffic structs, and command (command structs) the board to stop and start transmissions, as well as request data (stat structs) about the transmission. This model places the boards in a state where data for wireless transmission is locally created instead of taken from the ethernet.

The development of creating an interactive warpnet control requires the introduction of new structure types for the warp platform These to types are warpnodeStats (which contains Statistical Data) and warpnodeTraffic (which contains parameters for updating the board) The two types are defined as:

/Struct containing node statistics typedef struct {

unsigned char structType; unsigned char nodeID; unsigned char partnerID; /Reserved Byte unsigned char reserved0; /Used to track number of goodPackets unsigned int goodPackets; /Used to track number of partnerBadPackets unsigned int partnerBadPackets; /Used to track number of otherBadPackets unsigned int otherBadPackets; unsigned int rxBytes; unsigned int txBytes; /Time in clock cycles. Recall PPC405 clock freq is 240000000 HZ. unsigned long long time;

} warpnodeStats;

/Struct containing traffic paramters for a node typedef struct {

unsigned char structType; / unsigned char nodeID; /Value of 1 denotes Transmit, Value of 0 denotes Receive unsigned char trafficMode; /Reserved Byte unsigned char reserved0; /Interval between start of each packet (in usec) unsigned int txInterval; /The length of the packet (in bytes) unsigned short txPacketLen; /Reserved Short unsigned short reserved1;

} warpnodeTraffic;

Because of these types warpnet_node.h needs to be expanded with these two structs.

Additionally, new pound defines are required for new struct type definitions: Under Struct Types for WARP Node <-> Server Packets Add: #define STRUCTID_NODETRAFFIC 0x45

Under Node command codes #define NODECMD_SENDPACKET 0x64 #define NODECMD_SENDSTATS 0x65 #define NODECMD_START 0x66 #define NODECMD_STOP 0x67 #define NODECMC_REQUESTSTATS 0x68

The traffic struct include a paramter called trafficMode. trafficeMode specifies whether a board is transmittion or receiving. Include two #defines for Transmit and Receive: #define TRANSMIT 1 #define RECEIVE 0

Help: In warpmac.c and csmaMac.c you could comment out warpnet_node.h and replace it with my attached warpnet_node2.h

We need to expand the number of global variables. One can choose to include that standard code for processing numRxStructs and place this in mgmtFromNetworkLayer_callback. By including some of these definnitions such as STRUCTID_NODECONTROL, STRUCTID_NODEID, STRUCTID_NODECOMMAND that include commands for reseting, reboots, sendpacket. This standard code will need certain global variables.

For the new extension to the previous frame work, the following global variables will be required:

/Global Stat struct warpnodeStats myStats[WARPNET_NUMNODES];

/Place holder for TRANSMIT or RECEIVE state unsigned char Mode;

/Measures time for beginning and end of transmission XTime start_timer, end_timer;

unsigned int pktCount_good, pktCount_bad;

/Parameters used for warpmac_startPacketGeneration unsigned int Time; unsigned short packetlength;

Two functions should be included: void sendAck(char rxSeqNum)

and

void sendStatsPacket()

void processControlStruct(warpnodeControl* ctrlStruct)

In previous designs of warnet, the emacRx_callback was called when data was specified for the node and when it was specified for transmission over the air. The new design splits mgmtFromNetworkLayer_callback

Whenever phyRx_badHeader_callback is called, we need to update all otherBadPackets in myStats. We do this by looping over the number of WARPNET_NUMNODES

int i; Update every stats struct, since we don't know where this bad pkt came from for(i=0; i<WARPNET_NUMNODES; i++) {

myStats[i].otherBadPackets++;

}

When phyRx_goodHeader_callback is called, two types of updates need to occur if myStats. If the callback enters the if(state&GOOD) we need to update the goodPacket count, rxBytes and txBytes as follows:

myStats[srcNode].goodPackets++; myStats[srcNode].rxBytes += (packet->header.length + NUM_HEADER_BYTES + NUM_PAYLOAD_CRC_BYTES + NUM_PAYLOAD_TAIL_BYTES); myStats[srcNode].txBytes += NUM_HEADER_BYTES;

If the callback enters the if(state&BAD) we need to update the partnerBadPackets:

myStats[srcNode].partnerBadPackets++;

In the main function, a couple values need to be initialized.

Dumb Server Code

Tcl Client Code

Attachments (7)

Download all attachments as: .zip