📄 rxmain.h
字号:
/*****************************************************************************
Module : Main Receiver Definitions
******************************************************************************
Function : Header file for the main receiver.
Procedures : main()
processBuffer()
checkDIPswitch()
Author : $Author: Adrian $
Revision : $Revision: 9 $
Modified : $Modtime: 05-05-31 23:25 $
File : $Workfile: rxmain.h $
******************************************************************************
KTH, Royal Institute of Technology, S3, Stockholm
*****************************************************************************/
#ifndef RX_MAIN_H
#define RX_MAIN_H
/*--- Include files --------------------------------------------------------*/
#include <csl_stdinc.h>
#include "../common/commondef.h"
/*=== End of include files =================================================*/
/*--- Global defines -------------------------------------------------------*/
#define SDRAM_BASE_ADDR 0x80000000
/* number of data bytes per frame multiplyed by the channels (i.e. 2*128 bytes) */
#define DATABUFFSIZE (CHANNELS*(DATASYMBOLS/2))
/* buffer for file to transmit (8 MB) */
#define FILEBUFF (8*1024*1024)
/* size of one frame buffer (before upsampling) */
#define FRAMEBUFFSIZE FRAMESYMBLENGTH
/* number of samples to form a block for the energy computation */
#define ENERGYBLOCK 32
/* length of the working buffer (has to accomodate 2 I- and 2 Q-channel (BUFFSIZE/2 each)
and IFSYNCSAMP+BUFFSIZE/2) */
#define WORKBUFFLEN (BUFFSIZE*2)
/* lenght of the symbol buffer (must be a power of 2 since it is used for circular buffers) */
#define SYMBOLBUFFLEN 512 //(FRAMESYMBLENGTH+BUFFSIZE/OVERSAMPLING+1)
/*=== End of global defines ================================================*/
/*--- Global types declaration ---------------------------------------------*/
/* States for the receiver */
typedef enum
{
eRX_INIT,
eRX_FINDSTART,
eRX_RECSYNC,
eRX_RECEIVE,
eRX_TERMINATION
} typRX_eRxState;
/* Receiving states */
typedef enum
{
eRX_RCVIDLE,
eRX_RUNPLL,
eRX_RCVSYNC,
eRX_CHANNELEST1,
eRX_CHANNELEST2,
eRX_ANTENNASEL,
eRX_RCVFIRSTDATA,
eRX_RCVDATA
} typRX_eRcvState;
/* States for the receiving protocol */
typedef struct
{
/* receiving state */
typRX_eRcvState RcvState;
/* state variable for the communication method (SISO/MIMO) */
typCOM_eCommMethod RxMethod;
/* synchronization repetition (every ? frame)
if 1, only send sync frames
if 0, don't send any more sync (first sync will always be sent) */
int iSyncRep;
/* size of the file in pDataBuff */
unsigned int uFileSize;
/* number of blocks to transmit (each data and sync frame contains one block) */
unsigned int uNoOfBlocks;
/* currently receiving frame number */
unsigned int uFrameNo;
/* start index of the first occurence */
unsigned int uiStartIndex;
/* indicates if the switch synchronization is started */
int iSyncStarted;
} typRX_RECEIVESTATE;
/*=== End of global types declaration ======================================*/
/*--- Global variables declaration -----------------------------------------*/
/*=== End of global variables declaration ==================================*/
/*--- Global constants declaration -----------------------------------------*/
/*=== End of global constants declaration ==================================*/
/*--- Global functions declaration -----------------------------------------*/
void processBuffer(void);
void checkDIPswitch(void);
/*=== End of global functions declaration ==================================*/
#endif
/*--- AUTOMATICALLY GENERATED VERSION HISTORY --------------------------------
$Log: /MIMO/Receiver/rxmain.h $
*
* 9 05-06-01 0:48 Adrian
* WORKBUFFLEN needs to be 2*BUFFSIZE and also increased the symbolbuffer
* size but is not essential
*
* 8 05-05-27 20:42 Adrian
* changed SYMBOLBUFLEN since this is now implemented as a circular
* buffer, and added eRX_RECSYNC to typRX_eRxState
*
* 7 05-05-26 19:17 Adrian
* increased the file buffer size to 8 MB
*
* 6 05-05-22 19:11 Adrian
* added eRX_TERMINATION to typRX_eRxState (according to rxhostcomm.c) and
* uiStartIndex to typRX_RECEIVESTATE
*
* 5 20.05.05 8:58 Adrian
* extended typRX_RECEIVESTATE with RxMethod, uFileSize, uNoOfBlocks and
* iSyncStarted
*
* 4 05-05-19 12:27 Adrian
* modifyed the two receiver states
*
* 3 05-05-17 19:26 Adrian
* modified typRX_eRxState and typRX_eRcvState
*
* 2 05-05-16 17:06 Adrian
* Moved the states and structures typRX_eRxState, typRX_eRcvState, and
* typRX_RECEIVESTATE from commondef.h to here.
*
* 1 05-05-11 17:00 Adrian
* created and added to VSS
===== END OF AUTOMATICALLY GENERATED VERSION HISTORY =======================*/
/**** End of file ***********************************************************/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -