Commit 9deb0c0a authored by hscuser's avatar hscuser

Merge branch 'issue_19' into Issue_19_Unified

parents 9fbe6d9e 4335fb63
...@@ -154,7 +154,7 @@ generate_dlsch_header(unsigned char *mac_header, ...@@ -154,7 +154,7 @@ generate_dlsch_header(unsigned char *mac_header,
AssertFatal(timing_advance_cmd < 64, "timing_advance_cmd %d > 63\n", AssertFatal(timing_advance_cmd < 64, "timing_advance_cmd %d > 63\n",
timing_advance_cmd); timing_advance_cmd);
((TIMING_ADVANCE_CMD *) ce_ptr)->TA = timing_advance_cmd; //(timing_advance_cmd+31)&0x3f; ((TIMING_ADVANCE_CMD *) ce_ptr)->TA = timing_advance_cmd; //(timing_advance_cmd+31)&0x3f;
LOG_D(MAC, "timing advance =%d (%d)\n", LOG_A(MAC, "timing advance =%d (%d)\n",
timing_advance_cmd, timing_advance_cmd,
((TIMING_ADVANCE_CMD *) ce_ptr)->TA); ((TIMING_ADVANCE_CMD *) ce_ptr)->TA);
ce_ptr += sizeof(TIMING_ADVANCE_CMD); ce_ptr += sizeof(TIMING_ADVANCE_CMD);
...@@ -818,7 +818,7 @@ schedule_ue_spec(module_id_t module_idP, ...@@ -818,7 +818,7 @@ schedule_ue_spec(module_id_t module_idP,
ta_update = ue_sched_ctrl->ta_update; ta_update = ue_sched_ctrl->ta_update;
/* if we send TA then set timer to not send it for a while */ /* if we send TA then set timer to not send it for a while */
if (ta_update != 31) { if (ta_update != 31 && (RC.ss.mode == SS_ENB)) {
ue_sched_ctrl->ta_timer = 20; ue_sched_ctrl->ta_timer = 20;
} }
...@@ -827,6 +827,21 @@ schedule_ue_spec(module_id_t module_idP, ...@@ -827,6 +827,21 @@ schedule_ue_spec(module_id_t module_idP,
ue_sched_ctrl->ta_update_f = 31.0; ue_sched_ctrl->ta_update_f = 31.0;
} }
if(RC.ss.mode == SS_SOFTMODEM )
{
if(ue_sched_ctrl->ta_timer == 100)
{
ta_update = 2;
ue_sched_ctrl->ta_timer =0 ;
LOG_D(MAC,"TA scheduled SFN %d SF %d\n",frameP,subframeP);
}
else
{
ue_sched_ctrl->ta_timer++;
ta_update = 31;
ue_sched_ctrl->ta_update = 31;
}
}
int ta_len = (ta_update != 31) ? 2 : 0; int ta_len = (ta_update != 31) ? 2 : 0;
...@@ -1368,7 +1383,7 @@ schedule_ue_spec_br(module_id_t module_idP, ...@@ -1368,7 +1383,7 @@ schedule_ue_spec_br(module_id_t module_idP,
ta_update = ue_sched_ctl->ta_update; ta_update = ue_sched_ctl->ta_update;
/* If we send TA then set timer to not send it for a while */ /* If we send TA then set timer to not send it for a while */
if (ta_update != 31) if (ta_update != 31)
ue_sched_ctl->ta_timer = 20; ue_sched_ctl->ta_timer = 20;
/* Reset ta_update */ /* Reset ta_update */
...@@ -1377,6 +1392,7 @@ schedule_ue_spec_br(module_id_t module_idP, ...@@ -1377,6 +1392,7 @@ schedule_ue_spec_br(module_id_t module_idP,
} else { } else {
ta_update = 31; ta_update = 31;
} }
ta_len = (ta_update != 31) ? 2 : 0; ta_len = (ta_update != 31) ? 2 : 0;
header_len_dcch = 2; // 2 bytes DCCH SDU subheader header_len_dcch = 2; // 2 bytes DCCH SDU subheader
......
...@@ -1631,7 +1631,12 @@ schedule_ulsch_rnti(module_id_t module_idP, ...@@ -1631,7 +1631,12 @@ schedule_ulsch_rnti(module_id_t module_idP,
} }
const uint8_t ndi = 1 - UE_template_ptr->oldNDI_UL[harq_pid]; // NDI: new data indicator const uint8_t ndi = 1 - UE_template_ptr->oldNDI_UL[harq_pid]; // NDI: new data indicator
// Changed pre_assigned_mcs_ul for sending full SDU to UE on DRB in System Simulator Mode
if (RC.ss.mode == SS_SOFTMODEM){
UE_template_ptr->pre_assigned_mcs_ul = 16;
}
const uint8_t mcs = UE_template_ptr->pre_assigned_mcs_ul; const uint8_t mcs = UE_template_ptr->pre_assigned_mcs_ul;
UE_template_ptr->oldNDI_UL[harq_pid] = ndi; UE_template_ptr->oldNDI_UL[harq_pid] = ndi;
UE_info->eNB_UE_stats[CC_id][UE_id].ulsch_rounds[0]++; UE_info->eNB_UE_stats[CC_id][UE_id].ulsch_rounds[0]++;
UE_info->eNB_UE_stats[CC_id][UE_id].snr = snr; UE_info->eNB_UE_stats[CC_id][UE_id].snr = snr;
...@@ -1651,7 +1656,7 @@ schedule_ulsch_rnti(module_id_t module_idP, ...@@ -1651,7 +1656,7 @@ schedule_ulsch_rnti(module_id_t module_idP,
UE_sched_ctrl_ptr->dci0_ongoing_timer = 1; UE_sched_ctrl_ptr->dci0_ongoing_timer = 1;
} }
uint8_t rb_table_index = UE_template_ptr->pre_allocated_rb_table_index_ul; uint8_t rb_table_index = 10;//UE_template_ptr->pre_allocated_rb_table_index_ul;
UE_info->eNB_UE_stats[CC_id][UE_id].ulsch_mcs2 = mcs; UE_info->eNB_UE_stats[CC_id][UE_id].ulsch_mcs2 = mcs;
...@@ -1686,13 +1691,14 @@ schedule_ulsch_rnti(module_id_t module_idP, ...@@ -1686,13 +1691,14 @@ schedule_ulsch_rnti(module_id_t module_idP,
/* Adjust scheduled UL bytes by TBS, wait for UL sdus to do final update */ /* Adjust scheduled UL bytes by TBS, wait for UL sdus to do final update */
LOG_D(MAC, LOG_D(MAC,
"[eNB %d] CC_id %d UE %d/%x : adjusting scheduled_ul_bytes, old " "[eNB %d] CC_id %d UE %d/%x : adjusting scheduled_ul_bytes, old "
"%d, TBS %d\n", "%d, TBS %d rb_idx %d\n",
module_idP, module_idP,
CC_id, CC_id,
UE_id, UE_id,
rnti, rnti,
UE_template_ptr->scheduled_ul_bytes, UE_template_ptr->scheduled_ul_bytes,
UE_template_ptr->TBS_UL[harq_pid]); UE_template_ptr->TBS_UL[harq_pid],
rb_table_index);
UE_template_ptr->scheduled_ul_bytes += UE_template_ptr->TBS_UL[harq_pid]; UE_template_ptr->scheduled_ul_bytes += UE_template_ptr->TBS_UL[harq_pid];
LOG_D(MAC, LOG_D(MAC,
"scheduled_ul_bytes, new %d\n", "scheduled_ul_bytes, new %d\n",
......
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