wiki:OFDM/MIMO/Docs/ModelDriver

Version 1 (modified by murphpo, 17 years ago) (diff)

--

ofdm_Rx_mimo.h

INTR_BAD_PKTS: Flag used when calling mimo_ofdmRx_setOptions() to enable interrupts on the reception of packets which fail CRC.

INTR_GOOD_PKTS: Flag used when calling mimo_ofdmRx_setOptions() to enable interrupts on the reception of packets which pass CRC.

mimo_ofdmRx_setFFTScaling(c): Writes a value c to the Rx_FFT_Scaling register.

mimo_ofdmRx_setFFTWindowOffset(c): Writes a value to the Rx_symbolTimingOffset

mimo_ofdmRx_setRxScaling(c): Writes a value c to the Rx_Constellation_Scaling register.

mimo_ofdmRx_setEnergyThresh(c): Writes a value c to the Rx_pktDet_Energy_Thresh register.

mimo_ofdmRx_setLongCorrParams(c): Writes a value c to the Rx_PktDet_LongCorr_Params register.

mimo_ofdmRx_setPktDetDly(c): Writes a value c to the Rx_PktDet_Delay register.

mimo_ofdmRx_setNumOFDMSyms(c): Writes a value c to the Rx_OFDM_SymbolCounts register.

mimo_ofdmRx_setCorrThresh(c): Writes a value c to the Rx_pktDet_Corr_Thresh register.

mimo_ofdmRx_setCFOKI(c): Writes a value c to the Rx_FreqOffFilt_KI register.

mimo_ofdmRx_setCFOKP(c): Writes a value c to the Rx_FreqOffFilt_KP register.

mimo_ofdmRx_copyHeader(dest,len): Copies the first len bytes of a received packet to the address pointed at by dest .

mimo_ofdmRx_copyPayload(dest,len): Copies len bytes, starting at byte 12, of a received packet to the address pointed at by dest.

ofdm_Rx_mimo.c

void mimo_ofdmRx_init(): Clears all internal state in the OFDM core's receive path and holds the model in reset. This should be called once at boot before using the recevier.

void mimo_ofdmRx_enable(): Enables operation of the OFDM receiver. This should be called after mimo_ofdmRx_init().

void mimo_ofdmRx_disable(): Disables operation of the OFDM receiver. The receiver can be re-enabled using mimo_ofdmRx_enable().

void mimo_ofdmRx_setOptions(unsigned int someOptions, unsigned int intType): Sets the options flags in the receiver's configuration registers. someOptions is a bitwise OR'd combination of the receiver configuration flags defined in ofdm_TxRx_mimo.h. intType is a bitwise OR'd combination of INTR_BAD_PKTS and INTR_GOOD_PKTS, which are described above.

void mimo_mac2phy_PktAck(): Clears the interrupt registers in the receiver. When either interrupt is high, indication either a good or bad packet reception, the receiver will ignore all future incoming packets. The user application should process a received packet, then call this function to allow the receiver to process the next received packet.


ofdm_Tx_mimo.h

TXBLOCK: Flag used when calling mimo_mac2phy_pktTx(), causing the function to block until the packet finishes transmission. transmission.

TXNOBLOCK: Flag used when calling mimo_mac2phy_pktTx(), causing the function to return immediately, regardless of the state of the packet transmission.

mimo_ofdmTx_setFFTScaling(c): Writes a value c to the Tx_FFT_Scaling register.

mimo_ofdmTx_setPilot1Index(c): Writes a value c to the Tx_Pilots_Index1 register.

mimo_ofdmTx_setPilot1Value(c): Writes a value c to the Tx_Pilots_Value1 register.

mimo_ofdmTx_setPilot2Index(c): Writes a value c to the Tx_Pilots_Index2 register.

mimo_ofdmTx_setPilot2Value(c): Writes a value c to the Tx_Pilots_Value2 register.

mimo_ofdmTx_setRandom(c): Writes a value c to the Tx_RandomPayload_ModSel register.

mimo_ofdmTx_setNumBytes(c): Writes a value c to the Tx_NumPayloadBytes register.

mimo_ofdmTx_setNumSyms(c): Writes a value c to the Tx_OFDM_SymCounts register.

mimo_ofdmTx_setPktDoneReset(c): Writes a value c to the Tx_Start_Reset_Control register.

mimo_ofdmTx_setPreambleScaling(c): Writes a value c to the Tx_PreambleScaling register.

mimo_ofdmTx_copyHeader(src,len): Copies the first len bytes of a user packet to the transmit packet buffer from the address pointed at by src.

mimo_ofdmTx_copyPayload(src,len): Copies len bytes, starting at byte 12, of a user packet to the transmit packet buffer from the address pointed at by src .

ofdm_Tx_mimo.c

void mimo_ofdmTx_init(): Initializes the OFDM transmitter and holds it in reset. This function should be called once at boot before using the transmitter.

void mimo_ofdmTx_enable(): Enables the OFDM transmitter by de-asserting the reset signal.

void mimo_mac2phy_pktTx(unsigned int block, unsigned int radio): Initiates the transmission of a packet. This function should be called only after the packet is loaded into the transmit packet buffer and the packet's paramters (number of bytes, number of OFDM symbols, pilot tones, etc.) are configured via the macros described above. The argument block must be either TXBLOCK or TXNOBLOCK; radio is a bitwise OR'd combination of RADIO1_ADDR, RADIO2_ADDR, RADIO3_ADDR and RADIO4_ADDR, indicating which radios should be used for the packet's transmission.