Changes between Version 8 and Version 9 of OFDM/MIMO/Docs/AutoResponse
- Timestamp:
- Aug 29, 2009, 3:06:11 PM (15 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
OFDM/MIMO/Docs/AutoResponse
v8 v9 21 21 * PHY_AUTORESPONSE_MATCH_CONFIG(''addr'', ''len'', ''val''): Configure the match unit to check whether ''len'' header bytes starting at ''addr'' match value ''val'' 22 22 23 '''Actor configuration:''' 24 Each actor is configured with a single register write; each actor is access with its own macro ({{{mimo_ofdmTxRx_setActionN(''config'')}}}), where N is in [0,5] and ''config'' is the value returned by one of these actor configuration macros:25 * PHY_AUTORESPONSE_TXACTION_CONFIG(''pktBuf'', '' translateHdr'', ''delay'', ''conditions''): Configure the actor to automatically transmit:23 '''Actor configuration:''' [[BR]] 24 Each actor is configured with a single register write; each actor is accessed with its own macro ({{{mimo_ofdmTxRx_setActionN(''config'')}}}), where N is in [0,5] and ''config'' is the value returned by one of these actor configuration macros: 25 * PHY_AUTORESPONSE_TXACTION_CONFIG(''pktBuf'', ''options'', ''delay'', ''conditions''): Configure the actor to automatically transmit: 26 26 * ''pktBuf'': index (in ![1,31]) of the packet buffer from which to automatically transmit the packet 27 * '' translateHdr'': enable the header translator when this actor triggers a transmission 'PHY_AUTORESPONSE_ACT_TRANS_HDR: use the translator; 0: disable the translator)27 * ''options'': enable the header translator when this actor triggers a transmission 'PHY_AUTORESPONSE_ACT_TRANS_HDR: use the translator; 0: disable the translator) 28 28 * ''delay'': number of 0.25µs increments to delay the automatic transmission. The time starts when the final byte of the incoming packet is decoded, even if the actor doesn't depend on the payload error status 29 29 * ''conditions'': bitwise OR'd combination of actor condition flags; every condition must be met by a given reception to trigger the actor. … … 31 31 * PHY_AUTORESPONSE_ACTION_SETFLAGB_CONFIG(''conditions''): Configure the actor to set Flag B; ''conditions'' is a bitwise OR'd combination of actor condition requirements 32 32 33 '''Actor condition requirements:''' 34 33 '''Actor condition requirements:''' [[BR]] 34 The following values are used to specify the conditions for each actor. These values should be bitwise OR'd together to form the ''conditions'' field in the {{PHY_AUTORESPONSE_TXACTION_CONFIG}} macro. 35 35 * PHY_AUTORESPONSE_REQ_GOODHDR: Packet currently being received is decoded without header errors 36 36 * PHY_AUTORESPONSE_REQ_BADPKT: Packet currently being received has errors in payload but not header … … 45 45 * PHY_AUTORESPONSE_REQ_MATCH5: Match unit 5 conditions are met by the current packet header 46 46 47 '''Actor options:''' 48 47 '''Actor options:''' [[BR]] 48 The following values are used to specify the options for each actor. These values should be bitwise OR'd together to form the ''options'' field in the {{PHY_AUTORESPONSE_TXACTION_CONFIG}} macro. 49 49 * PHY_AUTORESPONSE_ACT_TRANS_HDR: Use the header translator for the auto-triggered transmission 50 50 … … 53 53 * PHY_HEADERTRANSLATE_SET(''actionBuf'', ''txByteNum'', ''srcBuf'', ''srcByteNum''): Configure the translator to send the byte at index ''srcByteNum'' from the packet buffer ''srcBuf'' as byte number ''txByteNum'' for packets automatically transmitted from packet buffer ''actionBuf'' 54 54 55 == Sample Code == 56 The examples below illustrate how to use the OFDM PHY's auto response subsystem. These examples include only the auto responder configuration code. Please refer to the latest [wiki:OFDMReferenceDesign OFDM Reference Design] for a full hardware-ready MAC/PHY example which uses this code. 55 57 56 == Sample Code == 58 The examples below assume each packet has a 24-byte header, using the format of {{phyHeader}} from [source:/PlatformSupport/WARPMAC/warpphy.h warpphy.h]. Specifically, the examples assume the header has fields: 59 {{{ 60 #!C 61 unsigned short int srcAddr; //Source MAC address 62 unsigned short int destAddr; //Destination MAC address 63 unsigned short int relAddr; //Relay MAC address 64 unsigned char pktType; //Packet type 65 }}} 66 67 === Automatic ACKs === 68 This example configures the PHY to automatically transmit an ACK packet whenever a DATA packet is received whose destination address matches the local node's address. This is the usual behavior of protocols like Aloha and CSMA. Notice that all other MAC behaviors, like random backoffs and re-transmissions, are handled by the MAC implementation in C (not included here). 69 57 70 {{{ 58 71 #!C