📄 globalmacro.h
字号:
#ifndef _GLOBAL_MACRO_H
#define _GLOBAL_MACRO_H
//for test only
#define NUM_OF_SYMBOL 2002
#define ENERGY_TO_NOISE 19
#define BIT_SYMBOL_RATIO 6
#define MAX_DL_BURST_NUM_0 12
#define RATE_ID_NUM 8 // the number of RateID values
#define DIUC_NUM_1 12
#define DISABLED 0
#define FCH_BURSTFLAG 0// burst indication that the burst is FCH
#define BURSTONE_BURSTFLAG 1// the burst is non-FCH but not in STC.
#define STCFCH_BURSTFLAG 2//indication that the burst is STC-FCH.
#define STC_BURSTFLAG 3//the burst is in STC region but is not STC-FCH
#define NO_PREAMBLE 0//preamble indication;
#define SHORT_PREAMBLE 1
#define LONG_PREAMBLE 2
#define STC_PREAMBLE 3
//#define MAX_DL_BURST_NUM_0 20
#define TX_QAM_BITWIDTH 16
#define TX_QAM_AVE 1024*2
#define TX_DAC_BITWIDTH 14
#define TX_DAC_SCALING_FAC 4096
#define FFT_SIZE 256
#define DL_TX_INBUFF_SIZE_0 108+16 //info bytes per OFDM symbol including tail bytes.
#define DL_TX_RSENC_OUTBUFF_SIZE_0 120
#define DL_TX_CCENC_OUTBUFF_SIZE_0 144*8 //CC encoding output bits per symbol.
#define DL_TX_DATAMOD_OUTBUFF_SIZE_0 2*FFT_SIZE
#define PREAMBLE_FREQ_FULL_SIZE 201
#define NOFEC_DONE 1 //=no FEC encoding done,
#define RSENCODE_DONE 2 //=RS encoding is done,
#define CONVENCODE_DONE 3 //=convolutional encoding is done
#define INTERLEAVE_DONE 4 //=interleaving is done
#define DATAMOD_DONE 5 //=data modulation is done
#define PILOTS_NUM 8
#define PREAMBLE_64 0 //PREAMBLE_64 = for preamble with 64 periodic samples
#define PREAMBLE_128 1 // PREAMBLE_128= 128 samples preambles
#define PREAMBLE_STC 8 // PREAMBLE_STC= STC 128 samples preambles
#define CP_1_4 0 //CP to Data ratio, 1/4/8/16/32.
#define CP_1_8 1
#define CP_1_16 2
#define CP_1_32 3 //CP to Data ratio code
#define DL_STC_STARTTIME_BURST_0 6// STC start time in symbols, for testing.
#define DL_STC_STARTTIME_SYM_0 13
#define ENABLED 1
#define DISABLED 0
//txmodulation
//tx mod
#define FFT_SIZE_64 64
#define FFT_SIZE_128 128
#define FFT_SIZE_256 256
#define FFT_SIZE_512 512
#define FFT_SIZE_1024 1024
#define INTERP_RATE_2 2;
#define INTERP_RATE_4 4;
//#define FFT_SIZE 256
#define INTERP_RATE 2
#define FFT_WEIGHT_BITWIDTH_16 16
#define FFT_WEIGHT_BITWIDTH_8 8
#define FFT_WEIGHTS_BITWIDTH 16
//#define IFFT_WEIGHTS_BITWIDTH 16;
#define DL_TX_DATAMOD_OUTBUFF_SIZE_0 2*FFT_SIZE
#define DL_TX_IFFT_OUTBUFF_SIZE 2*FFT_SIZE
#define DL_TX_INTERP_OUTBUFF_SIZE 5*DL_TX_IFFT_OUTBUFF_SIZE*INTERP_RATE/4
#define INTERP_LENGTH 4
#define CP_DATA_RATIO_0 FFT_SIZE/4
#define CP_DATA_RATIO_1 FFT_SIZE/8
#define CP_DATA_RATIO_2 FFT_SIZE/16
#define CP_DATA_RATIO_3 FFT_SIZE/32
#define MAX_DL_BURST_NUM_0 12
//rx demod
#define DL_RX_FILTER_LENGTH_0 32
#define DL_RX_BUFF_SIZE 2*(FFT_SIZE*5/4+64)
#define DL_RX_AUTOCOR_OUTBUFF_SIZE DL_RX_BUFF_SIZE-64*2
#define DL_RX_FREQDEROT_OUTBUFF_SIZE 2*FFT_SIZE
#define DL_RX_FFT_OUTBUFF_SIZE 2*FFT_SIZE
//Rx Preamble
#define INTERP_LENGTH 4
#define LONGPREAMBLE_64 1 // = for long preamble with 64-sample symbol;
#define LONGPREAMBLE_128 2 // = for long preamble with 128-sample symbol.
//The channel estimate needs to be averaged with previous 64-sample symbol channel estimates
#define SHORTPREAMBLE_128 4 // =for short burst preambles.
//#define PREAMBLE_STC 8 // for preamble in STC zone.
#define DL_DESIRED_RXPOWER_DB0 19//desired Rx power in dB.
#define DL_AGC_SMOOTHFAC_0 100 //the smoothing factor in updating AGC gain.
#define CHEST_SCALE 12
//#define CHTRACK_SCALE 12
#define DL_RX_CHCOMP_OUTBUFF_SIZE 2*201
#define DL_RX_CHStcDecod_OUTBUFF_SIZE 2*201
#define PI 3.14159265
#define PILOTS_NUM 8
// rxburst channel decoding
//#define DL_RX_CHCOMP_OUTBUFF_SIZE 2*201
#define DL_RX_DATADEMOD_OUTBUFF_SIZE 144*8
#define DL_RX_DEINTERL_OUTBUFF_SIZE DL_RX_DATADEMOD_OUTBUFF_SIZE
#define DL_RX_CCDECODE_OUTBUFF_SIZE 120
#define DL_RX_RSDECODE_OUTBUFF_SIZE 108
#define DL_RX_DERAND_OUTBUFF_SIZE 108
//ccdecoding
#define MAX_CONV_LENGTH 4110 //the max length to the viterbi decoder
#define MAX_CONV_STATES 64
//新增
#define MAX_RSPARITY_LENGTH 16
#define MAX_RSDECODING_BUFF_LENGTH 255
#define PMETRIC_SCALE_THRESH 512 //viterb decode scale thresh
#define CC_CODE_RATE 2
#define CC_CODE_CONSTRAIT 6
//rs decoding
#define RSDEC_OK_NO_ERRORS 0;//no RS decoding errors.
#define RSDEC_OK_ERROR_1 1 //1 error, corrected
#define RSDEC_OK_ERROR_2 2
#define RSDEC_OK_ERROR_3 3
#define RSDEC_OK_ERROR_4 4
#define RSDEC_OK_ERROR_5 5
#define RSDEC_OK_ERROR_6 6
#define RSDEC_OK_ERROR_7 7
#define RSDEC_OK_ERROR_8 8 //8 errors, corrected
#define RSDEC_ERRORS 15 //RS decode errors beyond correction.
#define MAX_DL_BURST_NUM_0 12
#define SOFT_DEC_BITS_0 7 //the bitwidth for soft decision demodulaiton output.
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -