revert modification of pre_scd and reduce of LC channel number

This commit is contained in:
Xu Bo
2018-01-16 16:41:18 +09:00
parent 6acfbe21e1
commit 3e550e02ef
9 changed files with 3 additions and 316 deletions
-2
View File
@@ -760,7 +760,6 @@ eNB_dlsch_ulsch_scheduler(module_id_t module_idP, frame_t frameP,
}
#if (!defined(UE_EXPANSION_SIM2)) &&(!defined(UE_EXPANSION))
PROTOCOL_CTXT_SET_BY_MODULE_ID(&ctxt, module_idP, ENB_FLAG_YES,
NOT_A_RNTI, frameP, subframeP,
module_idP);
@@ -768,7 +767,6 @@ eNB_dlsch_ulsch_scheduler(module_id_t module_idP, frame_t frameP,
rrc_rx_tx(&ctxt, 0, // eNB index, unused in eNB
CC_id);
#endif
#if defined(Rel10) || defined(Rel14)
+1 -5
View File
@@ -1048,12 +1048,8 @@ schedule_ue_spec(module_id_t module_idP,
header_len_dtch = 0;
header_len_dtch_last = 0; // the header length of the last mac sdu
// lcid has to be sorted before the actual allocation (similar struct as ue_list).
#if defined(UE_EXPANSION) || defined(UE_EXPANSION_SIM2)
lcid = DTCH;
{
#else
for (lcid = NB_RB_MAX - 1; lcid >= DTCH; lcid--) {
#endif
// TBD: check if the lcid is active
header_len_dtch += 3;
-12
View File
@@ -107,16 +107,4 @@ extern int last_dlsch_ue_id[MAX_NUM_CCs];
extern int last_ulsch_ue_id[MAX_NUM_CCs];
#endif
#if defined(UE_EXPANSION) || defined(UE_EXPANSION_SIM2)
extern uint16_t pre_nb_rbs_required[2][MAX_NUM_CCs][NUMBER_OF_UE_MAX];
extern uint8_t dlsch_ue_select_tbl_in_use;
extern uint8_t new_dlsch_ue_select_tbl_in_use;
extern boolean_t pre_scd_activeUE[NUMBER_OF_UE_MAX];
extern eNB_UE_STATS pre_scd_eNB_UE_stats[MAX_NUM_CCs][NUMBER_OF_UE_MAX];
/// sorted downlink component carrier for the scheduler
extern int pre_scd_ordered_CCids[MAX_NUM_CCs][NUMBER_OF_UE_MAX];
/// number of downlink active component carrier
extern int pre_scd_numactiveCCs[NUMBER_OF_UE_MAX];
#endif
#endif //DEF_H
+1 -163
View File
@@ -119,11 +119,8 @@ store_dlsch_buffer(module_id_t Mod_id, frame_t frameP,
rnti = UE_RNTI(Mod_id, UE_id);
#if defined(UE_EXPANSION) || defined(UE_EXPANSION_SIM2)
for (i = DCCH; i <=DTCH; i++) { // loop over DCCH, DCCH1 and DTCH
#else
for (i = 0; i < MAX_NUM_LCID; i++) { // loop over all the logical channels
#endif
rlc_status =
mac_rlc_status_ind(Mod_id, rnti, Mod_id, frameP, subframeP,
@@ -547,161 +544,6 @@ void sort_UEs(module_id_t Mod_idP, int frameP, sub_frame_t subframeP)
#endif
}
#if defined(UE_EXPANSION) || defined(UE_EXPANSION_SIM2)
void pre_scd_nb_rbs_required( module_id_t module_idP,
frame_t frameP,
sub_frame_t subframeP,
int min_rb_unit[MAX_NUM_CCs],
uint16_t nb_rbs_required[MAX_NUM_CCs][NUMBER_OF_UE_MAX])
{
int CC_id,UE_id, lc_id,i, j, tmp, N_RB_DL;;
UE_TEMPLATE UE_template;
eNB_UE_STATS *eNB_UE_stats, *eNB_UE_stats_i, *eNB_UE_stats_j;
rnti_t rnti;
mac_rlc_status_resp_t rlc_status;
uint16_t TBS = 0;
memset(nb_rbs_required, 0, sizeof(uint16_t)*MAX_NUM_CCs*NUMBER_OF_UE_MAX);
for (UE_id = 0; UE_id <NUMBER_OF_UE_MAX; UE_id++) {
if (pre_scd_activeUE[UE_id] != TRUE)
continue;
// store dlsch buffer
// clear logical channel interface variables
UE_template.dl_buffer_total = 0;
UE_template.dl_pdus_total = 0;
rnti = UE_RNTI(module_idP, UE_id);
for (lc_id = DCCH; lc_id <= DTCH; lc_id++) {
UE_template.dl_buffer_info[lc_id] = 0;
UE_template.dl_pdus_in_buffer[lc_id] = 0;
UE_template.dl_buffer_head_sdu_creation_time[lc_id] = 0;
UE_template.dl_buffer_head_sdu_remaining_size_to_send[lc_id] = 0;
rlc_status =
mac_rlc_status_ind(module_idP, rnti, module_idP, frameP, subframeP,
ENB_FLAG_YES, MBMS_FLAG_NO, lc_id, 0);
UE_template.dl_buffer_info[lc_id] = rlc_status.bytes_in_buffer; //storing the dlsch buffer for each logical channel
UE_template.dl_pdus_in_buffer[lc_id] = rlc_status.pdus_in_buffer;
UE_template.dl_buffer_head_sdu_creation_time[lc_id] = rlc_status.head_sdu_creation_time;
UE_template.dl_buffer_head_sdu_creation_time_max =
cmax(UE_template.dl_buffer_head_sdu_creation_time_max,
rlc_status.head_sdu_creation_time);
UE_template.dl_buffer_head_sdu_remaining_size_to_send[lc_id] =
rlc_status.head_sdu_remaining_size_to_send;
UE_template.dl_buffer_head_sdu_is_segmented[lc_id] = rlc_status.head_sdu_is_segmented;
UE_template.dl_buffer_total += UE_template.dl_buffer_info[lc_id]; //storing the total dlsch buffer
UE_template.dl_pdus_total += UE_template.dl_pdus_in_buffer[lc_id];
#ifdef DEBUG_eNB_SCHEDULER
/* note for dl_buffer_head_sdu_remaining_size_to_send[i] :
* 0 if head SDU has not been segmented (yet), else remaining size not already segmented and sent
*/
if (UE_template.dl_buffer_info[lc_id] > 0)
LOG_D(MAC,
"[eNB %d] Frame %d Subframe %d : RLC status for UE %d %x in LCID%d: total of %d pdus and size %d, head sdu queuing time %d, remaining size %d, is segmeneted %d \n",
module_idP, frameP, subframeP, UE_id, rnti,
lc_id, UE_template.dl_pdus_in_buffer[lc_id],
UE_template.dl_buffer_info[lc_id],
UE_template.dl_buffer_head_sdu_creation_time[lc_id],
UE_template.
dl_buffer_head_sdu_remaining_size_to_send[lc_id],
UE_template.dl_buffer_head_sdu_is_segmented[lc_id]);
#endif
}
if (UE_template.dl_buffer_total > 0)
LOG_D(MAC,
"[eNB %d] Frame %d Subframe %d : RLC status for UE %d %x: total DL buffer size %d and total number of pdu %d \n",
module_idP, frameP, subframeP, UE_id,rnti,
UE_template.dl_buffer_total,
UE_template.dl_pdus_total);
// end of store dlsch buffer
// assgin rbs required
// Calculate the number of RBs required by each UE on the basis of logical channel's buffer
//update CQI information across component carriers
for (i = 0; i < pre_scd_numactiveCCs[UE_id]; i++) {
CC_id = pre_scd_ordered_CCids[i][UE_id];
eNB_UE_stats = &pre_scd_eNB_UE_stats[CC_id][UE_id];
eNB_UE_stats->dlsch_mcs1 = 28;
}
// provide the list of CCs sorted according to MCS
for (i = 0; i < pre_scd_numactiveCCs[UE_id]; i++) {
eNB_UE_stats_i =
&pre_scd_eNB_UE_stats[pre_scd_ordered_CCids[i][UE_id]][UE_id];
for (j = i + 1; j < pre_scd_numactiveCCs[UE_id]; j++) {
DevAssert(j < MAX_NUM_CCs);
eNB_UE_stats_j =
&pre_scd_eNB_UE_stats[pre_scd_ordered_CCids[j][UE_id]][UE_id];
if (eNB_UE_stats_j->dlsch_mcs1
> eNB_UE_stats_i->dlsch_mcs1) {
tmp = pre_scd_ordered_CCids[i][UE_id];
pre_scd_ordered_CCids[i][UE_id] =
pre_scd_ordered_CCids[j][UE_id];
pre_scd_ordered_CCids[j][UE_id] = tmp;
}
}
}
if (UE_template.dl_buffer_total > 0) {
LOG_D(MAC, "[preprocessor] assign RB for UE %d\n", UE_id);
for (i = 0; i < pre_scd_numactiveCCs[UE_id]; i++) {
CC_id = pre_scd_ordered_CCids[i][UE_id];
eNB_UE_stats = &pre_scd_eNB_UE_stats[CC_id][UE_id];
if (eNB_UE_stats->dlsch_mcs1 == 0) {
nb_rbs_required[CC_id][UE_id] = 4; // don't let the TBS get too small
} else {
nb_rbs_required[CC_id][UE_id] =
min_rb_unit[CC_id];
}
TBS = get_TBS_DL(eNB_UE_stats->dlsch_mcs1,
nb_rbs_required[CC_id][UE_id]);
LOG_D(MAC,
"[preprocessor] start RB assignement for UE %d CC_id %d dl buffer %d (RB unit %d, MCS %d, TBS %d) \n",
UE_id, CC_id,
UE_template.dl_buffer_total,
nb_rbs_required[CC_id][UE_id],
eNB_UE_stats->dlsch_mcs1, TBS);
N_RB_DL =
to_prb(
RC.mac[module_idP]->common_channels[CC_id].mib->message.dl_Bandwidth);
/* calculating required number of RBs for each UE */
while (TBS
< UE_template.dl_buffer_total) {
nb_rbs_required[CC_id][UE_id] +=
min_rb_unit[CC_id];
if (nb_rbs_required[CC_id][UE_id] > N_RB_DL) {
TBS = get_TBS_DL(eNB_UE_stats->dlsch_mcs1, N_RB_DL);
nb_rbs_required[CC_id][UE_id] = N_RB_DL;
break;
}
TBS = get_TBS_DL(eNB_UE_stats->dlsch_mcs1,
nb_rbs_required[CC_id][UE_id]);
} // end of while
LOG_D(MAC,
"[eNB %d] Frame %d Subframe %d: UE %d on CC %d: RB unit %d, nb_required RB %d (TBS %d, mcs %d)\n",
module_idP, frameP, subframeP, UE_id, CC_id,
min_rb_unit[CC_id],
nb_rbs_required[CC_id][UE_id], TBS,
eNB_UE_stats->dlsch_mcs1);
}
}
}
}
#endif
#ifdef UE_EXPANSION
int cc_id_end(uint8_t *cc_id_flag )
{
@@ -1165,7 +1007,6 @@ void dlsch_scheduler_pre_processor (module_id_t Mod_id,
}
}
#if (!defined(UE_EXPANSION_SIM2)) &&(!defined(UE_EXPANSION))
// Store the DLSCH buffer for each logical channel
store_dlsch_buffer(Mod_id, frameP, subframeP);
@@ -1174,9 +1015,6 @@ void dlsch_scheduler_pre_processor (module_id_t Mod_id,
// Calculate the number of RBs required by each UE on the basis of logical channel's buffer
assign_rbs_required(Mod_id, frameP, subframeP, nb_rbs_required,
min_rb_unit);
#else
memcpy(nb_rbs_required, pre_nb_rbs_required[dlsch_ue_select_tbl_in_use] , sizeof(uint16_t)*MAX_NUM_CCs*NUMBER_OF_UE_MAX);
#endif
#ifdef UE_EXPANSION
dlsch_scheduler_pre_ue_select(Mod_id,frameP,subframeP, mbsfn_flag,nb_rbs_required,dlsch_ue_select);
-7
View File
@@ -227,13 +227,6 @@ void dlsch_scheduler_pre_processor_allocate (module_id_t Mod_id,
unsigned char rballoc_sub[MAX_NUM_CCs][N_RBG_MAX],
unsigned char MIMO_mode_indicator[MAX_NUM_CCs][N_RBG_MAX]);
#if defined(UE_EXPANSION) || defined(UE_EXPANSION_SIM2)
void pre_scd_nb_rbs_required(module_id_t module_idP,
frame_t frameP,
sub_frame_t subframeP,
int min_rb_unit[MAX_NUM_CCs],
uint16_t nb_rbs_required[MAX_NUM_CCs][NUMBER_OF_UE_MAX]);
#endif
/* \brief Function to trigger the eNB scheduling procedure. It is called by PHY at the beginning of each subframe, \f$n$\f
and generates all DLSCH allocations for subframe \f$n\f$ and ULSCH allocations for subframe \f$n+k$\f.
@param Mod_id Instance ID of eNB
-12
View File
@@ -151,16 +151,4 @@ int last_dlsch_ue_id[MAX_NUM_CCs] = {-1};
int last_ulsch_ue_id[MAX_NUM_CCs] = {-1};
#endif
#if defined(UE_EXPANSION) || defined(UE_EXPANSION_SIM2)
uint16_t pre_nb_rbs_required[2][MAX_NUM_CCs][NUMBER_OF_UE_MAX];
uint8_t dlsch_ue_select_tbl_in_use;
uint8_t new_dlsch_ue_select_tbl_in_use;
boolean_t pre_scd_activeUE[NUMBER_OF_UE_MAX];
eNB_UE_STATS pre_scd_eNB_UE_stats[MAX_NUM_CCs][NUMBER_OF_UE_MAX];
/// sorted downlink component carrier for the scheduler
int pre_scd_ordered_CCids[MAX_NUM_CCs][NUMBER_OF_UE_MAX];
/// number of downlink active component carrier
int pre_scd_numactiveCCs[NUMBER_OF_UE_MAX];
#endif
#endif