Commit d14c95b6 authored by oai's avatar oai

J chiechun

parent c7439dcc
...@@ -1676,7 +1676,7 @@ uint32_t turbo_decoding_NB_IoT(PHY_VARS_eNB *eNB, ...@@ -1676,7 +1676,7 @@ uint32_t turbo_decoding_NB_IoT(PHY_VARS_eNB *eNB,
int x = 0; int x = 0;
LOG_N(PHY,"Show the undecoded data: "); LOG_N(PHY,"Show the undecoded data: ");
for (x = 0; x < 18; x ++) for (x = 0; x < ulsch_harq->TBS; x ++)
printf("%02x ",ulsch_harq->b[x]); printf("%02x ",ulsch_harq->b[x]);
printf("\n"); printf("\n");
fill_crc_indication_NB_IoT(eNB,0,rx_frame,rx_subframe,0); // indicate NAK to MAC fill_crc_indication_NB_IoT(eNB,0,rx_frame,rx_subframe,0); // indicate NAK to MAC
......
...@@ -56,6 +56,7 @@ int schedule_UL_NB_IoT(eNB_MAC_INST_NB_IoT *mac_inst,UE_TEMPLATE_NB_IoT *UE_info ...@@ -56,6 +56,7 @@ int schedule_UL_NB_IoT(eNB_MAC_INST_NB_IoT *mac_inst,UE_TEMPLATE_NB_IoT *UE_info
return -1; return -1;
} }
TBS=get_TBS_UL_NB_IoT(mcs,UE_info->multi_tone,Iru); TBS=get_TBS_UL_NB_IoT(mcs,UE_info->multi_tone,Iru);
LOG_I(MAC,"Initial TBS : %d UL_buffer: %d\n", TBS, UE_info->ul_total_buffer); LOG_I(MAC,"Initial TBS : %d UL_buffer: %d\n", TBS, UE_info->ul_total_buffer);
...@@ -99,6 +100,11 @@ int schedule_UL_NB_IoT(eNB_MAC_INST_NB_IoT *mac_inst,UE_TEMPLATE_NB_IoT *UE_info ...@@ -99,6 +100,11 @@ int schedule_UL_NB_IoT(eNB_MAC_INST_NB_IoT *mac_inst,UE_TEMPLATE_NB_IoT *UE_info
mcs = mapped_mcs[UE_info->CE_level][mappedMcsIndex]; mcs = mapped_mcs[UE_info->CE_level][mappedMcsIndex];
if ((UE_state_machine == rach_for_next) && (UE_info->ul_total_buffer==22))
{
mcs = 6;
}
//mcs = 2; //mcs = 2;
while((TBS<UE_info->ul_total_buffer)&&(Iru<=7)) while((TBS<UE_info->ul_total_buffer)&&(Iru<=7))
{ {
...@@ -300,7 +306,7 @@ void rx_sdu_NB_IoT(module_id_t module_id, int CC_id, frame_t frame, sub_frame_t ...@@ -300,7 +306,7 @@ void rx_sdu_NB_IoT(module_id_t module_id, int CC_id, frame_t frame, sub_frame_t
// trigger DL scheduler // trigger DL scheduler
if (UE_info != NULL) if (UE_info != NULL)
{ {
UE_info->direction = 1; //1 for DL scheduler //UE_info->direction = 1; //1 for DL scheduler
LOG_I(MAC,"After receive Msg5, change the UE scheduling direction to DL\n"); LOG_I(MAC,"After receive Msg5, change the UE scheduling direction to DL\n");
} }
}else if (UE_state_machine == rach_for_auth_rsp) }else if (UE_state_machine == rach_for_auth_rsp)
......
...@@ -120,5 +120,5 @@ extern int extend_space[2]; ...@@ -120,5 +120,5 @@ extern int extend_space[2];
extern int extend_alpha_offset[2]; extern int extend_alpha_offset[2];
extern const int si_repetition_pattern[4]; extern const int si_repetition_pattern[4];
extern int waiting_flag_from_RLC;
#endif //DEF_H #endif //DEF_H
...@@ -144,6 +144,8 @@ rach_state_t UE_state_machine = initial_access; ...@@ -144,6 +144,8 @@ rach_state_t UE_state_machine = initial_access;
const int si_repetition_pattern[4] = {20, 40, 80, 160}; const int si_repetition_pattern[4] = {20, 40, 80, 160};
int waiting_flag_from_RLC = 0;
#endif #endif
...@@ -81,6 +81,7 @@ void UL_indication_NB_IoT(UL_IND_NB_IoT_t *UL_INFO) ...@@ -81,6 +81,7 @@ void UL_indication_NB_IoT(UL_IND_NB_IoT_t *UL_INFO)
uint32_t abs_subframe; uint32_t abs_subframe;
Sched_Rsp_NB_IoT_t *SCHED_info = &mac_inst->Sched_INFO; Sched_Rsp_NB_IoT_t *SCHED_info = &mac_inst->Sched_INFO;
UE_TEMPLATE_NB_IoT *ue_info = (UE_TEMPLATE_NB_IoT *)0; UE_TEMPLATE_NB_IoT *ue_info = (UE_TEMPLATE_NB_IoT *)0;
uint16_t tmp_rnti;
enable_preamble_simulation(UL_INFO,0); enable_preamble_simulation(UL_INFO,0);
...@@ -197,6 +198,13 @@ void UL_indication_NB_IoT(UL_IND_NB_IoT_t *UL_INFO) ...@@ -197,6 +198,13 @@ void UL_indication_NB_IoT(UL_IND_NB_IoT_t *UL_INFO)
LOG_D(MAC,"IF L2 hypersfn:%d frame: %d ,subframe: %d \n",UL_INFO->hypersfn,UL_INFO->frame,UL_INFO->subframe); LOG_D(MAC,"IF L2 hypersfn:%d frame: %d ,subframe: %d \n",UL_INFO->hypersfn,UL_INFO->frame,UL_INFO->subframe);
} }
if (waiting_flag_from_RLC == 1)
{
tmp_rnti = 0x0101;
ue_info = get_ue_from_rnti(mac_inst,tmp_rnti);
ue_info->direction=1;
waiting_flag_from_RLC = 2;
}
abs_subframe = UL_INFO->hypersfn*10240+UL_INFO->frame*10+UL_INFO->subframe +4; abs_subframe = UL_INFO->hypersfn*10240+UL_INFO->frame*10+UL_INFO->subframe +4;
//abs_subframe = UL_INFO->frame*10+UL_INFO->subframe +4; //abs_subframe = UL_INFO->frame*10+UL_INFO->subframe +4;
......
...@@ -2616,6 +2616,7 @@ rlc_op_status_t rlc_data_req_NB_IoT (const protocol_ctxt_t* const ctxt_pP, ...@@ -2616,6 +2616,7 @@ rlc_op_status_t rlc_data_req_NB_IoT (const protocol_ctxt_t* const ctxt_pP,
} }
printf("\n"); printf("\n");
*/ */
waiting_flag_from_RLC = 1;
return RLC_OP_STATUS_OK; return RLC_OP_STATUS_OK;
} else { } else {
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_RLC_DATA_REQ,VCD_FUNCTION_OUT); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_RLC_DATA_REQ,VCD_FUNCTION_OUT);
......
...@@ -1115,7 +1115,7 @@ uint8_t do_RRCConnectionSetup_NB_IoT( ...@@ -1115,7 +1115,7 @@ uint8_t do_RRCConnectionSetup_NB_IoT(
//*periodicBSR_Timer = 2; // PeriodicBSR_Timer_NB_r13_pp8 //*periodicBSR_Timer = 2; // PeriodicBSR_Timer_NB_r13_pp8
//logicalChannelSR_Config = CALLOC(1,sizeof(*logicalChannelSR_Config)); //logicalChannelSR_Config = CALLOC(1,sizeof(*logicalChannelSR_Config));
mac_main_config_NB_IoT->choice.explicitValue_r13.logicalChannelSR_Config_r13->choice.setup.logicalChannelSR_ProhibitTimer_r13 = 4;//MAC_MainConfig_NB_r13__logicalChannelSR_Config_r13__setup__logicalChannelSR_ProhibitTimer_r13_pp8 mac_main_config_NB_IoT->choice.explicitValue_r13.logicalChannelSR_Config_r13->choice.setup.logicalChannelSR_ProhibitTimer_r13 = 5;//MAC_MainConfig_NB_r13__logicalChannelSR_Config_r13__setup__logicalChannelSR_ProhibitTimer_r13_pp8
mac_main_config_NB_IoT->choice.explicitValue_r13.logicalChannelSR_Config_r13->present = MAC_MainConfig_NB_r13__logicalChannelSR_Config_r13_PR_setup; mac_main_config_NB_IoT->choice.explicitValue_r13.logicalChannelSR_Config_r13->present = MAC_MainConfig_NB_r13__logicalChannelSR_Config_r13_PR_setup;
//ul_SCH_Config = CALLOC(1,sizeof(*ul_SCH_Config)); //ul_SCH_Config = CALLOC(1,sizeof(*ul_SCH_Config));
......
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