Commit c641f334 authored by Wu Jing's avatar Wu Jing
Browse files

fix total usable RBs when pucch rb=6

parent 19a2b37c
......@@ -876,9 +876,9 @@ int RCconfig_RRC(MessageDef *msg_p, uint32_t i, eNB_RRC_INST *rrc) {
AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for prach_freq_offset choice: 2(N_RB_DL %d)!\n",
RC.config_file_name, i, prach_freq_offset,N_RB_DL);
if (((N_RB_DL == 50) || (N_RB_DL == 100)) && (prach_freq_offset != 3))
if (((N_RB_DL == 50) || (N_RB_DL == 100)) && (prach_freq_offset < 3))
AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for prach_freq_offset choice: 3(N_RB_DL %d)!\n",
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for prach_freq_offset choice: 3,4(N_RB_DL %d)!\n",
RC.config_file_name, i, prach_freq_offset,N_RB_DL);
#endif
......
......@@ -1710,6 +1710,7 @@ void schedule_ulsch_rnti(module_id_t module_idP,
hi_dci0_req = &eNB->HI_DCI0_req[CC_id][subframeP].hi_dci0_request_body;
eNB->HI_DCI0_req[CC_id][subframeP].sfn_sf = (frameP<<4)+subframeP;
ul_req_tmp = &eNB->UL_req_tmp[CC_id][sched_subframeP].ul_config_request_body;
nfapi_ul_config_request_t *ul_req = &eNB->UL_req_tmp[CC_id][sched_subframeP];
ULSCH_first_end = 0;
cc = &eNB->common_channels[CC_id];
......@@ -1959,6 +1960,12 @@ void schedule_ulsch_rnti(module_id_t module_idP,
#endif
ul_req_tmp->number_of_pdus++;
eNB->ul_handle++;
ul_req->header.message_id = NFAPI_UL_CONFIG_REQUEST;
ul_req_tmp->tl.tag = NFAPI_UL_CONFIG_REQUEST_BODY_TAG;
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,
......@@ -2096,6 +2103,10 @@ void schedule_ulsch_rnti(module_id_t module_idP,
#endif
ul_req_tmp->number_of_pdus++;
eNB->ul_handle++;
ul_req->header.message_id = NFAPI_UL_CONFIG_REQUEST;
ul_req_tmp->tl.tag = NFAPI_UL_CONFIG_REQUEST_BODY_TAG;
ul_req->sfn_sf = sched_frame<<4|sched_subframeP;
LOG_D(MAC,"[eNB %d] CC_id %d Frame %d, subframeP %d: Generated ULSCH DCI for next UE_id %d, format 0(round >0)\n", module_idP,CC_id,frameP,subframeP,UE_id);
// increment first rb for next UE allocation
......
......@@ -2700,6 +2700,7 @@ void ulsch_scheduler_pre_processor(module_id_t module_idP,
int16_t tx_power;
int UE_id;
rnti_t rnti;
COMMON_channels_t *cc;
LOG_D(MAC,"In ulsch_preprocessor: ulsch ue select\n");
//ue select
ulsch_scheduler_pre_ue_select(module_idP,frameP,subframeP,sched_subframeP,ulsch_ue_select);
......@@ -2730,22 +2731,51 @@ void ulsch_scheduler_pre_processor(module_id_t module_idP,
}
rnti = UE_RNTI(CC_id,UE_id);
if(frame_parms->N_RB_UL == 25){
if ( first_rb[CC_id] >= frame_parms->N_RB_UL-1 ){
LOG_W(MAC,"[eNB %d] frame %d subframe %d, UE %d/%x CC %d: dropping, not enough RBs\n",
module_idP,frameP,subframeP,UE_id,rnti,CC_id);
break;
cc = &RC.mac[module_idP]->common_channels[CC_id];
if (cc->tdd_Config) {
if (frame_parms->N_RB_UL == 25) {
if (first_rb[CC_id] >= frame_parms->N_RB_UL-1 ) {
LOG_W(MAC,"[eNB %d] frame %d subframe %d, UE %d/%x CC %d: dropping, not enough RBs\n",
module_idP,frameP,subframeP,UE_id,rnti,CC_id);
break;
}
// calculate the average rb ( remain UE)
total_rbs = frame_parms->N_RB_UL-1-first_rb[CC_id];
} else if (frame_parms->N_RB_UL == 50) {
if (first_rb[CC_id] >= frame_parms->N_RB_UL-2 ) {
LOG_W(MAC,"[eNB %d] frame %d subframe %d, UE %d/%x CC %d: dropping, not enough RBs\n",
module_idP,frameP,subframeP,UE_id,rnti,CC_id);
break;
}
// calculate the average rb ( remain UE)
total_rbs = frame_parms->N_RB_UL-1-first_rb[CC_id];
}else{
if ( first_rb[CC_id] >= frame_parms->N_RB_UL-2 ){
total_rbs = frame_parms->N_RB_UL-2-first_rb[CC_id];
} else {
if (first_rb[CC_id] >= frame_parms->N_RB_UL-3 ) {
LOG_W(MAC,"[eNB %d] frame %d subframe %d, UE %d/%x CC %d: dropping, not enough RBs\n",
module_idP,frameP,subframeP,UE_id,rnti,CC_id);
break;
}
// calculate the average rb ( remain UE)
total_rbs = frame_parms->N_RB_UL-3-first_rb[CC_id];
}
} else {
if(frame_parms->N_RB_UL == 25){
if ( first_rb[CC_id] >= frame_parms->N_RB_UL-1 ){
LOG_W(MAC,"[eNB %d] frame %d subframe %d, UE %d/%x CC %d: dropping, not enough RBs\n",
module_idP,frameP,subframeP,UE_id,rnti,CC_id);
break;
break;
}
// calculate the average rb ( remain UE)
total_rbs = frame_parms->N_RB_UL-1-first_rb[CC_id];
}else{
if ( first_rb[CC_id] >= frame_parms->N_RB_UL-2 ){
LOG_W(MAC,"[eNB %d] frame %d subframe %d, UE %d/%x CC %d: dropping, not enough RBs\n",
module_idP,frameP,subframeP,UE_id,rnti,CC_id);
break;
}
// calculate the average rb ( remain UE)
total_rbs = frame_parms->N_RB_UL-2-first_rb[CC_id];
}
// calculate the average rb ( remain UE)
total_rbs = frame_parms->N_RB_UL-2-first_rb[CC_id];
}
average_rbs = (int)round((double)total_rbs/(double)ue_num_temp);
if ( average_rbs < 3 ) {
......
......@@ -550,7 +550,7 @@ rlc_am_mac_status_indication (
}
rlc->last_absolute_subframe_status_indication = PROTOCOL_CTXT_TIME_MILLI_SECONDS(ctxt_pP);
if (tb_sizeP > 0)
rlc->nb_bytes_requested_by_mac = tb_sizeP;
status_resp.buffer_occupancy_in_bytes = rlc_am_get_buffer_occupancy_in_bytes(ctxt_pP, rlc);
......
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