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

📄 wib_phy_def.h

📁 802.16e物理层下行子载波分配。严格按照802.16e实现。
💻 H
📖 第 1 页 / 共 2 页
字号:
/*****************************************************************
  Copyright (C), 2006, Jushri Tech.
  File name:      main.h
  Author: yimin.song     Version: 1.0     Date: 2007-01-13
  Description:  this file define the global structure and data type,
				
  Others:         NO
  History:       
                   
    1. Date:
       Author:
       Modification:
    2. ...
*****************************************************************/
#ifndef WIB_PHY_DEF
#define WIB_PHY_DEF

#include "..\include\wib_com_def.h"

//#define	

#define DATA_WIDTH	12
#define NOISE_LEN_BEF_FRM 500
#define NOISE_LEN_AFT_FRM 500
#define TSAMPLE	(1/11.2e6)

#define MAX_REPET_CODE				6
#define MAX_ZONE_NUM				4		
#define MAX_BURST_NUM				10	
#define MAX_SUBBURST_NUM			16	
#define MAX_BLOCK_NUM				512	
#define MAX_DLMAP_LEN 				2048
#define	MAX_FCH_LEN					3
#define	MAX_SOURCE_LEN_BLOCK		60
#define	MAX_SOURCE_LEN				(MAX_BLOCK_NUM*MAX_SOURCE_LEN_BLOCK)
#define	MAX_ENCODE_LEN_BLOCK 		(MAX_SOURCE_LEN_BLOCK*3)
#define MAX_MAP_LEN_BLOCK			90
#define MAX_SYM_NUM					50
#define MAX_DATASC_NUM				768
#define MAXSUBCHN_NUM				30
#define MAX_SC_NUM_SUBCHN			48
#define MAX_PILOT_NUM_SYM			120		
#define FFT_SIZE					1024
#define MAX_CP_SIZE					(FFT_SIZE / 4)
#define MAX_CHAN_NUM				6
#define MAX_SNR_NUM					20
#define	UP_SMAPLE_RATIO				1
#define	MAX_CID_NUM					16
#define SC_NUM_SUBCHN_PUSC			24
#define SC_NUM_SUBCHN_FUSC			48
#define SC_NUM_SLOT					48
#define MAX_SC_BLOCK				500
#define MAX_SC_NUM_SYMB				851
#define MAX_BITS_BURST				(MAX_SC_NUM_SYMB * MAX_SYM_NUM * 6)
//#define MAX_BITS_BURST				1000
#define MAX_NUM_OF_SAMP_FRM			(MAX_SYM_NUM * (FFT_SIZE + MAX_CP_SIZE) + NOISE_LEN_BEF_FRM + NOISE_LEN_AFT_FRM)

#define MAX_FRAME_DURATION          9   // add by wkx
#define FEC_CODE_NMB                22  // add by wkx
#define MAX_BLOCK_LEN				1000
#define BLK_RAM_NUM				    16


/* Uplink parameter definition*/
#define UL_MAX_ZONE_NUM             1
#define UL_MAXSUBCHN_NUM			35
#define UL_MID_SC_NUM_SUBCHN		24
#define UL_EDG_SC_NUM_SUBCHN		12
#define UL_SC_NUM_SLOT				48	
#define UL_PILOT_NUM_SLOT			24
#define RANGING_CODE_LEN			144
#define UL_MAX_SC_NUM				840

/*****************************************************************
				global structure definition
*****************************************************************/

/* downlink block parameter definition */

typedef struct{	
UINT16   block_index;					/* blobk index*/
UINT16   block_len_uncoded;				/* uncoded data length of current block*/
UINT16   block_len_coded;				/* encoded data length of current block*/
UINT16   number_of_slot;				/* slot number included in this block */
}DL_BLOCK_STRUCT;


/* downlink subburst parameter definition */
typedef struct{
UINT16      		subburst_type;					/* subburst type
																0: No HARQ
																1: Chase Combining
																2: IR-CTC
																3: IR-CC
																4: MIMO Chase Combining
																5: MIMO IR-CTC
																6: MIMO IR-CC
																7: MIMO-STC
																*/
UINT16      		subburst_index;					/* current subburst index*/
UINT16      		fec_code_type;					/* FEC code type*/
UINT16      		number_of_slot;					/* slots number included of current subburst*/
UINT16      		number_of_block;				/* blocks number included of current subburst*/
UINT16      		issid;							/* MAC-internal SS id – used by MAC to match incoming
															HARQ.ACK with specific SS*/
UINT16      		repetition_coding;				/* Repetition coding indication
																0: No repetition coding
																1: Repetition coding of 2
																2: Repetition coding of 4
																3: Repetition coding of 6*/
UINT16      		subburst_data_len;				/* subburst data length in byte*/
DL_BLOCK_STRUCT     block[MAX_BLOCK_NUM];			/* block of current subburst */
UINT16				cid_subburst;					/* CID of current burst */
}DL_SUBBURST_STRUCT;

