cleaning only
This commit is contained in:
@@ -29,7 +29,7 @@
|
||||
*/
|
||||
|
||||
#include "COMMON/platform_types.h"
|
||||
#include "COMMON/platform_constants.h"
|
||||
#include "common/platform_constants.h"
|
||||
#include "LTE_SystemInformationBlockType2.h"
|
||||
//#include "RadioResourceConfigCommonSIB.h"
|
||||
#include "LTE_RadioResourceConfigDedicated.h"
|
||||
@@ -58,6 +58,7 @@ extern int l2_init_eNB(void);
|
||||
extern void mac_top_init_eNB(void);
|
||||
extern void mac_init_cell_params(int Mod_idP,int CC_idP);
|
||||
|
||||
SCHEDULER_MODES global_scheduler_mode;
|
||||
typedef struct eutra_bandentry_s {
|
||||
int16_t band;
|
||||
uint32_t ul_min;
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
|
||||
|
||||
#include "COMMON/platform_types.h"
|
||||
#include "COMMON/platform_constants.h"
|
||||
#include "common/platform_constants.h"
|
||||
#include "nfapi/oai_integration/vendor_ext.h"
|
||||
#include "SCHED_UE/sched_UE.h"
|
||||
#include "LTE_SystemInformationBlockType2.h"
|
||||
|
||||
@@ -12,8 +12,7 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
//#include "COMMON/openair_defs.h"
|
||||
#include "COMMON/platform_constants.h"
|
||||
#include "common/platform_constants.h"
|
||||
#include "COMMON/mac_rrc_primitives.h"
|
||||
#include "PHY/LTE_TRANSPORT/defs_NB_IoT.h"
|
||||
//#include "PHY/defs.h"
|
||||
|
||||
@@ -58,6 +58,7 @@
|
||||
#include <dlfcn.h>
|
||||
|
||||
#include "T.h"
|
||||
#include "openair2/LAYER2/MAC/mac_extern.h"
|
||||
|
||||
#define ENABLE_MAC_PAYLOAD_DEBUG
|
||||
//#define DEBUG_eNB_SCHEDULER 1
|
||||
@@ -65,26 +66,7 @@
|
||||
#include "common/ran_context.h"
|
||||
extern RAN_CONTEXT_t RC;
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
void
|
||||
add_ue_dlsch_info(module_id_t module_idP,
|
||||
int CC_id,
|
||||
int UE_id,
|
||||
sub_frame_t subframeP,
|
||||
UE_DLSCH_STATUS status,
|
||||
rnti_t rnti)
|
||||
//------------------------------------------------------------------------------
|
||||
{
|
||||
eNB_DLSCH_INFO *info = &eNB_dlsch_info[module_idP][CC_id][UE_id];
|
||||
// LOG_D(MAC, "%s(module_idP:%d, CC_id:%d, UE_id:%d, subframeP:%d, status:%d) serving_num:%d rnti:%x\n", __FUNCTION__, module_idP, CC_id, UE_id, subframeP, status, eNB_dlsch_info[module_idP][CC_id][UE_id].serving_num, UE_RNTI(module_idP,UE_id));
|
||||
info->rnti = rnti;
|
||||
// info->weight = weight;
|
||||
info->subframe = subframeP;
|
||||
info->status = status;
|
||||
info->serving_num++;
|
||||
return;
|
||||
}
|
||||
mac_rlc_am_muilist_t rlc_am_mui;
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
int
|
||||
|
||||
@@ -295,13 +295,7 @@ void dlsch_scheduler_pre_ue_select_fairRR(
|
||||
// update UL DAI after DLSCH scheduling
|
||||
set_ul_DAI(module_idP,UE_id,CC_id,frameP,subframeP);
|
||||
}
|
||||
|
||||
add_ue_dlsch_info(module_idP,
|
||||
CC_id,
|
||||
UE_id,
|
||||
subframeP,
|
||||
S_DL_NONE,
|
||||
rnti);
|
||||
eNB_dlsch_info[module_idP][CC_id][UE_id].status = S_DL_NONE;
|
||||
end_flag[CC_id] = 1;
|
||||
break;
|
||||
}
|
||||
@@ -423,13 +417,7 @@ void dlsch_scheduler_pre_ue_select_fairRR(
|
||||
// update UL DAI after DLSCH scheduling
|
||||
set_ul_DAI(module_idP,UE_id,CC_id,frameP,subframeP);
|
||||
}
|
||||
|
||||
add_ue_dlsch_info(module_idP,
|
||||
CC_id,
|
||||
UE_id,
|
||||
subframeP,
|
||||
S_DL_NONE,
|
||||
rnti);
|
||||
eNB_dlsch_info[module_idP][CC_id][UE_id].status = S_DL_NONE;
|
||||
end_flag[CC_id] = 1;
|
||||
break;
|
||||
}
|
||||
@@ -551,13 +539,7 @@ void dlsch_scheduler_pre_ue_select_fairRR(
|
||||
// update UL DAI after DLSCH scheduling
|
||||
set_ul_DAI(module_idP,UE_id,CC_id,frameP,subframeP);
|
||||
}
|
||||
|
||||
add_ue_dlsch_info(module_idP,
|
||||
CC_id,
|
||||
UE_id,
|
||||
subframeP,
|
||||
S_DL_NONE,
|
||||
rnti);
|
||||
eNB_dlsch_info[module_idP][CC_id][UE_id].status = S_DL_NONE;
|
||||
end_flag[CC_id] = 1;
|
||||
break;
|
||||
}
|
||||
@@ -1204,7 +1186,6 @@ schedule_ue_spec_fairRR(module_id_t module_idP,
|
||||
}
|
||||
}
|
||||
|
||||
//weight = get_ue_weight(module_idP,UE_id);
|
||||
// aggregation = 2;
|
||||
for (CC_id = 0; CC_id < MAX_NUM_CCs; CC_id++) {
|
||||
N_RB_DL[CC_id] = to_prb(cc[CC_id].mib->message.dl_Bandwidth);
|
||||
@@ -1503,13 +1484,7 @@ schedule_ue_spec_fairRR(module_id_t module_idP,
|
||||
frameP, subframeP, UE_id, rnti);
|
||||
}
|
||||
}
|
||||
|
||||
add_ue_dlsch_info(module_idP,
|
||||
CC_id,
|
||||
UE_id,
|
||||
subframeP,
|
||||
S_DL_SCHEDULED,
|
||||
rnti);
|
||||
eNB_dlsch_info[module_idP][CC_id][UE_id].status = S_DL_SCHEDULED;
|
||||
UE_info->eNB_UE_stats[CC_id][UE_id].dlsch_rounds[round]++;
|
||||
UE_info->eNB_UE_stats[CC_id][UE_id].num_retransmission += 1;
|
||||
UE_info->eNB_UE_stats[CC_id][UE_id].rbs_used_retx = nb_rb;
|
||||
@@ -1943,12 +1918,7 @@ schedule_ue_spec_fairRR(module_id_t module_idP,
|
||||
T(T_ENB_MAC_UE_DL_PDU_WITH_DATA, T_INT(module_idP), T_INT(CC_id), T_INT(rnti), T_INT(frameP), T_INT(subframeP),
|
||||
T_INT(harq_pid), T_BUFFER(UE_info->DLSCH_pdu[CC_id][0][UE_id].payload[0], TBS));
|
||||
UE_info->UE_template[CC_id][UE_id].nb_rb[harq_pid] = nb_rb;
|
||||
add_ue_dlsch_info(module_idP,
|
||||
CC_id,
|
||||
UE_id,
|
||||
subframeP,
|
||||
S_DL_SCHEDULED,
|
||||
rnti);
|
||||
eNB_dlsch_info[module_idP][CC_id][UE_id].status = S_DL_SCHEDULED;
|
||||
// store stats
|
||||
eNB->eNB_stats[CC_id].dlsch_bytes_tx+=sdu_length_total;
|
||||
eNB->eNB_stats[CC_id].dlsch_pdus_tx+=1;
|
||||
@@ -2162,7 +2132,7 @@ fill_DLSCH_dci_fairRR(
|
||||
|
||||
if (eNB_dlsch_info[module_idP][CC_id][UE_id].status == S_DL_SCHEDULED) {
|
||||
// clear scheduling flag
|
||||
eNB_dlsch_info[module_idP][CC_id][UE_id].status = S_DL_WAITING;
|
||||
eNB_dlsch_info[module_idP][CC_id][UE_id].status = S_DL_NONE;
|
||||
rnti = UE_RNTI(module_idP,UE_id);
|
||||
harq_pid = frame_subframe2_dl_harq_pid(cc->tdd_Config,frameP,subframeP);
|
||||
nb_rb = UE_info->UE_template[CC_id][UE_id].nb_rb[harq_pid];
|
||||
@@ -3351,12 +3321,7 @@ void schedule_ulsch_rnti_fairRR(module_id_t module_idP,
|
||||
uint16_t ul_sched_frame = sched_frame;
|
||||
uint16_t ul_sched_subframeP = sched_subframeP;
|
||||
add_subframe(&ul_sched_frame, &ul_sched_subframeP, 2);
|
||||
ul_req->sfn_sf = ul_sched_frame<<4|ul_sched_subframeP;
|
||||
add_ue_ulsch_info(module_idP,
|
||||
CC_id,
|
||||
UE_id,
|
||||
subframeP,
|
||||
S_UL_SCHEDULED);
|
||||
ul_req->sfn_sf = ul_sched_frame << 4 | ul_sched_subframeP;
|
||||
LOG_D(MAC,"[eNB %d] CC_id %d Frame %d, subframeP %d: Generated ULSCH DCI for next UE_id %d, format 0\n", module_idP,CC_id,frameP,subframeP,UE_id);
|
||||
// increment first rb for next UE allocation
|
||||
first_rb[CC_id]+=rb_table[rb_table_index];
|
||||
|
||||
@@ -324,11 +324,6 @@ void schedule_ulsch_phy_test(module_id_t module_idP,frame_t frameP,sub_frame_t s
|
||||
|
||||
ul_req->number_of_pdus = 1;
|
||||
mac->ul_handle++;
|
||||
add_ue_ulsch_info(module_idP,
|
||||
CC_id,
|
||||
UE_id,
|
||||
subframeP,
|
||||
S_UL_SCHEDULED);
|
||||
// increment first rb for next UE allocation
|
||||
first_rb[CC_id]+= nb_rb;
|
||||
} // loop of CC_id
|
||||
|
||||
@@ -58,10 +58,36 @@ extern uint16_t frame_cnt;
|
||||
|
||||
#include "common/ran_context.h"
|
||||
#include "SCHED/sched_common.h"
|
||||
#include "openair2/LAYER2/MAC/mac_extern.h"
|
||||
/*
|
||||
* If the CQI is low, then scheduler will use a higher aggregation level and lower aggregation level otherwise
|
||||
* this is also dependent to transmission mode, where an offset could be defined
|
||||
*/
|
||||
// the follwoing three tables are calibrated for TXMODE 1 and 2
|
||||
static const uint8_t cqi2fmt0_agg[MAX_SUPPORTED_BW][CQI_VALUE_RANGE] = {
|
||||
{3, 3, 3, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0}, // 1.4_DCI0_CRC_Size= 37 bits
|
||||
//{3, 3, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0}, // 5_DCI0_CRC_SIZE = 41
|
||||
{3, 3, 3, 3, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0}, // 5_DCI0_CRC_SIZE = 41
|
||||
{3, 3, 3, 3, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0, 0}, // 10_DCI0_CRC_SIZE = 43
|
||||
{3, 3, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0} // 20_DCI0_CRC_SIZE = 44
|
||||
};
|
||||
|
||||
static const uint8_t cqi2fmt1x_agg[MAX_SUPPORTED_BW][CQI_VALUE_RANGE] = {
|
||||
{3, 3, 3, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0}, // 1.4_DCI0_CRC_Size < 38 bits
|
||||
{3, 3, 3, 3, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0}, // 5_DCI0_CRC_SIZE < 43
|
||||
{3, 3, 3, 3, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0, 0}, // 10_DCI0_CRC_SIZE < 47
|
||||
{3, 3, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0} // 20_DCI0_CRC_SIZE < 55
|
||||
};
|
||||
|
||||
static const uint8_t cqi2fmt2x_agg[MAX_SUPPORTED_BW][CQI_VALUE_RANGE] = {
|
||||
{3, 3, 3, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0}, // 1.4_DCI0_CRC_Size= 47 bits
|
||||
{3, 3, 3, 3, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0}, // 5_DCI0_CRC_SIZE = 55
|
||||
{3, 3, 3, 3, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0, 0}, // 10_DCI0_CRC_SIZE = 59
|
||||
{3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 1, 1, 1, 1, 0, 0} // 20_DCI0_CRC_SIZE = 64
|
||||
};
|
||||
|
||||
extern RAN_CONTEXT_t RC;
|
||||
|
||||
|
||||
eNB_DLSCH_INFO eNB_dlsch_info[NUMBER_OF_eNB_MAX][MAX_NUM_CCs][MAX_MOBILES_PER_ENB]; // eNBxUE = 8x8
|
||||
//------------------------------------------------------------------------------
|
||||
int
|
||||
choose(int n,
|
||||
@@ -1940,8 +1966,6 @@ narrowband_to_first_rb(COMMON_channels_t *cc,
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
void
|
||||
init_ue_sched_info(void)
|
||||
//------------------------------------------------------------------------------
|
||||
@@ -1951,15 +1975,7 @@ init_ue_sched_info(void)
|
||||
for (i = 0; i < NUMBER_OF_eNB_MAX; i++) {
|
||||
for (k = 0; k < MAX_NUM_CCs; k++) {
|
||||
for (j = 0; j < MAX_MOBILES_PER_ENB; j++) {
|
||||
// init DL
|
||||
eNB_dlsch_info[i][k][j].weight = 0;
|
||||
eNB_dlsch_info[i][k][j].subframe = 0;
|
||||
eNB_dlsch_info[i][k][j].serving_num = 0;
|
||||
eNB_dlsch_info[i][k][j].status = S_DL_NONE;
|
||||
// init UL
|
||||
eNB_ulsch_info[i][k][j].subframe = 0;
|
||||
eNB_ulsch_info[i][k][j].serving_num = 0;
|
||||
eNB_ulsch_info[i][k][j].status = S_UL_NONE;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1967,16 +1983,6 @@ init_ue_sched_info(void)
|
||||
return;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
unsigned char
|
||||
get_ue_weight(module_id_t module_idP,
|
||||
int CC_idP,
|
||||
int ue_idP)
|
||||
//------------------------------------------------------------------------------
|
||||
{
|
||||
return (eNB_dlsch_info[module_idP][CC_idP][ue_idP].weight);
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
int
|
||||
find_UE_id(module_id_t mod_idP,
|
||||
@@ -2239,9 +2245,7 @@ add_new_ue(module_id_t mod_idP,
|
||||
UE_info->UE_sched_ctrl[UE_id].round[cc_idP][j] = 8;
|
||||
UE_info->UE_sched_ctrl[UE_id].round_UL[cc_idP][j] = 0;
|
||||
}
|
||||
|
||||
eNB_ulsch_info[mod_idP][cc_idP][UE_id].status = S_UL_WAITING;
|
||||
eNB_dlsch_info[mod_idP][cc_idP][UE_id].status = S_DL_WAITING;
|
||||
eNB_dlsch_info[mod_idP][cc_idP][UE_id].status = S_DL_NONE;
|
||||
LOG_D(MAC, "[eNB %d] Add UE_id %d on Primary CC_id %d: rnti %x\n",
|
||||
mod_idP,
|
||||
UE_id,
|
||||
@@ -2317,13 +2321,7 @@ rrc_mac_remove_ue(module_id_t mod_idP,
|
||||
ue_stats->total_pdu_bytes_rx = 0;
|
||||
ue_stats->total_num_pdus_rx = 0;
|
||||
ue_stats->total_num_errors_rx = 0;
|
||||
eNB_ulsch_info[mod_idP][pCC_id][UE_id].rnti = NOT_A_RNTI;
|
||||
eNB_ulsch_info[mod_idP][pCC_id][UE_id].status = S_UL_NONE;
|
||||
eNB_ulsch_info[mod_idP][pCC_id][UE_id].serving_num = 0;
|
||||
eNB_dlsch_info[mod_idP][pCC_id][UE_id].rnti = NOT_A_RNTI;
|
||||
eNB_dlsch_info[mod_idP][pCC_id][UE_id].status = S_DL_NONE;
|
||||
eNB_dlsch_info[mod_idP][pCC_id][UE_id].serving_num = 0;
|
||||
|
||||
// check if this has an RA process active
|
||||
if (find_RA_id(mod_idP,
|
||||
pCC_id,
|
||||
|
||||
@@ -1063,24 +1063,6 @@ bytes_to_bsr_index(int32_t nbytes)
|
||||
return (i - 1);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
/*
|
||||
* Add ue info in eNB_ulsch_info[module_idP][CC_id][UE_id] struct
|
||||
*/
|
||||
void
|
||||
add_ue_ulsch_info(module_id_t module_idP,
|
||||
int CC_id,
|
||||
int UE_id,
|
||||
sub_frame_t subframeP,
|
||||
UE_ULSCH_STATUS status)
|
||||
//-----------------------------------------------------------------------------
|
||||
{
|
||||
eNB_ulsch_info[module_idP][CC_id][UE_id].rnti = UE_RNTI(module_idP, UE_id);
|
||||
eNB_ulsch_info[module_idP][CC_id][UE_id].subframe = subframeP;
|
||||
eNB_ulsch_info[module_idP][CC_id][UE_id].status = status;
|
||||
eNB_ulsch_info[module_idP][CC_id][UE_id].serving_num++;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
/*
|
||||
* Parse MAC header from ULSCH
|
||||
@@ -1786,7 +1768,6 @@ schedule_ulsch_rnti(module_id_t module_idP,
|
||||
ul_req_tmp_body->tl.tag = NFAPI_UL_CONFIG_REQUEST_BODY_TAG;
|
||||
mac->ul_handle++;
|
||||
ul_req_tmp->sfn_sf = sched_frame << 4 | sched_subframeP;
|
||||
add_ue_ulsch_info(module_idP, CC_id, UE_id, subframeP, S_UL_SCHEDULED);
|
||||
LOG_D(MAC,
|
||||
"[eNB %d] CC_id %d Frame %d, subframeP %d: Generated ULSCH DCI for "
|
||||
"next UE_id %d, format 0\n",
|
||||
@@ -2284,11 +2265,6 @@ void schedule_ulsch_rnti_emtc(module_id_t module_idP,
|
||||
(frameP * 10) + subframeP);
|
||||
ul_req_tmp->number_of_pdus++;
|
||||
eNB->ul_handle++;
|
||||
add_ue_ulsch_info(module_idP,
|
||||
CC_id,
|
||||
UE_id,
|
||||
subframeP,
|
||||
S_UL_SCHEDULED);
|
||||
LOG_D(MAC,"[eNB %d] CC_id %d Frame %d, subframeP %d: Generated ULSCH DCI for next UE_id %d, format 0\n",
|
||||
module_idP,
|
||||
CC_id,
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "COMMON/platform_constants.h"
|
||||
#include "common/platform_constants.h"
|
||||
#include "LTE_BCCH-BCH-Message.h"
|
||||
#include "LTE_RadioResourceConfigCommon.h"
|
||||
#include "LTE_RadioResourceConfigCommonSIB.h"
|
||||
@@ -504,66 +504,18 @@ typedef struct {
|
||||
} __attribute__ ((__packed__)) ULDCH_PDU;
|
||||
|
||||
/*!\brief RA process state*/
|
||||
typedef enum {
|
||||
IDLE = 0,
|
||||
MSG2,
|
||||
WAITMSG3,
|
||||
MSG4,
|
||||
WAITMSG4ACK,
|
||||
MSGCRNTI,
|
||||
MSGCRNTI_ACK
|
||||
} RA_state;
|
||||
|
||||
/*!\brief UE ULSCH scheduling states*/
|
||||
typedef enum {
|
||||
S_UL_NONE = 0,
|
||||
S_UL_WAITING,
|
||||
S_UL_SCHEDULED,
|
||||
S_UL_BUFFERED,
|
||||
S_UL_NUM_STATUS
|
||||
} UE_ULSCH_STATUS;
|
||||
|
||||
typedef enum { IDLE = 0, MSG2, WAITMSG3, MSG4, WAITMSG4ACK, MSGCRNTI, MSGCRNTI_ACK } RA_state;
|
||||
/*!\brief UE DLSCH scheduling states*/
|
||||
typedef enum {
|
||||
S_DL_NONE = 0,
|
||||
S_DL_WAITING,
|
||||
S_DL_SCHEDULED,
|
||||
S_DL_BUFFERED,
|
||||
S_DL_NUM_STATUS
|
||||
} UE_DLSCH_STATUS;
|
||||
|
||||
/*!\brief scheduling policy for the contention-based access */
|
||||
typedef enum {
|
||||
CBA_ES = 0, /// equal share of RB among groups w
|
||||
CBA_ES_S, /// equal share of RB among groups with small allocation
|
||||
CBA_PF, /// proportional fair (kind of)
|
||||
CBA_PF_S, /// proportional fair (kind of) with small RB allocation
|
||||
CBA_RS /// random allocation
|
||||
} CBA_POLICY;
|
||||
|
||||
typedef enum { S_DL_NONE = 0, S_DL_SCHEDULED } UE_DLSCH_STATUS;
|
||||
/*!\brief scheduler mode */
|
||||
typedef enum {
|
||||
SCHED_MODE_DEFAULT = 0, /// default cheduler
|
||||
SCHED_MODE_FAIR_RR /// fair raund robin
|
||||
SCHED_MODE_DEFAULT = 0, /// default cheduler
|
||||
SCHED_MODE_FAIR_RR /// fair raund robin
|
||||
} SCHEDULER_MODES;
|
||||
|
||||
/*! \brief temporary struct for ULSCH sched */
|
||||
typedef struct {
|
||||
rnti_t rnti;
|
||||
uint16_t subframe;
|
||||
uint16_t serving_num;
|
||||
UE_ULSCH_STATUS status;
|
||||
} eNB_ULSCH_INFO;
|
||||
|
||||
/*! \brief temp struct for DLSCH sched */
|
||||
typedef struct {
|
||||
rnti_t rnti;
|
||||
uint16_t weight;
|
||||
uint16_t subframe;
|
||||
uint16_t serving_num;
|
||||
UE_DLSCH_STATUS status;
|
||||
} eNB_DLSCH_INFO;
|
||||
|
||||
/*! \brief eNB overall statistics */
|
||||
typedef struct {
|
||||
/// num BCCH PDU per CC
|
||||
@@ -1142,16 +1094,6 @@ typedef struct {
|
||||
int8_t crnti_harq_pid;
|
||||
} RA_t;
|
||||
|
||||
|
||||
/*! \brief subband bitmap confguration (for ALU icic algo purpose), in test phase */
|
||||
typedef struct {
|
||||
uint8_t sbmap[13]; //13 = number of SB MAX for 100 PRB
|
||||
uint8_t periodicity;
|
||||
uint8_t first_subframe;
|
||||
uint8_t sb_size;
|
||||
uint8_t nb_active_sb;
|
||||
} SBMAP_CONF;
|
||||
|
||||
/*! \brief UE_list_t is a "list" of users within UE_info_t. Especial useful in
|
||||
* the scheduler and to keep "classes" of users. */
|
||||
typedef struct {
|
||||
@@ -1403,9 +1345,6 @@ typedef struct eNB_MAC_INST_s {
|
||||
/// UL handle
|
||||
uint32_t ul_handle;
|
||||
UE_info_t UE_info;
|
||||
|
||||
///subband bitmap configuration
|
||||
SBMAP_CONF sbmap_conf;
|
||||
/// CCE table used to build DCI scheduling information
|
||||
int CCE_table[NFAPI_CC_MAX][800];
|
||||
/// active flag for Other lcid
|
||||
@@ -1724,11 +1663,6 @@ typedef struct {
|
||||
eth_params_t eth_params_n;
|
||||
|
||||
} UE_MAC_INST;
|
||||
/*! \brief ID of the neighboring cells used for HO*/
|
||||
typedef struct {
|
||||
uint16_t cell_ids[6];
|
||||
uint8_t n_adj_cells;
|
||||
} neigh_cell_id_t;
|
||||
|
||||
typedef struct {
|
||||
volatile uint8_t flag;
|
||||
|
||||
@@ -36,33 +36,12 @@
|
||||
#include "mac.h"
|
||||
#include "RRC/LTE/rrc_defs.h"
|
||||
|
||||
extern const uint32_t BSR_TABLE[BSR_TABLE_SIZE];
|
||||
//extern uint32_t EBSR_Level[63];
|
||||
extern const uint32_t Extended_BSR_TABLE[BSR_TABLE_SIZE];
|
||||
//extern uint32_t Extended_BSR_TABLE[63]; ----currently not used
|
||||
|
||||
extern const uint8_t cqi2fmt0_agg[MAX_SUPPORTED_BW][CQI_VALUE_RANGE];
|
||||
|
||||
extern const uint8_t cqi2fmt1x_agg[MAX_SUPPORTED_BW][CQI_VALUE_RANGE];
|
||||
|
||||
extern const uint8_t cqi2fmt2x_agg[MAX_SUPPORTED_BW][CQI_VALUE_RANGE];
|
||||
|
||||
extern UE_RRC_INST *UE_rrc_inst;
|
||||
extern UE_MAC_INST *UE_mac_inst;
|
||||
|
||||
extern eNB_ULSCH_INFO eNB_ulsch_info[NUMBER_OF_eNB_MAX][MAX_NUM_CCs][MAX_MOBILES_PER_ENB]; // eNBxUE = 8x8
|
||||
extern eNB_DLSCH_INFO eNB_dlsch_info[NUMBER_OF_eNB_MAX][MAX_NUM_CCs][MAX_MOBILES_PER_ENB]; // eNBxUE = 8x8
|
||||
|
||||
extern unsigned char NB_INST;
|
||||
extern unsigned char NB_eNB_INST;
|
||||
extern uint16_t NB_UE_INST;
|
||||
extern uint16_t NB_THREAD_INST;
|
||||
extern unsigned char NB_RN_INST;
|
||||
extern eNB_DLSCH_INFO eNB_dlsch_info[NUMBER_OF_eNB_MAX][MAX_NUM_CCs][MAX_MOBILES_PER_ENB];
|
||||
extern int NB_UE_INST;
|
||||
|
||||
extern const int cqi_to_mcs[16];
|
||||
|
||||
extern uint32_t RRC_CONNECTION_FLAG;
|
||||
|
||||
extern uint8_t rb_table[34];
|
||||
extern rb_id_t mbms_rab_id;
|
||||
|
||||
@@ -81,4 +60,10 @@ extern SCHEDULER_MODES global_scheduler_mode;
|
||||
#include "common/ran_context.h"
|
||||
extern RAN_CONTEXT_t RC;
|
||||
extern rb_id_t mbms_rab_id;
|
||||
|
||||
static const uint32_t BSR_TABLE[BSR_TABLE_SIZE] = {0, 10, 12, 14, 17, 19, 22, 26, 31, 36, 42, 49, 57, 67, 78, 91,
|
||||
105, 125, 146, 171, 200, 234, 274, 321, 376, 440, 515, 603, 706, 826, 967, 1132,
|
||||
1326, 1552, 1817, 2127, 2490, 2915, 3413, 3995, 4677, 5467, 6411, 7505, 8787, 10287, 12043, 14099,
|
||||
16507, 19325, 22624, 26487, 31009, 36304, 42502, 49759, 58255, 68201, 79846, 93479, 109439, 128125, 150000, 300000};
|
||||
|
||||
#endif //DEF_H
|
||||
|
||||
@@ -212,11 +212,6 @@ void mac_switch_node_function(module_id_t module_idP);
|
||||
|
||||
int mac_init_global_param(void);
|
||||
|
||||
void mac_top_cleanup(void);
|
||||
|
||||
void mac_UE_out_of_sync_ind(module_id_t module_idP, frame_t frameP,
|
||||
uint16_t eNB_index);
|
||||
|
||||
void clear_nfapi_information(eNB_MAC_INST *eNB, int CC_idP,
|
||||
frame_t frameP, sub_frame_t subframeP);
|
||||
|
||||
@@ -391,10 +386,6 @@ MCH_PDU *get_mch_sdu(module_id_t Mod_id, int CC_id, frame_t frame,
|
||||
void ue_mac_reset(module_id_t module_idP, uint8_t eNB_index);
|
||||
void ue_init_mac(module_id_t module_idP);
|
||||
void init_ue_sched_info(void);
|
||||
void add_ue_ulsch_info(module_id_t module_idP, int CC_id, int UE_id,
|
||||
sub_frame_t subframe, UE_ULSCH_STATUS status);
|
||||
void add_ue_dlsch_info(module_id_t module_idP, int CC_id, int UE_id,
|
||||
sub_frame_t subframe, UE_DLSCH_STATUS status, rnti_t rnti);
|
||||
int find_UE_id(module_id_t module_idP, rnti_t rnti);
|
||||
int find_RA_id(module_id_t mod_idP, int CC_idP, rnti_t rntiP);
|
||||
rnti_t UE_RNTI(module_id_t module_idP, int UE_id);
|
||||
@@ -488,8 +479,6 @@ uint32_t req_new_ulsch(module_id_t module_idP);
|
||||
uint32_t ue_get_SR(module_id_t module_idP, int CC_id, frame_t frameP,
|
||||
uint8_t eNB_id, rnti_t rnti, sub_frame_t subframe);
|
||||
|
||||
uint8_t get_ue_weight(module_id_t module_idP, int CC_id, int UE_id);
|
||||
|
||||
// UE functions
|
||||
void mac_out_of_sync_ind(module_id_t module_idP, frame_t frameP,
|
||||
uint16_t CH_index);
|
||||
|
||||
@@ -1,141 +0,0 @@
|
||||
/*
|
||||
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The OpenAirInterface Software Alliance licenses this file to You under
|
||||
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
* except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.openairinterface.org/?page_id=698
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*-------------------------------------------------------------------------------
|
||||
* For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
|
||||
/*! \file vars.h
|
||||
* \brief mac vars
|
||||
* \author Navid Nikaein and Raymond Knopp
|
||||
* \date 2010 - 2014
|
||||
* \version 1.0
|
||||
* \email navid.nikaein@eurecom.fr
|
||||
* @ingroup _mac
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __MAC_VARS_H__
|
||||
#define __MAC_VARS_H__
|
||||
#include "PHY/defs_common.h"
|
||||
#include "mac.h"
|
||||
#include "COMMON/mac_rrc_primitives.h"
|
||||
|
||||
const uint32_t BSR_TABLE[BSR_TABLE_SIZE] = {
|
||||
0, 10, 12, 14, 17, 19, 22, 26, 31, 36, 42, 49, 57, 67, 78, 91,
|
||||
105, 125, 146, 171, 200, 234, 274, 321, 376, 440, 515, 603, 706, 826,
|
||||
967, 1132,
|
||||
1326, 1552, 1817, 2127, 2490, 2915, 3413, 3995, 4677, 5467, 6411, 7505,
|
||||
8787, 10287, 12043, 14099,
|
||||
16507, 19325, 22624, 26487, 31009, 36304, 42502, 49759, 58255, 68201,
|
||||
79846, 93479, 109439, 128125, 150000, 300000
|
||||
};
|
||||
|
||||
// extended bsr table--currently not used
|
||||
const uint32_t Extended_BSR_TABLE[BSR_TABLE_SIZE] = {
|
||||
0, 10, 13, 16, 19, 23, 29, 35, 43, 53, 65, 80, 98, 120, 147,
|
||||
181, 223, 274, 337, 414, 509, 625, 769, 945, 1162, 1429,
|
||||
1757, 2161, 2657, 3267, 4017, 4940, 6074, 7469, 9185,
|
||||
11294, 13888, 17077, 20999, 25822, 31752, 39045, 48012,
|
||||
59039, 72598, 89272, 109774, 134986, 165989, 204111,
|
||||
250990, 308634, 379519, 466683, 573866, 705666, 867737,
|
||||
1067031, 1312097, 1613447, 1984009, 2439678, 3000000,
|
||||
6000000
|
||||
};
|
||||
|
||||
//#define MAX_SIZE_OF_AGG3 576
|
||||
//#define MAX_SIZE_OF_AGG2 288
|
||||
//#define MAX_SIZE_OF_AGG1 144
|
||||
//#define MAX_SIZE_OF_AGG0 72
|
||||
|
||||
/*
|
||||
* If the CQI is low, then scheduler will use a higher aggregation level and lower aggregation level otherwise
|
||||
* this is also dependent to transmission mode, where an offset could be defined
|
||||
*/
|
||||
// the follwoing three tables are calibrated for TXMODE 1 and 2
|
||||
const uint8_t cqi2fmt0_agg[MAX_SUPPORTED_BW][CQI_VALUE_RANGE] = {
|
||||
{3, 3, 3, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0}, // 1.4_DCI0_CRC_Size= 37 bits
|
||||
//{3, 3, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0}, // 5_DCI0_CRC_SIZE = 41
|
||||
{3, 3, 3, 3, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0}, // 5_DCI0_CRC_SIZE = 41
|
||||
{3, 3, 3, 3, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0, 0}, // 10_DCI0_CRC_SIZE = 43
|
||||
{3, 3, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0} // 20_DCI0_CRC_SIZE = 44
|
||||
};
|
||||
|
||||
const uint8_t cqi2fmt1x_agg[MAX_SUPPORTED_BW][CQI_VALUE_RANGE] = {
|
||||
{3, 3, 3, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0}, // 1.4_DCI0_CRC_Size < 38 bits
|
||||
{3, 3, 3, 3, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0}, // 5_DCI0_CRC_SIZE < 43
|
||||
{3, 3, 3, 3, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0, 0}, // 10_DCI0_CRC_SIZE < 47
|
||||
{3, 3, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0} // 20_DCI0_CRC_SIZE < 55
|
||||
};
|
||||
|
||||
const uint8_t cqi2fmt2x_agg[MAX_SUPPORTED_BW][CQI_VALUE_RANGE] = {
|
||||
{3, 3, 3, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0}, // 1.4_DCI0_CRC_Size= 47 bits
|
||||
{3, 3, 3, 3, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0}, // 5_DCI0_CRC_SIZE = 55
|
||||
{3, 3, 3, 3, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0, 0}, // 10_DCI0_CRC_SIZE = 59
|
||||
{3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 1, 1, 1, 1, 0, 0} // 20_DCI0_CRC_SIZE = 64
|
||||
};
|
||||
|
||||
//uint32_t EBSR_Level[63]={0,10,13,16,19,23,29,35,43,53,65,80,98,120,147,181};
|
||||
|
||||
|
||||
uint32_t RRC_CONNECTION_FLAG;
|
||||
|
||||
UE_MAC_INST *UE_mac_inst = NULL; //[NB_MODULE_MAX];
|
||||
MAC_RLC_XFACE *Mac_rlc_xface;
|
||||
|
||||
/// Primary component carrier index of eNB
|
||||
int pCC_id[NUMBER_OF_eNB_MAX];
|
||||
|
||||
|
||||
eNB_ULSCH_INFO eNB_ulsch_info[NUMBER_OF_eNB_MAX][MAX_NUM_CCs][MAX_MOBILES_PER_ENB]; // eNBxUE = 8x8
|
||||
eNB_DLSCH_INFO eNB_dlsch_info[NUMBER_OF_eNB_MAX][MAX_NUM_CCs][MAX_MOBILES_PER_ENB]; // eNBxUE = 8x8
|
||||
|
||||
|
||||
unsigned char NB_eNB_INST = 0;
|
||||
uint16_t NB_UE_INST = 0;
|
||||
uint16_t NB_THREAD_INST = 0;
|
||||
unsigned char NB_RN_INST = 0;
|
||||
unsigned char NB_INST = 0;
|
||||
|
||||
|
||||
DCI0_5MHz_TDD_1_6_t UL_alloc_pdu;
|
||||
|
||||
DCI1A_5MHz_TDD_1_6_t DLSCH_alloc_pdu1A;
|
||||
DCI1A_5MHz_TDD_1_6_t RA_alloc_pdu;
|
||||
DCI1A_5MHz_TDD_1_6_t BCCH_alloc_pdu;
|
||||
|
||||
DCI1A_5MHz_TDD_1_6_t CCCH_alloc_pdu;
|
||||
DCI1_5MHz_TDD_t DLSCH_alloc_pdu;
|
||||
DCI1C_5MHz_t MCCH_alloc_pdu;
|
||||
|
||||
DCI0_5MHz_FDD_t UL_alloc_pdu_fdd;
|
||||
|
||||
DCI1A_5MHz_FDD_t DLSCH_alloc_pdu1A_fdd;
|
||||
DCI1A_5MHz_FDD_t RA_alloc_pdu_fdd;
|
||||
DCI1A_5MHz_FDD_t BCCH_alloc_pdu_fdd;
|
||||
|
||||
DCI1A_5MHz_FDD_t CCCH_alloc_pdu_fdd;
|
||||
DCI1_5MHz_FDD_t DLSCH_alloc_pdu_fdd;
|
||||
|
||||
DCI2_5MHz_2A_TDD_t DLSCH_alloc_pdu1;
|
||||
DCI2_5MHz_2A_TDD_t DLSCH_alloc_pdu2;
|
||||
|
||||
DCI1E_5MHz_2A_M10PRB_TDD_t DLSCH_alloc_pdu1E;
|
||||
|
||||
mac_rlc_am_muilist_t rlc_am_mui;
|
||||
SCHEDULER_MODES global_scheduler_mode;
|
||||
#endif
|
||||
@@ -249,20 +249,6 @@ int rlcmac_init_global_param(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
void mac_top_cleanup(void)
|
||||
{
|
||||
|
||||
if (NB_UE_INST > 0) {
|
||||
free(UE_mac_inst);
|
||||
}
|
||||
|
||||
if (RC.nb_macrlc_inst > 0) {
|
||||
free(RC.mac);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
int l2_init_eNB(void)
|
||||
{
|
||||
|
||||
|
||||
@@ -59,13 +59,6 @@ void dl_phy_sync_success(module_id_t module_idP, frame_t frameP, unsigned char e
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
mac_UE_out_of_sync_ind(module_id_t module_idP, frame_t frameP,
|
||||
uint16_t eNB_index) {
|
||||
// Mac_rlc_xface->mac_out_of_sync_ind(Mod_id, frameP, eNB_index);
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
mac_top_init_ue(int eMBMS_active, char *uecap_xer,
|
||||
uint8_t cba_group_active, uint8_t HO_active) {
|
||||
|
||||
Reference in New Issue
Block a user