⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 global_var.cpp.bak

📁 在vc上做的802.16d ofdm phy的仿真
💻 BAK
📖 第 1 页 / 共 4 页
字号:
			4,		//number of coded bits per subcarrier.
			72,		//number of coded bits per (single) sub-channel per OFDM symbol, 
								//=12*ncpc, Ncbps=ncbpss*number of allocated subChannels.
								//For DL, Ncbps=16*ncbpss, always.
			4,	//=nbpss/ncpc, the number of QAM symbols per symbol per (single) subchannel
		},
		{
			108,//before FEC in bytes including "0x00"tail byte, 
										//without subchannelization
			144,	//after FEC in bytes without subchannelization
			8,		//RS parity bytes without subchannelization
			144,	//after CC in bytes without subchannelization
			0,		//after BTC in bytes without subchannelization
			0,		//after CTC in bytes without subchannelization
			FIVE_SIXTHS,
			0,
			0,
		    QAM64,
			54,		//max number of uncoded bits (before rand.) per subchannel per symbol.
			72,		//number of CC coded bits per (single) subchannel per symbol.
			4,		//number of coded bits per subcarrier.
			72,		//number of coded bits per (single) sub-channel per OFDM symbol, 
					//=12*ncpc, Ncbps=ncbpss*number of allocated subChannels.
					//For DL, Ncbps=16*ncbpss, always.
			4,	//=nbpss/ncpc, the number of QAM symbols per symbol per (single) subchannel
		},
	};

	OfdmSymbolParam g_ssDlFirstBurstOfdmSymbolParam[RATE_ID_NUM] =
	{
		{
			12,//before FEC in bytes including "0x00"tail byte, 
										//without subchannelization
			24,	//after FEC in bytes without subchannelization
			0,		//RS parity bytes without subchannelization
			24,	//after CC in bytes without subchannelization
			0,		//after BTC in bytes without subchannelization
			0,		//after CTC in bytes without subchannelization
			ONE_HALF,
			0,
			0,
		    BPSK,
			6,		//max number of uncoded bits (before rand.) per subchannel per symbol.
			12,		//number of CC coded bits per (single) subchannel per symbol.
			1,		//number of coded bits per subcarrier.
			12,		//number of coded bits per (single) sub-channel per OFDM symbol, 
								//=12*ncpc, Ncbps=ncbpss*number of allocated subChannels.
								//For DL, Ncbps=16*ncbpss, always.
			1,	//=nbpss/ncpc, the number of QAM symbols per symbol per (single) subchannel
		},
		{
			24,//before FEC in bytes including "0x00"tail byte, 
										//without subchannelization
			48,	//after FEC in bytes without subchannelization
			8,		//RS parity bytes without subchannelization
			48,	//after CC in bytes without subchannelization
			0,		//after BTC in bytes without subchannelization
			0,		//after CTC in bytes without subchannelization
			TWO_THIRDS,
			0,
			0,
		    QPSK,
			12,		//max number of uncoded bits (before rand.) per subchannel per symbol.
			24,		//number of CC coded bits per (single) subchannel per symbol.
			2,		//number of coded bits per subcarrier.
			24,		//number of coded bits per (single) sub-channel per OFDM symbol, 
								//=12*ncpc, Ncbps=ncbpss*number of allocated subChannels.
								//For DL, Ncbps=16*ncbpss, always.
			2,	//=nbpss/ncpc, the number of QAM symbols per symbol per (single) subchannel
		},
		{
			36,//before FEC in bytes including "0x00"tail byte, 
										//without subchannelization
			48,	//after FEC in bytes without subchannelization
			4,		//RS parity bytes without subchannelization
			48,	//after CC in bytes without subchannelization
			0,		//after BTC in bytes without subchannelization
			0,		//after CTC in bytes without subchannelization
			FIVE_SIXTHS,
			0,
			0,
		    QPSK,
			18,		//max number of uncoded bits (before rand.) per subchannel per symbol.
			24,		//number of CC coded bits per (single) subchannel per symbol.
			2,		//number of coded bits per subcarrier.
			24,		//number of coded bits per (single) sub-channel per OFDM symbol, 
								//=12*ncpc, Ncbps=ncbpss*number of allocated subChannels.
								//For DL, Ncbps=16*ncbpss, always.
			2,	//=nbpss/ncpc, the number of QAM symbols per symbol per (single) subchannel
		},
		{
			48,//before FEC in bytes including "0x00"tail byte, 
										//without subchannelization
			96,	//after FEC in bytes without subchannelization
			16,		//RS parity bytes without subchannelization
			96,	//after CC in bytes without subchannelization
			0,		//after BTC in bytes without subchannelization
			0,		//after CTC in bytes without subchannelization
			TWO_THIRDS,
			0,
			0,
		    QAM16,
			24,		//max number of uncoded bits (before rand.) per subchannel per symbol.
			48,		//number of CC coded bits per (single) subchannel per symbol.
			3,		//number of coded bits per subcarrier.
			48,		//number of coded bits per (single) sub-channel per OFDM symbol, 
								//=12*ncpc, Ncbps=ncbpss*number of allocated subChannels.
								//For DL, Ncbps=16*ncbpss, always.
			3,	//=nbpss/ncpc, the number of QAM symbols per symbol per (single) subchannel
		},
		{
			72,//before FEC in bytes including "0x00"tail byte, 
										//without subchannelization
			96,	//after FEC in bytes without subchannelization
			8,		//RS parity bytes without subchannelization
			96,	//after CC in bytes without subchannelization
			0,		//after BTC in bytes without subchannelization
			0,		//after CTC in bytes without subchannelization
			FIVE_SIXTHS,
			0,
			0,
		    QAM16,
			36,		//max number of uncoded bits (before rand.) per subchannel per symbol.
			48,		//number of CC coded bits per (single) subchannel per symbol.
			3,		//number of coded bits per subcarrier.
			48,		//number of coded bits per (single) sub-channel per OFDM symbol, 
								//=12*ncpc, Ncbps=ncbpss*number of allocated subChannels.
								//For DL, Ncbps=16*ncbpss, always.
			3,	//=nbpss/ncpc, the number of QAM symbols per symbol per (single) subchannel
		},
		{
			96,//before FEC in bytes including "0x00"tail byte, 
										//without subchannelization
			144,	//after FEC in bytes without subchannelization
			12,		//RS parity bytes without subchannelization
			144,	//after CC in bytes without subchannelization
			0,		//after BTC in bytes without subchannelization
			0,		//after CTC in bytes without subchannelization
			THREE_FOURTHS,
			0,
			0,
		    QAM64,
			48,		//max number of uncoded bits (before rand.) per subchannel per symbol.
			72,		//number of CC coded bits per (single) subchannel per symbol.
			4,		//number of coded bits per subcarrier.
			72,		//number of coded bits per (single) sub-channel per OFDM symbol, 
								//=12*ncpc, Ncbps=ncbpss*number of allocated subChannels.
								//For DL, Ncbps=16*ncbpss, always.
			4,	//=nbpss/ncpc, the number of QAM symbols per symbol per (single) subchannel
		},
		{
			108,//before FEC in bytes including "0x00"tail byte, 
										//without subchannelization
			144,	//after FEC in bytes without subchannelization
			8,		//RS parity bytes without subchannelization
			144,	//after CC in bytes without subchannelization
			0,		//after BTC in bytes without subchannelization
			0,		//after CTC in bytes without subchannelization
			FIVE_SIXTHS,
			0,
			0,
		    QAM64,
			54,		//max number of uncoded bits (before rand.) per subchannel per symbol.
			72,		//number of CC coded bits per (single) subchannel per symbol.
			4,		//number of coded bits per subcarrier.
			72,		//number of coded bits per (single) sub-channel per OFDM symbol, 
					//=12*ncpc, Ncbps=ncbpss*number of allocated subChannels.
					//For DL, Ncbps=16*ncbpss, always.
			4,	//=nbpss/ncpc, the number of QAM symbols per symbol per (single) subchannel
		},
	};
	OfdmSymbolParam g_bsDlFchOfdmSymbolParam =    //set by initialization.
	{
		96,//before FEC in bytes including "0x00"tail byte, 
										//without subchannelization
		144,	//after FEC in bytes without subchannelization
		12,		//RS parity bytes without subchannelization
		144,	//after CC in bytes without subchannelization
		0,		//after BTC in bytes without subchannelization
		0,		//after CTC in bytes without subchannelization
		THREE_FOURTHS,
		0,
		0,
	    QAM64,
		48,		//max number of uncoded bits (before rand.) per subchannel per symbol.
		72,		//number of CC coded bits per (single) subchannel per symbol.
		4,		//number of coded bits per subcarrier.
		72,		//number of coded bits per (single) sub-channel per OFDM symbol, 
								//=12*ncpc, Ncbps=ncbpss*number of allocated subChannels.
								//For DL, Ncbps=16*ncbpss, always.
		4,	//=nbpss/ncpc, the number of QAM symbols per symbol per (single) subchannel
	}; 
	OfdmSymbolParam g_ssDlFchOfdmSymbolParam =    //set by initialization.
	{
		96,//before FEC in bytes including "0x00"tail byte, 
										//without subchannelization
		144,	//after FEC in bytes without subchannelization
		12,		//RS parity bytes without subchannelization
		144,	//after CC in bytes without subchannelization
		0,		//after BTC in bytes without subchannelization
		0,		//after CTC in bytes without subchannelization
		THREE_FOURTHS,
		0,
		0,
	    QAM64,
		48,		//max number of uncoded bits (before rand.) per subchannel per symbol.
		72,		//number of CC coded bits per (single) subchannel per symbol.
		4,		//number of coded bits per subcarrier.
		72,		//number of coded bits per (single) sub-channel per OFDM symbol, 
								//=12*ncpc, Ncbps=ncbpss*number of allocated subChannels.
								//For DL, Ncbps=16*ncbpss, always.
		4,	//=nbpss/ncpc, the number of QAM symbols per symbol per (single) subchannel
	}; 


//tx modulation
//Int16 g_dlTxModulationOutBuff[2*DL_TX_DATAMOD_OUTBUFF_SIZE_0]; //input buffer.

Int16 g_dlTxIfftOutBuff0[DL_TX_IFFT_OUTBUFF_SIZE];	//output buffer.

Int16 g_dlTxIfftOutBuff1[DL_TX_IFFT_OUTBUFF_SIZE];

Int16 g_dlTxInterpOutBuff0[DL_TX_INTERP_OUTBUFF_SIZE];

Int16 g_dlTxInterpOutBuff1[DL_TX_INTERP_OUTBUFF_SIZE];

Uint16 g_fftSize={FFT_SIZE};

Uint8 fftWeightBitwidth = {FFT_WEIGHT_BITWIDTH_16};

Int16 g_interpolCoeff[INTERP_LENGTH] = {-1, 9, 9, -1};

Uint8 g_cpDataRatio = {CP_DATA_RATIO_0};

Int16 g_interplweight = 16;

//rxdemod
Int16 g_dlRxBuff[DL_RX_BUFF_SIZE];//2*(FFT_SIZE*5/4+64)

Int16 g_dlAutoCorOutBuff[DL_RX_AUTOCOR_OUTBUFF_SIZE];

Int16 g_dlFreqDerotBuff[DL_RX_FREQDEROT_OUTBUFF_SIZE];

Int16 g_dlRxFftOutBuff[2*DL_RX_FFT_OUTBUFF_SIZE];//4*FFT_SIZE
								

//RxPreamble

//chEst


ChannelEstResult g_dlPreambleChEstRes64;

ChannelEstResult g_dlPreambleChEstRes128;

ChannelEstResult g_dlPreambleChEstResStc[2];

//new
ChannelEstResult *pdlPreambleChEstRes;

ChannelEstResult *pPrevPreambleChEstRes =&g_dlPreambleChEstRes64;

//new
Uint8 g_dlRxStcFlag;

//new
Uint8 g_chEstMode;


//RxPower
Uint8 g_dlRxPwrCalMode;

RxPowerParam  g_dlRxSignalNoise;

ChannelEstResult g_dlRxPreambleChEstRes[2];

//Rssi and Cinr measure

RssiParam g_dlRssiMeasure;

RxPowerParam g_dlRxPowerNoise;

CinrParam g_dlCinrMeasure;

AgcCalParam dlAgcCalParam =
{
DL_DESIRED_RXPOWER_DB0,
DL_AGC_SMOOTHFAC_0,
};
Int16 dlAgcGain;		// current DL AGC gain in 0.25 dB.
Int16 dlDesiredAgcGain;	//desired DL AGC gain in 0.25 dB.

//RxFrame OFDM SYMBOL Index
Int16 g_dlRxFrameSymIndex = 0;
Uint16 g_dlRxBurstIndex;

//channel tracking
PhaseParam g_dlRxTrackPhaseShift;//DL Channel tracking phase shift parameters.
PilotParam g_dlRxPilotParam =
{
	0,
	0x7ff,
	0
};	//DL pilot parameters

Int16 g_dlRxChCompOutBuff[2*DL_RX_CHCOMP_OUTBUFF_SIZE]; //4*201

Int16 g_dlRxStcDecodeOutBuff[2*DL_RX_CHCOMP_OUTBUFF_SIZE];//4*201

Int8 g_dlRxStcPilots[2][PILOTS_NUM];//for STC pilot

//channel decoding

Uint16 g_dlRxRandVector;

Int8 g_dlRxDataDemodOutBuff[DL_RX_DATADEMOD_OUTBUFF_SIZE];

Int8 g_dlRxDeinterleaveOutBuff[DL_RX_DEINTERL_OUTBUFF_SIZE];

Uint8 g_dlRxCcDecodeOutBuff[DL_RX_CCDECODE_OUTBUFF_SIZE];

Uint8 g_dlRxRsDecodeOutBuff[DL_RX_RSDECODE_OUTBUFF_SIZE];

Uint8 g_dlRxDeRandOutBuff[DL_RX_DERAND_OUTBUFF_SIZE];

Uint8 g_dlRxSoftDecBits = {SOFT_DEC_BITS_0};

Uint16 g_ccDecodStateRegister = 0; //ccdecode putout register;

//txmodulationout
	Int16 TxModulationOut[66560];
	
//PropagationChOut
Int16 propagationChOut[66560];









⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -