Changes between Version 18 and Version 19 of OFDMReferenceDesign/Applications/Characterization
- Timestamp:
- Jul 1, 2009, 1:04:40 PM (15 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
OFDMReferenceDesign/Applications/Characterization
v18 v19 1 1 == OFDM Reference Design - MAC/PHY Performance Characterization == 2 2 3 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. The main focus of this design shows in real time how a computer running a client program written in a non-C language (TCL) can connect to a server, which interprets commands into warpnode management structures, to send commands to the warp nodes, which execute the commands.3 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. The main focus of this design shows in real time how a computer running a client program written in a non-C language (TCL) can connect to a server, which interprets commands into warpnode management structures, using the server to send commands to the warp nodes, which execute the commands. 4 4 5 5 In this application, the WARP nodes have no MAC or IP addresses. Both nodes run the same program. … … 29 29 === OFDM Reference Design Code === 30 30 31 __Summary:__ The following extensions to the OFDM Reference Design 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 two complete codes for the modificationsare the attached files csmaMac.c and warpnet_node2.c32 33 The development of creating an interactive warpnet control requires the introduction of new structure types for the warp platform 31 __Summary:__ The following extensions to the OFDM Reference Design expand node control by allowing a server to relay requests to warpnodes. The requests are sent as different C struct types. Command and Traffic structs set board parameters, while Command structs are used 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 two complete codes for the modifications OFDM are the attached files csmaMac.c and warpnet_node2.c 32 33 The development of creating an interactive warpnet control requires the introduction of new structure types for the warp platform. 34 34 These two types are warpnodeStats (which contains Statistical Data) and warpnodeTraffic (which contains parameters for updating the board) 35 35 The two types are defined as: … … 80 80 Under ''//Struct Types for WARP Node <-> Server Packets'' 81 81 {{{ 82 Add:#define STRUCTID_NODETRAFFIC 0x4582 #define STRUCTID_NODETRAFFIC 0x45 83 83 }}} 84 84 … … 92 92 }}} 93 93 94 The traffic struct include a param ter called trafficMode, which specifies whether a board is transmitting or receiving. Include two #defines for Transmit and Receive:94 The traffic struct include a parameter called trafficMode, which specifies whether a board is transmitting or receiving. Include two #defines for Transmit and Receive: 95 95 {{{ 96 96 #define TRANSMIT 1 … … 98 98 }}} 99 99 100 __Help:__ In warpmac.c and csmaMac.c you could comment out warpnet_node.h and replace it with myattached warpnet_node2.h100 __Help:__ In warpmac.c and csmaMac.c you could comment out warpnet_node.h and replace it with the attached warpnet_node2.h 101 101 102 102 The remainder of code extensions will occur in csmaMac.c … … 124 124 125 125 The design of sendAck sends a warpnodeCommand with values, which denote it is the ack version of the warpnodeCommand ({{{myNodeCmd.cmdID = NODECMD_NODEACK}}}). 126 126 127 The full design for sendAck is as follows: 127 128 {{{ … … 186 187 187 188 188 When a warpnodeControl struct is received the function processControlStruct updates the node with the parameters in the warpnodeControl struct.189 The function processControlStruct updates the node with the parameters in the warpnodeControl struct. 189 190 190 191 In previous designs of warpnet, 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 makes a distinction between these two types through mgmtFromNetworkLayer_callback and dataFromNetworkLayer_callback 191 192 192 The mgmtFromNetworkLayer_callback extends previous code s that have processed management structures because this callback processes thetraffic struct and the new node commands.193 The mgmtFromNetworkLayer_callback extends previous code used to process management structures because this callback processes the new traffic struct and the new node commands. 193 194 194 195 Because the nodes are on the same Ethernet network, the management callback checks if the Ethernet type is from the server to node or vice-versa. 195 If a packet is a NODE2SVR, the node has received an ack packet or stat packet from the other node. Because both nodes are on the same network and can see all traffic, in the implementation for SVR2NODE nodes checks the nodeID in the structs to determine whether the command is meant for it.196 If a packet is a NODE2SVR, the node has received an ack packet or stat packet from the other node. Because both nodes are on the same network and see all traffic on the network, the implementation for SVR2NODE nodes checks if the nodeID in the structs equals myID. 196 197 197 198 In the NODECMD, check the cmdStruct->cmdID for the IDs of NODECMD_RESETSTATS, NODECMD_START, NODECMD_STOP, and NODECMC_REQUESTSTATS: … … 287 288 288 289 289 When phyRx_goodHeader_callback is called, depending on the type, the count for goodPackets or partnerBadPackets is incremented 290 When phyRx_goodHeader_callback is called, either the count for goodPackets or partnerBadPackets is incremented. 291 290 292 If the callback enters the if(state&GOOD) update the goodPacket count, rxBytes and txBytes as follows: 291 293 {{{ … … 294 296 myStats[srcNode].txBytes += NUM_HEADER_BYTES; 295 297 }}} 298 296 299 If the callback enters the if(state&BAD) update the partnerBadPackets: 297 300 {{{ … … 299 302 }}} 300 303 301 In the main function, set warpmac_enableDataFromNetwork, warpmac_setBaseRate, and warpmac_enableDummyPacketMode. For this application, the boards will be left in DummyPacketMode because to prevent themfrom transmitting information from the wire. (Due to the nature of the set up with routers, the TCP ack packets sent from the TCL-client computer to the server computer will be sent over the wireless channel. This can create problem because the computers will retransmit the data when they don't receive TCP-acks)304 In the main function, set warpmac_enableDataFromNetwork, warpmac_setBaseRate, and warpmac_enableDummyPacketMode. For this application, the boards will be left in DummyPacketMode to prevent the nodes from transmitting information from the wire. (Due to the nature of the set up with routers, the TCP ack packets sent from the TCL-client computer to the server computer will be sent over the wireless channel. This can create problem because the computers will retransmit the data when they don't receive TCP-acks) 302 305 303 306 Set these global variables to default values: … … 326 329 }}} 327 330 328 Include the callback for management packets 331 Include the callback for management packets: 329 332 {{{ 330 333 warpmac_setMgmtFromNetworkCallback((void *)mgmtFromNetworkLayer_callback); … … 342 345 memset(&(txEthPktHeader.dstAddr), (unsigned char)0xFF, 6); //Broadcast destination address 343 346 }}} 344 345 346 347 347 348