/* downlink burst parameter definition */
typedef struct{
UINT16      		burst_type;						/* burst type:
																0: Compressed Map Burst,
																1: SUB-DL-UL-Map Burst,
																2: Normal Data Burst,
																3: Include subburst,
                                                                4: Normal Map Burst
													*/
UINT16      		burst_index;					/* burst index*/
UINT16      		fec_code_type;					/* FEC code type*/
UINT16      		burst_data_len_byte;			/* uncoded data length of current burst*/
UINT16      		ofdma_symbol_offset;			/* current burst symbol offset*/
UINT16      		subchannel_offset;				/* current burst subchannel offset*/
UINT16      		boosting;						/* boosting:
																0: normal
																1: +6dB
																2: -6dB
																3: +9dB
																4: +3dB
																5: -3dB
																6: -9 dB
																7: -12 dB
													*/
UINT16      		repetition_coding;				/* Repetition coding indication
																0: No repetition coding
																1: Repetition coding of 2
																2: Repetition coding of 4
																3: Repetition coding of 6*/
UINT16      		number_of_slot;					/* slots number included of current burst*/
UINT16				number_of_slot_remain;			/* slot number after repetition coding */
UINT16      		number_of_symbol;				/* symbol number of current burst*/
UINT16      		number_of_subchannel;			/* subchannel number of current burst*/
UINT16      		number_of_subburst;				/* subburst number of current burst*/
DL_SUBBURST_STRUCT  subburst[MAX_SUBBURST_NUM];		/* subburst of current burst*/
UINT16      		number_of_block;				/* blocks number of current burst*/	
DL_BLOCK_STRUCT     block[MAX_BLOCK_NUM];			/* block of current burst*/
UINT16				number_of_cid;					/* number of CID included in this burst*/
UINT16				cid_burst[MAX_CID_NUM];			/* CID list of current burst*/	
UINT16              dat_type;                       /* 8 bit */
}DL_BURST_STRUCT;


/* downlink zone parameter definition */
typedef struct{
UINT16      		zone_type;				/*zone type:
														0:Normal Zone Parameters,
														1:STC Zone Parameters
														2:AAS Zone Parameters*/
UINT16      		zone_index;				/*current zone index*/
UINT16      		start_symbol_offset;	/*current zone start symbol offset*/		
UINT16      		end_symbol_offset;		/*current zone end symbol offset*/
UINT16      		permutation_type;		/*current zone permutation type*/
UINT16      		use_all_sc_indicator;	/*indicate if use all subchannels*/
UINT16      		dl_permbase;			/*downlink permbase*/
UINT16      		prbs_id;				/*permbase ID*/
UINT16      		number_of_burst;		/*burst number included of current zone*/
DL_BURST_STRUCT     burst[MAX_BURST_NUM];	/*burst of current zone*/
}DL_ZONE_STRUCT;


/* downlink sub-frame configuration definition */
typedef struct{
	UINT16      		subframe_type;			/* Downlink Subframe:
															0:downlink
															1:uplink */
	UINT32      		frame_number;			/* frame number */
	UINT16				frame_duration_code;	/* frame duration code */
	UINT16				dcd_cnt;				/* DCD Counter */
    UINT16              ucd_cnt;                /* UCD Counter */  // add by wkx
    UINT8               bsid[6];                /* BSID[6] */
	UINT16				operator_id;		    /* Operator_ID[7:0], low 8 bits of high 24 bits */
	UINT16				sector_id;			    /* Sector_ID[7:0],  low 8 bits of bsid*/
	UINT16				symbol_num;				/* OFDMA symbol number of current downlink */
	UINT16      		number_of_zone;			/* zone number included of current subframe */
	UINT16      		cp;						/* cycling prefix length */	
	UINT16      		preamble_index;			/* preamble index */
	UINT16      		id_cell;				/* current cell ID */
	UINT16      		segment_id;				/* current segment ID */
	UINT16 				bit_map[6];				/* used subchannel group of current segment */
    UINT8               bit_mask_bin;           /* 0xXX, ->bit_map */   // add by wkx
	DL_ZONE_STRUCT      zone [MAX_ZONE_NUM];	/* zone of current subframe */	
}DL_SUBFRAME_STRUCT;




/*----------------------- uplink subframe descriptor definition --------------------------------*/

/* uplink block parameter definition */
typedef struct{	
UINT16   block_index;					/* blobk index*/
UINT16   block_len_uncoded;				/* uncoded data length of current block*/
UINT16   block_len_coded;				/* encoded data length of current block*/
UINT16   number_of_slot;				/* slot number included in this block */
}UL_BLOCK_STRUCT;


/* uplink subburst parameter definition */
typedef struct{
UINT16      		subburst_type;					/* subburst type
																0: No HARQ
																1: Chase Combining
																2: IR-CTC
																3: IR-CC
																4: MIMO Chase Combining
																5: MIMO IR-CTC
																6: MIMO IR-CC
																7: MIMO-STC
																*/
UINT16      		subburst_index;					/* current subburst index*/
UINT16      		fec_code_type;					/* FEC code type*/
UINT16      		number_of_slot;					/* slots number included of current subburst*/
UINT16      		number_of_block;				/* blocks number included of current subburst*/
UINT16      		issid;							/* MAC-internal SS id – used by MAC to match incoming
															HARQ.ACK with specific SS*/
UINT16      		repetition_coding;				/* Repetition coding indication
																0: No repetition coding
																1: Repetition coding of 2
																2: Repetition coding of 4
																3: Repetition coding of 6*/
UINT16      		subburst_data_len;				/* subburst data length in byte*/
UL_BLOCK_STRUCT     block[MAX_BLOCK_NUM];			/* block of current subburst */
UINT16				cid_subburst;					/* CID of current burst */
}UL_SUBBURST_STRUCT;

/* uplink burst parameter definition */
typedef struct{
UINT16      		burst_type;						/* burst type:
																0: HARQ ACK Channel,
																1: Fast Feedback Channel
																2: Initial Ranging/Handover Ranging
																3: Periodic Ranging/Bandwidth Request
																4: PAPR/Safety Zone
																5: Sounding Zone
																6: Noise Floor Calculation
																7: Normal Data burst
																8: CDMA allocation burst
													*/
UINT16      		burst_index;					/* burst index*/
UINT16              ranging_method;                 /* Ranging method:  0|1, 0->2 symb, 1->4 symb  */	//add by wkx
UINT16      		fec_code_type;					/* FEC code type*/
UINT16      		burst_data_len_byte;			/* uncoded data length of current burst*/
UINT16      		ofdma_symbol_offset;			/* current burst symbol offset*/
UINT16      		subchannel_offset;				/* current burst subchannel offset*/
UINT16      		slot_offset;				    /* current burst slot offset*/
UINT16      		boosting;						/* boosting:
																0: normal
																1: +6dB
																2: -6dB
																3: +9dB
																4: +3dB
																5: -3dB
																6: -9 dB
																7: -12 dB
													*/
UINT16      		repetition_coding;				/* Repetition coding indication
																0: No repetition coding
																1: Repetition coding of 2
																2: Repetition coding of 4
																3: Repetition coding of 6*/
UINT16      		number_of_slot;					/* slots number included of current burst*/
UINT16				number_of_slot_remain;			/* slot number after repetition coding */
UINT16      		number_of_symbol;				/* symbol number of current burst*/
UINT16      		number_of_subchannel;			/* subchannel number of current burst*/
UINT16      		number_of_subburst;				/* subburst number of current burst*/
UL_SUBBURST_STRUCT  subburst[MAX_SUBBURST_NUM];		/* subburst of current burst*/
UINT16      		number_of_block;				/* blocks number of current burst*/	
UL_BLOCK_STRUCT     block[MAX_BLOCK_NUM];			/* block of current burst*/
UINT16				cid_burst;			            /* CID list of current burst*/
UINT16              fast_fb_type;                   /* Type: 6|4|3 (bits) */ //add by wkx
UINT16              dat_type;                       /* 8 bit */ // add by wkx
}UL_BURST_STRUCT;


/* uplink zone parameter definition */
typedef struct{
UINT16      		zone_type;				/*zone type:
														0:Normal Zone Parameters,
														1:STC Zone Parameters
														2:AAS Zone Parameters*/
UINT16      		zone_index;				/*current zone index*/
UINT16      		start_symbol_offset;	/*current zone start symbol offset*/		
UINT16      		end_symbol_offset;		/*current zone end symbol offset*/
UINT16      		permutation_type;		/*current zone permutation type*/
UINT16      		use_all_sc_indicator;	/*indicate if use all subchannels*/
UINT16      		ul_permbase;			/*downlink permbase*/
UINT16      		number_of_burst;		/*burst number included of current zone*/
UL_BURST_STRUCT     burst[MAX_BURST_NUM];	/*burst of current zone*/
}UL_ZONE_STRUCT;


/* uplink sub-frame configuration definition */
typedef struct{
	UINT16      		subframe_type;			/* Uplink Subframe:
															0:downlink
															1:uplink */
	UINT16      		frame_duration_code;	/* frame duration code */
	UINT32      		frame_number;			/* frame number */
	UINT16				symbol_num;				/* OFDMA symbol number of current downlink */
	UINT16      		ucd_cnt;			    /* UCD Count */
	UINT16      		number_of_zone;			/* zone number included of current subframe */
	UINT32      		alloc_stime;			/* Allocation Start time */
	UINT16      		cp;						/* cycling prefix length */	
	UINT16 				bit_map[72];	    	/* used subchannel group of current segment */
	UL_ZONE_STRUCT      zone [MAX_ZONE_NUM];	/* zone of current subframe */

⌨️ 快捷键说明

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