📄 wib_dl_lowmac.h
字号:
#include "..\in\wib_phy_def.h"
#include "..\in\wib_com_def.h"
/* FCH format */
#pragma pack(1)
typedef struct{
UINT32 byte_align : 8; // align to 32 bits
UINT32 reserved2 : 4; // Reserved
UINT32 map_len : 8; // MAP length
UINT32 coding_indic : 3; // Coding Indication
UINT32 repet_cod : 2; // Repetition Coding Indication
UINT32 reserved1 : 1; // Reserved
UINT32 bit_map : 6; // DIUC = 14
}FCH_IE;
#pragma pack()
/*************************** Compressed DL_MAP message header********************************/
/* Compressed DL_MAP header (totally 11 bytes)*/
#pragma pack(1)
typedef struct{
UINT32 map_len : 11; // MAP length including compressed UL_MAP message and 32-bit CRC value
UINT32 rsv : 1; // Shall be set to zero
UINT32 ulmap_app : 1; // A value of 1 indicates a compressed UL_MAP is appended to the curent
UINT32 comp_map_indic : 3; // Shall be set to binary 110 to indicate a compressed map format
UINT32 frmdur_code : 8; // Frame duration code
UINT32 frm_num : 24; // Frame Number
UINT32 dcd_cnt : 8; // DCD Count
UINT32 operator_id : 8; // This field holds the least significant 8 bits of the most significant 24 bits
// of the 48-bit Base Station ID
UINT32 sector_id : 8; // This field holds the least significant 8 bits of the 48-bit Base Station ID
UINT32 symb_num : 8; // Number of OFDMA symbols in the DL subframe including all AAS/permutation zone
UINT32 dl_ie_cnt : 8; // This field holds the number of IE entries in the following list of DL_MAP IEs
}COMP_DLMAP_IE_HEADER;
#pragma pack()
/* Sub_MAP Pointer IE format definition (totally 3.5 bytes)*/
#pragma pack(1)
typedef struct{
UINT16 ext_diuc : 4; // Extended DIUC = 0x07
UINT16 diuc : 4; // DIUC = 15 for Extended DIUC
UINT16 amc_diuc : 4; // Indicates the AMC level of the burst containing an HARQ MAP message
UINT16 len : 4; // Length
UINT16 num_slot : 8; // The number of slots allocated for the burst containing an HARQ MAP message
UINT16 byte_align : 4; // align to byte boundary
UINT16 map_version : 2; // 0b00 - HARQ MAP
// 0b01 - Sub-MAP
// 0b10 - Sub-MAP with CID Mask included
// 0b11 - Reserved
UINT16 repet_cod : 2; // Indicates the repetition code for the burst containing an HARQ MAP message
}SUBMAP_POINTER_IE;
#pragma pack()
/************************* Compressed UL_MAP message header***********************************/
/* Compressed UL_MAP header (totally 6 bytes)*/
#pragma pack(1)
typedef struct{
UINT8 ucd_cnt : 8; // UCD Count(8 bits)
UINT32 alloc_stime : 32; // Effective start time of the uplink allocation defined by the UL_MAP(32 bits)
UINT8 symb_num : 8; // Number of OFDMA symbols in the UL subframe(8 bits)
}COMP_ULMAP_IE_HEADER;
#pragma pack()
/***************************** SUB-DL-UL-MAP message header**********************************/
/* SUB-DL-UL-MAP header (totally 5 bytes)*/
#pragma pack(1)
typedef struct{
UINT16 harq_ack_indic : 1; // HARQ ACK offset indicator
UINT16 rcid_type : 2; // RCID Type: 0b00 = Normal CID; 0b01 = RCID11; 0b10 = RCID7; 0b11 = RCID3
UINT16 map_len : 10; // Map message length
UINT16 comp_map_indic : 3; // Shall be set to binary 111 to indicate a sub-dl-ul-map format
UINT16 dl_ie_cnt : 8; // DL_MAP IE included in sub-dl-ul-map message
UINT16 symb_ofset : 8; // This value indicates start symbol offset of subsequent sub-bursts in this UL Allocation start IE
UINT16 rsv : 1; // Shall be set to 0
UINT16 subchn_ofset : 7; // This value indicates start subchannel offset of subsequent sub-bursts in this UL Allocation start IE
}SUB_MAP_HEADER;
#pragma pack()
/*********************** DL_MAP IE included in SUB_DL_UL_MAP message *************************/
/* STC_DL_ZONE_IE format definition (totally 5.5 bytes)*/
#pragma pack(1)
typedef struct{
UINT16 ext_diuc : 4; // Extended DIUC = 0x1
UINT16 diuc : 4; // DIUC = 15 for Extended DIUC
UINT16 dedic_pilot : 1; // Dedicated Pilots
UINT16 anten_sel : 1; // 2/3 antennas select
UINT16 midamb_boost : 1; // Midamble boosting
UINT16 midamble : 1; // Midamble presence
UINT16 amc_type : 2; // AMC type Indicates the AMC type in case permutation type =0b11, otherwise shall be set to 0.
UINT16 prbs_id : 2; // PRBS_ID
UINT16 permbase : 5; // DL_PermBase
UINT16 matrix : 2; // Matrix indicator
UINT16 stc : 2; // 0b00 = No STC; 0b01 = STC using 2/3antennas; 0b10 = STC using 4 antennas; 0b11 = FHDC using 2 antennas
UINT16 use_all_sc : 1; // Use All SC indicator;0 = Do not use all subchannels; 1 = Use all subchannels
UINT16 perm_type : 2; // Permutation; 0b00 = PUSC permutation; 0b01 = FUSC permutation
UINT16 sym_ofset : 8; // OFDMA symbol offset ;
// Denotes the start of the zone (counting from the frame preamble and starting from 0)
UINT16 len : 4; // Length = 0x04;
UINT16 byte_align : 4; // align to byte boundary
UINT16 reserved : 4; // Reserved;not align to byte boundary
}DLMAP_ZONE_SWITCH_IE;
#pragma pack()
/* CID switch IE format definition (totally 1.5 bytes)*/
#pragma pack(1)
typedef struct{
UINT8 diuc : 4; // DIUC = 15 for Extended DIUC
UINT8 ext_diuc : 4; // Extended DIUC = 0x4
UINT8 byte_align : 4; // not align to byte boundary
UINT8 len : 4; // length;should be 0;not align to byte boundary
}DLMAP_CID_SWITCH_IE;
#pragma pack()
/* DL_MAP Burst profile format definition (totally 4 bytes)*/
#pragma pack(1)
typedef struct{
UINT8 symbol_ofst : 8; // OFDMA Symbol offset
UINT16 symbol_num : 7; // The number of OFDMA symbols are used to carry the current burst
UINT16 boosting : 3; // Boosting for current IE
UINT16 subchn_ofst : 6; // Subchannel offset for current IE
UINT8 repet_cod : 2; // Indicate the repetition coding used inside current burst
UINT8 subchn_num : 6; // The number of subchannels are used to carry the current burst
}DLMAP_BURST_IE;
#pragma pack()
/* HARQ DL MAP IE Header(totally 9.5 bytes) */
#pragma pack(1)
typedef struct{
UINT16 ext_diuc : 4; // Extended DIUC = 0x4
UINT16 diuc : 4; // DIUC = 14 for Extended-2 DIUC
UINT16 harq_ie_len : 8; // HARQ DL MAP IE Length[7:0]
UINT16 regn_id_idc : 1; // Region_id use indicator
UINT16 boosting : 3; // Boosting
UINT16 reserved1 : 2;
UINT16 rcid_type : 2; // RCID_Type
UINT16 reserved2 : 3;
UINT16 subchn_num : 7; // Number of subchannels
UINT16 symbol_num : 7; // Number of OFDMA symbols
UINT16 subchn_ofst : 7; // Subchannel offset
UINT16 symbol_ofst : 8; // OFDMA Symbol offset
UINT16 num_subburst : 4; // Number of sub-bursts in the 2D region
UINT16 subburst_ie_len : 8; // Length, in nibbles, to indicate the size of the subburst IE in this HARQ mode.
UINT16 mode : 4; // Indicates the mode of this HARQ region;
// 0b0000 = No HARQ
// 0b0001 = Chase HARQ
// 0b0010 = IR-CTC
// 0b0011 = IR-CC
UINT16 byte_align : 4; // Reserved;not align to byte boundary
UINT16 num_ack_chnl : 4; // Number of HARQ ACK enabled sub-bursts in the 2D region.
// not align to byte
}DLMAP_HARQ_HEADER;
#pragma pack()
/* HARQ Sub burst IE format(totally 5.5 bytes) */
#pragma pack(1)
typedef struct{
UINT16 rcid : 16; // RCID_IE()
UINT16 diuc : 4; // DIUC
UINT16 reserved1 : 1;
UINT16 diuc_indic : 1; // Sub-Burst DIUC Indicator
UINT16 duration : 10; // Duration
UINT16 acid : 4; // ACID
UINT16 reserved2 : 2;
UINT16 repet_cod : 2; // Indicate the repetition coding used inside current burst
UINT16 byte_align : 4; // Reserved;not align to byte boundary
UINT16 dl_ctrl_indc : 2; // Dedicated DL Control Indicator = 0;
UINT16 ack_disable : 1; // ACK disable flag;
UINT16 ai_sn : 1; // AI_SN
// not align to byte
}DLMAP_SUBBURST_IE;
#pragma pack()
/* HARQ ACK IE format(totally 3 bytes) */
#pragma pack(1)
typedef struct{
UINT8 diuc : 4; // DIUC = 14
UINT8 ext_diuc : 4; // Extended-2 DIUC = 0x08
UINT8 length : 8; // Length
UINT8 bit_map : 8; // Bitmap.Bitmap size is determined by Length field
}DLMAP_HARQ_ACK_IE;
#pragma pack()
/*********************** UL_MAP IE included in SUB_DL_UL_MAP message *************************/
/* FAST_FEEDBACK_IE format definition (totally 6.5 bytes)*/
#pragma pack(1)
typedef struct{
UINT16 cid : 16; // CID
UINT16 uiuc : 4; // UIUC = 0 for FAST-FEEDBACK Allocation IE
UINT16 byte_align : 4; // align to byte boundary
UINT16 reserved : 3;
UINT16 subchn_num : 7; // Number of subchannels
UINT16 symbol_num : 7; // Number of OFDMA symbols
UINT16 subchn_ofst : 7; // Subchannel offset
UINT16 symbol_ofst : 8; // OFDMA Symbol offset
}ULMAP_FAST_FEEDBACK_IE;
#pragma pack()
/* CDMA_RANGING_IE format definition (totally 6.5 bytes)*/
#pragma pack(1)
typedef struct{
UINT16 cid : 16; // CID
UINT32 uiuc : 4; // UIUC = 12 for CDMA Bandwidth Request, CDMA Ranging IE
UINT32 byte_align : 4; // align to byte boundary
UINT32 dedic_ranging : 1; // 0: the OFDMA region and Ranging Method defined are used for
// the purpose of normal ranging; 1: the OFDMA region and Ranging Method
// defined are used for the purpose of ranging using dedicated CDMA code
// and transmission opportunities assigned in the MOB_PAG-ADV message or
// in the MOB_SCN-RSP message.
UINT32 ran_method : 2; // 0b00 - initial Ranging/Handover Ranging over two symbols
// 0b01 - initial Ranging/Handover Ranging over four symbols
// 0b10 - BW Request/Periodic Ranging over one symbol
// 0b11 - BW Request/Periodic Ranging over three symbols
UINT32 subchn_num : 7; // Number of subchannels
UINT32 symbol_num : 7; // Number of OFDMA symbols
UINT32 subchn_ofst : 7; // Subchannel offset
UINT32 symbol_ofst : 8; // OFDMA Symbol offset
}ULMAP_CDMA_RANGING_IE;
#pragma pack()
/* CDMA_ALLOC_IE format definition (totally 7.5 bytes)*/
#pragma pack(1)
typedef struct{
UINT16 cid : 16; // CID
UINT16 uiuc : 4; // UIUC = 14 for CDMA allocation IE
UINT16 byte_align : 4; // align to byte boundary
UINT16 frm_num_index : 4; // LSBs of relevant frame number
UINT16 repet_cod : 2; // Indicate the repetition coding used in CDMA allocation burst
UINT16 trans_uiuc : 4; // UIUC for transmission
UINT16 duration : 6; // Duration
UINT16 range_code : 8; // Ranging code
UINT16 range_sym : 8; // Ranging symbol
UINT16 bw_request : 1; // BW request mandatory: 1 = yes, 0 = no
UINT16 range_subch : 7; // Ranging subchannel
}ULMAP_CDMA_ALLOC_IE;
#pragma pack()
/* HARQ_ACKCH_IE format definition (totally 7 bytes)*/
#pragma pack(1)
typedef struct{
UINT16 cid : 16; // CID
UINT16 ext_uiuc : 4; // Extended-2 UIUC = 0x08
UINT16 uiuc : 4; // UIUC = 11 for Extended-2 UIUC
UINT16 len : 8; // Length in bytes
UINT16 subchn_num : 4; // Number of subchannels
UINT16 symbol_num : 5; // Number of OFDMA symbols
UINT16 subchn_ofst : 7; // Subchannel offset
UINT16 symbol_ofst : 8; // OFDMA Symbol offset
}ULMAP_HARQ_ACKCH_IE;
#pragma pack()
/* UL_MAP Burst profile format definition (totally 4 bytes)*/
#pragma pack(1)
typedef struct{
UINT16 cid : 16; // CID
UINT16 repet_cod : 2; // Indicate the repetition coding used in current burst
UINT16 duration : 10; // Duration in OFDMA slots
UINT16 uiuc : 4; // UIUC = 0 ~ 10, indicates different burst profiles
}ULMAP_BURST_IE;
#pragma pack()
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -