Commit 7daf62f8 authored by Matthieu Kanj's avatar Matthieu Kanj

renaming structures and variables in file : openair2/LAYER2/MAC/defs_NB_IoT.h

parent fc1ce173
...@@ -52,8 +52,8 @@ ...@@ -52,8 +52,8 @@
// BCOM code functions npdcch start // BCOM code functions npdcch start
// (TODO solve some error in compilation) // (TODO solve some error in compilation)
//------------------------------------------------ //------------------------------------------------
static uint8_t d[2][3*(MAX_DCI_SIZE_BITS_NB_IOT + 16) + 96]; static uint8_t d[2][3*(MAX_DCI_SIZE_BITS_NB_IoT + 16) + 96];
static uint8_t w[2][3*3*(MAX_DCI_SIZE_BITS_NB_IOT+16)]; static uint8_t w[2][3*3*(MAX_DCI_SIZE_BITS_NB_IoT+16)];
......
...@@ -287,6 +287,6 @@ typedef struct DCIN2_Pag DCIN2_Pag_t; ...@@ -287,6 +287,6 @@ typedef struct DCIN2_Pag DCIN2_Pag_t;
#define sizeof_DCIN2_Pag_t 15 #define sizeof_DCIN2_Pag_t 15
#define MAX_DCI_SIZE_BITS_NB_IOT 23 #define MAX_DCI_SIZE_BITS_NB_IoT 23
#endif #endif
...@@ -56,6 +56,7 @@ ...@@ -56,6 +56,7 @@
* @ingroup _oai2 * @ingroup _oai2
* @{ * @{
*/ */
#define SCH_PAYLOAD_SIZE_MAX_NB_IoT 4096
#define CCCH_PAYLOAD_SIZE_MAX_NB_IoT 128 #define CCCH_PAYLOAD_SIZE_MAX_NB_IoT 128
/*!\brief Maximum number of random access process */ /*!\brief Maximum number of random access process */
...@@ -67,7 +68,7 @@ ...@@ -67,7 +68,7 @@
/*! \brief Downlink SCH PDU Structure */ /*! \brief Downlink SCH PDU Structure */
typedef struct { typedef struct {
int8_t payload[8][SCH_PAYLOAD_SIZE_MAX]; int8_t payload[8][SCH_PAYLOAD_SIZE_MAX_NB_IoT];
uint16_t Pdu_size[8]; uint16_t Pdu_size[8];
} __attribute__ ((__packed__)) DLSCH_PDU_NB_IoT; } __attribute__ ((__packed__)) DLSCH_PDU_NB_IoT;
/*! \brief eNB template for UE context information */ /*! \brief eNB template for UE context information */
...@@ -95,7 +96,7 @@ typedef struct { ...@@ -95,7 +96,7 @@ typedef struct {
/* rounded to 32 bits unit (actual value should be 8 due to the logic /* rounded to 32 bits unit (actual value should be 8 due to the logic
* of the function generate_dci0) */ * of the function generate_dci0) */
// need to modify // need to modify
uint8_t DLSCH_DCI[8][(((MAX_DCI_SIZE_BITS)+31)>>5)*4]; uint8_t DLSCH_DCI[8][(((MAX_DCI_SIZE_BITS_NB_IoT)+31)>>5)*4];
/// pre-assigned MCS by the ulsch preprocessorerror /// pre-assigned MCS by the ulsch preprocessorerror
uint8_t pre_assigned_mcs_ul; uint8_t pre_assigned_mcs_ul;
/// assigned MCS by the ulsch scheduler /// assigned MCS by the ulsch scheduler
...@@ -104,7 +105,7 @@ typedef struct { ...@@ -104,7 +105,7 @@ typedef struct {
/* rounded to 32 bits unit (actual value should be 8 due to the logic /* rounded to 32 bits unit (actual value should be 8 due to the logic
* of the function generate_dci0) */ * of the function generate_dci0) */
// need to modify // need to modify
uint8_t ULSCH_DCI[8][(((MAX_DCI_SIZE_BITS)+31)>>5)*4]; uint8_t ULSCH_DCI[8][(((MAX_DCI_SIZE_BITS_NB_IoT)+31)>>5)*4];
// Logical channel info for link with RLC // Logical channel info for link with RLC
/// Last received UE BSR info for each logical channel group id /// Last received UE BSR info for each logical channel group id
uint8_t bsr_info[MAX_NUM_LCGID_NB_IoT]; uint8_t bsr_info[MAX_NUM_LCGID_NB_IoT];
...@@ -251,7 +252,7 @@ typedef struct { ...@@ -251,7 +252,7 @@ typedef struct {
uint32_t total_num_pdus_rx; uint32_t total_num_pdus_rx;
/// num of error pdus /// num of error pdus
uint32_t total_num_errors_rx; uint32_t total_num_errors_rx;
} eNB_UE_STATS_NB; } eNB_UE_STATS_NB_IoT;
/*! \brief scheduling control information set through an API (not used)*/ /*! \brief scheduling control information set through an API (not used)*/
typedef struct { typedef struct {
///UL transmission bandwidth in RBs ///UL transmission bandwidth in RBs
...@@ -288,28 +289,28 @@ typedef struct { ...@@ -288,28 +289,28 @@ typedef struct {
int32_t ra_pdcch_order_sent; int32_t ra_pdcch_order_sent;
int32_t ul_out_of_sync; int32_t ul_out_of_sync;
int32_t phr_received;// received from Msg3 MAC Control Element int32_t phr_received;// received from Msg3 MAC Control Element
} UE_sched_ctrl_NB; } UE_sched_ctrl_NB_IoT;
/*! \brief UE list used by eNB to order UEs/CC for scheduling*/ /*! \brief UE list used by eNB to order UEs/CC for scheduling*/
typedef struct { typedef struct {
/// DLSCH pdu /// DLSCH pdu
DLSCH_PDU_NB_IoT DLSCH_pdu[MAX_NUM_CCs][2][NUMBER_OF_UE_MAX]; DLSCH_PDU_NB_IoT DLSCH_pdu[MAX_NUM_CCs][2][NUMBER_OF_UE_MAX_NB_IoT];
/// DCI template and MAC connection parameters for UEs /// DCI template and MAC connection parameters for UEs
UE_TEMPLATE_NB_IoT UE_template[MAX_NUM_CCs][NUMBER_OF_UE_MAX]; UE_TEMPLATE_NB_IoT UE_template[MAX_NUM_CCs][NUMBER_OF_UE_MAX_NB_IoT];
/// DCI template and MAC connection for RA processes /// DCI template and MAC connection for RA processes
int pCC_id[NUMBER_OF_UE_MAX]; int pCC_id[NUMBER_OF_UE_MAX_NB_IoT];
/// eNB to UE statistics /// eNB to UE statistics
eNB_UE_STATS_NB eNB_UE_stats[MAX_NUM_CCs][NUMBER_OF_UE_MAX]; eNB_UE_STATS_NB_IoT eNB_UE_stats[MAX_NUM_CCs][NUMBER_OF_UE_MAX_NB_IoT];
/// scheduling control info /// scheduling control info
UE_sched_ctrl_NB UE_sched_ctrl[NUMBER_OF_UE_MAX]; UE_sched_ctrl_NB_IoT UE_sched_ctrl[NUMBER_OF_UE_MAX_NB_IoT];
int next[NUMBER_OF_UE_MAX]; int next[NUMBER_OF_UE_MAX_NB_IoT];
int head; int head;
int next_ul[NUMBER_OF_UE_MAX]; int next_ul[NUMBER_OF_UE_MAX_NB_IoT];
int head_ul; int head_ul;
int avail; int avail;
int num_UEs; int num_UEs;
boolean_t active[NUMBER_OF_UE_MAX]; boolean_t active[NUMBER_OF_UE_MAX_NB_IoT];
} UE_list_NB_t; } UE_list_NB_IoT_t;
/*!\brief Values of BCCH0 logical channel for MIB*/ /*!\brief Values of BCCH0 logical channel for MIB*/
#define BCCH0_NB 11 // MIB-NB #define BCCH0_NB 11 // MIB-NB
...@@ -414,7 +415,7 @@ typedef struct { ...@@ -414,7 +415,7 @@ typedef struct {
/// Size of DCI for RA-Response (bits) /// Size of DCI for RA-Response (bits)
uint8_t RA_dci_size_bits1; uint8_t RA_dci_size_bits1;
/// Actual DCI to transmit for RA-Response /// Actual DCI to transmit for RA-Response
uint8_t RA_alloc_pdu1[(MAX_DCI_SIZE_BITS>>3)+1]; uint8_t RA_alloc_pdu1[(MAX_DCI_SIZE_BITS_NB_IoT>>3)+1];
/// DCI format for RA-Response (should be N1 RAR) /// DCI format for RA-Response (should be N1 RAR)
uint8_t RA_dci_fmt1; uint8_t RA_dci_fmt1;
/// Size of DCI for Msg4/ContRes (bytes) /// Size of DCI for Msg4/ContRes (bytes)
...@@ -422,7 +423,7 @@ typedef struct { ...@@ -422,7 +423,7 @@ typedef struct {
/// Size of DCI for Msg4/ContRes (bits) /// Size of DCI for Msg4/ContRes (bits)
uint8_t RA_dci_size_bits2; uint8_t RA_dci_size_bits2;
/// Actual DCI to transmit for Msg4/ContRes /// Actual DCI to transmit for Msg4/ContRes
uint8_t RA_alloc_pdu2[(MAX_DCI_SIZE_BITS>>3)+1]; uint8_t RA_alloc_pdu2[(MAX_DCI_SIZE_BITS_NB_IoT>>3)+1];
/// DCI format for Msg4/ContRes (should be 1A) /// DCI format for Msg4/ContRes (should be 1A)
uint8_t RA_dci_fmt2; uint8_t RA_dci_fmt2;
/// Flag to indicate the eNB should generate RAR. This is triggered by detection of PRACH /// Flag to indicate the eNB should generate RAR. This is triggered by detection of PRACH
...@@ -560,7 +561,7 @@ typedef struct { ...@@ -560,7 +561,7 @@ typedef struct {
sub_frame_t subframe; sub_frame_t subframe;
/// Common cell resources /// Common cell resources
COMMON_channels_NB_t common_channels[MAX_NUM_CCs]; COMMON_channels_NB_t common_channels[MAX_NUM_CCs];
UE_list_NB_t UE_list; UE_list_NB_IoT_t UE_list;
///Delete subband bitmap configuration, no related CQI report ///Delete subband bitmap configuration, no related CQI report
// / Modify CCE table used to build DCI scheduling information // / Modify CCE table used to build DCI scheduling information
int CCE_table[MAX_NUM_CCs][12];//180 khz for Anchor carrier int CCE_table[MAX_NUM_CCs][12];//180 khz for Anchor carrier
......
...@@ -70,7 +70,7 @@ int NB_rrc_mac_remove_ue( ...@@ -70,7 +70,7 @@ int NB_rrc_mac_remove_ue(
rnti_t rntiP) rnti_t rntiP)
{ {
int i; int i;
UE_list_NB_t *UE_list = &eNB_mac_inst_NB[mod_idP].UE_list; UE_list_NB_IoT_t *UE_list = &eNB_mac_inst_NB[mod_idP].UE_list;
int UE_id = find_UE_id(mod_idP,rntiP); //may should be changed int UE_id = find_UE_id(mod_idP,rntiP); //may should be changed
int pCC_id; int pCC_id;
......
...@@ -84,7 +84,7 @@ void NB_rx_sdu(const module_id_t enb_mod_idP, ...@@ -84,7 +84,7 @@ void NB_rx_sdu(const module_id_t enb_mod_idP,
int UE_id = find_UE_id(enb_mod_idP,rntiP); int UE_id = find_UE_id(enb_mod_idP,rntiP);
int ii,j; int ii,j;
eNB_MAC_INST_NB *eNB = &eNB_mac_inst_NB[enb_mod_idP]; eNB_MAC_INST_NB *eNB = &eNB_mac_inst_NB[enb_mod_idP];
UE_list_NB_t *UE_list= &eNB->UE_list; UE_list_NB_IoT_t *UE_list= &eNB->UE_list;
int crnti_rx=0; int crnti_rx=0;
//int old_buffer_info; //int old_buffer_info;
......
...@@ -92,7 +92,7 @@ int mac_top_init_NB() ...@@ -92,7 +92,7 @@ int mac_top_init_NB()
int size_bytes1,size_bytes2,size_bits1,size_bits2; int size_bytes1,size_bytes2,size_bits1,size_bits2;
int CC_id; int CC_id;
int list_el; int list_el;
UE_list_NB_t *UE_list; //XXX to review if elements are correct UE_list_NB_IoT_t *UE_list; //XXX to review if elements are correct
// delete the part to init the UE_INST // delete the part to init the UE_INST
...@@ -124,7 +124,7 @@ int mac_top_init_NB() ...@@ -124,7 +124,7 @@ int mac_top_init_NB()
UE_list->head_ul=-1; UE_list->head_ul=-1;
UE_list->avail=0; UE_list->avail=0;
for (list_el=0; list_el<NUMBER_OF_UE_MAX-1; list_el++) { for (list_el=0; list_el<NUMBER_OF_UE_MAX_NB_IoT-1; list_el++) {
UE_list->next[list_el]=list_el+1; UE_list->next[list_el]=list_el+1;
UE_list->next_ul[list_el]=list_el+1; UE_list->next_ul[list_el]=list_el+1;
} }
...@@ -176,7 +176,7 @@ int mac_top_init_NB() ...@@ -176,7 +176,7 @@ int mac_top_init_NB()
for (j=0; j<NUMBER_OF_UE_MAX; j++) { for (j=0; j<NUMBER_OF_UE_MAX; j++) {
UE_template[j].rnti=0; UE_template[j].rnti=0;
// initiallize the eNB to UE statistics // initiallize the eNB to UE statistics
memset (&eNB_mac_inst_NB[i].UE_list.eNB_UE_stats[CC_id][j],0,sizeof(eNB_UE_STATS_NB)); memset (&eNB_mac_inst_NB[i].UE_list.eNB_UE_stats[CC_id][j],0,sizeof(eNB_UE_STATS_NB_IoT));
} }
} }
......
...@@ -587,7 +587,7 @@ int NB_rrc_mac_config_req_eNB( ...@@ -587,7 +587,7 @@ int NB_rrc_mac_config_req_eNB(
int UE_id = -1; int UE_id = -1;
//UE_list_NB_t *UE_list= &eNB_mac_inst_NB->UE_list; //UE_list_NB_IoT_t *UE_list= &eNB_mac_inst_NB->UE_list;
UE_id = find_UE_id(Mod_idP, rntiP); UE_id = find_UE_id(Mod_idP, rntiP);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_RRC_MAC_CONFIG, VCD_FUNCTION_IN); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_RRC_MAC_CONFIG, VCD_FUNCTION_IN);
...@@ -1353,7 +1353,7 @@ void NB_mac_eNB_rrc_ul_failure( ...@@ -1353,7 +1353,7 @@ void NB_mac_eNB_rrc_ul_failure(
//defined in eNB_scheduler_primitives.c //defined in eNB_scheduler_primitives.c
void dump_ue_list_NB(UE_list_NB_t *listP, int ul_flag) void dump_ue_list_NB(UE_list_NB_IoT_t *listP, int ul_flag)
{ {
int j; int j;
...@@ -1376,7 +1376,7 @@ int NB_rrc_mac_remove_ue( ...@@ -1376,7 +1376,7 @@ int NB_rrc_mac_remove_ue(
rnti_t rntiP) rnti_t rntiP)
{ {
int i; int i;
UE_list_NB_t *UE_list = &eNB_mac_inst_NB[mod_idP].UE_list; UE_list_NB_IoT_t *UE_list = &eNB_mac_inst_NB[mod_idP].UE_list;
int UE_id = find_UE_id(mod_idP,rntiP); //may should be changed int UE_id = find_UE_id(mod_idP,rntiP); //may should be changed
int pCC_id; int pCC_id;
......
...@@ -169,7 +169,7 @@ int8_t NB_mac_rrc_data_ind_eNB( ...@@ -169,7 +169,7 @@ int8_t NB_mac_rrc_data_ind_eNB(
//------------------------------------------- //-------------------------------------------
//defined in L2_interface //defined in L2_interface
void dump_ue_list_NB(UE_list_NB_t *listP, int ul_flag); void dump_ue_list_NB(UE_list_NB_IoT_t *listP, int ul_flag);
//------------------------------------------- //-------------------------------------------
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment