Commit a6c29b22 authored by Wolfgang A. Mozart's avatar Wolfgang A. Mozart

trigger DL scheduler

parent 32fc6310
...@@ -285,7 +285,7 @@ hashtable_rc_t hashtable_get(const hash_table_t * const hashtblP, const hash_key ...@@ -285,7 +285,7 @@ hashtable_rc_t hashtable_get(const hash_table_t * const hashtblP, const hash_key
//printf("hash %d\n", hash); //printf("hash %d\n", hash);
node=hashtblP->nodes[hash]; node=hashtblP->nodes[hash];
//printf("nodes_value %d \n", hashtblP->nodes[hash]); // printf("nodes_value %d \n", hashtblP->nodes[hash]);
while(node) { while(node) {
//printf("node_key %d \n",node->key); //printf("node_key %d \n",node->key);
......
...@@ -160,8 +160,8 @@ void eNB_dlsch_ulsch_scheduler_NB_IoT(eNB_MAC_INST_NB_IoT *mac_inst, uint32_t ab ...@@ -160,8 +160,8 @@ void eNB_dlsch_ulsch_scheduler_NB_IoT(eNB_MAC_INST_NB_IoT *mac_inst, uint32_t ab
SIB1_flag = 1; SIB1_flag = 1;
convert_system_number(abs_subframe, &h, &f, &sf); convert_system_number(abs_subframe, &h, &f, &sf);
a = output_handler(mac_inst, 0,0,h,f,sf,MIB_flag,SIB1_flag, abs_subframe); a = output_handler(mac_inst, 0,0,h,f,sf,MIB_flag,SIB1_flag, abs_subframe);
if(a==-1) if(a==-1)
LOG_I(MAC,"[%04d][SchedulerUSS] schedule result is empty------------\n", mac_inst->current_subframe); LOG_I(MAC,"[%04d][SchedulerUSS] schedule result is empty------------\n", mac_inst->current_subframe);
} }
...@@ -270,7 +270,6 @@ void schedule_uss_NB_IoT(module_id_t module_id, eNB_MAC_INST_NB_IoT *mac_inst, u ...@@ -270,7 +270,6 @@ void schedule_uss_NB_IoT(module_id_t module_id, eNB_MAC_INST_NB_IoT *mac_inst, u
UE_ID = mac_inst->UE_list_spec[UE_list_index].head; UE_ID = mac_inst->UE_list_spec[UE_list_index].head;
while(UE_ID>-1) while(UE_ID>-1)
{ {
UE_template_temp = &(mac_inst->UE_list_spec[UE_list_index].UE_template_NB_IoT[UE_ID]); UE_template_temp = &(mac_inst->UE_list_spec[UE_list_index].UE_template_NB_IoT[UE_ID]);
UE_sched_ctrl_info = &(mac_inst->UE_list_spec[UE_list_index].UE_sched_ctrl_NB_IoT[UE_ID]); UE_sched_ctrl_info = &(mac_inst->UE_list_spec[UE_list_index].UE_sched_ctrl_NB_IoT[UE_ID]);
LOG_D(MAC,"------Start Scheduling USS UE RNTI %d------\n", UE_template_temp->rnti); LOG_D(MAC,"------Start Scheduling USS UE RNTI %d------\n", UE_template_temp->rnti);
...@@ -392,10 +391,12 @@ void preprocessor_uss_NB_IoT(module_id_t module_id, eNB_MAC_INST_NB_IoT *mac_ins ...@@ -392,10 +391,12 @@ void preprocessor_uss_NB_IoT(module_id_t module_id, eNB_MAC_INST_NB_IoT *mac_ins
{ {
LOG_D(MAC,"[%04d][preprocessor_uss_NB_IoT][UE%d] DL scheduling USS is successful\n", mac_inst->current_subframe, UE_template_temp->rnti); LOG_D(MAC,"[%04d][preprocessor_uss_NB_IoT][UE%d] DL scheduling USS is successful\n", mac_inst->current_subframe, UE_template_temp->rnti);
UE_sched_ctrl_info->flag_schedule_success=1; UE_sched_ctrl_info->flag_schedule_success=1;
printf("******************after DL scheduler (success) (in eNB_scheduler_NB_IoT.c)****************\n");
} }
else else
{ {
LOG_D(MAC,"[%04d][preprocessor_uss_NB_IoT][UE%d] DL scheduling USS is failed\n", mac_inst->current_subframe, UE_template_temp->rnti); LOG_D(MAC,"[%04d][preprocessor_uss_NB_IoT][UE%d] DL scheduling USS is failed\n", mac_inst->current_subframe, UE_template_temp->rnti);
printf("**************after DL scheduler (fail) (in eNB_scheduler_NB_IoT.c)**********\n");
} }
break; break;
......
...@@ -35,6 +35,7 @@ ...@@ -35,6 +35,7 @@
/*DL scheduler*/ /*DL scheduler*/
int schedule_DL_NB_IoT(module_id_t module_id, eNB_MAC_INST_NB_IoT *mac_inst, UE_TEMPLATE_NB_IoT *UE_info, uint32_t hyperSF_start, uint32_t frame_start, uint32_t subframe_start, UE_SCHED_CTRL_NB_IoT_t *UE_sched_ctrl_info) int schedule_DL_NB_IoT(module_id_t module_id, eNB_MAC_INST_NB_IoT *mac_inst, UE_TEMPLATE_NB_IoT *UE_info, uint32_t hyperSF_start, uint32_t frame_start, uint32_t subframe_start, UE_SCHED_CTRL_NB_IoT_t *UE_sched_ctrl_info)
{ {
printf("***********************get into DL scheduler (in eNB_scheduler_dlsch_NB_IoT.c)***********************\n");
//number of candidate //number of candidate
int cdd_num; int cdd_num;
//Transport block size //Transport block size
...@@ -97,11 +98,11 @@ int schedule_DL_NB_IoT(module_id_t module_id, eNB_MAC_INST_NB_IoT *mac_inst, UE_ ...@@ -97,11 +98,11 @@ int schedule_DL_NB_IoT(module_id_t module_id, eNB_MAC_INST_NB_IoT *mac_inst, UE_
LOG_D(MAC,"[%04d][DLSchedulerUSS] Max TBS %d MCS index %d TBS index %d\n", mac_inst->current_subframe, TBS, I_mcs, I_tbs); LOG_D(MAC,"[%04d][DLSchedulerUSS] Max TBS %d MCS index %d TBS index %d\n", mac_inst->current_subframe, TBS, I_mcs, I_tbs);
/*set UE data information*/ /*set UE data information*/
/*New transmission*/ /*New transmission*/
#if 0 #if 1
if(UE_info->HARQ_round==0) if(UE_info->HARQ_round==0)
{ {
//Get RLC status //Get RLC status
/* printf("*****************UE_info->HARQ_round=%d (in eNB_scheduler_dlsch_NB_IoT.c)************************\n",UE_info->HARQ_round);
rlc_status = mac_rlc_status_ind( rlc_status = mac_rlc_status_ind(
module_id, module_id,
UE_info->rnti, UE_info->rnti,
...@@ -113,15 +114,16 @@ int schedule_DL_NB_IoT(module_id_t module_id, eNB_MAC_INST_NB_IoT *mac_inst, UE_ ...@@ -113,15 +114,16 @@ int schedule_DL_NB_IoT(module_id_t module_id, eNB_MAC_INST_NB_IoT *mac_inst, UE_
DCCH0_NB_IoT, DCCH0_NB_IoT,
0); 0);
data_size = rlc_status.bytes_in_buffer; data_size = rlc_status.bytes_in_buffer;
*/ printf("*************data_size=%d (in eNB_scheduler_dlsch_NB_IoT.c)********************\n",data_size);
data_size = 200;
/*data_size = 200;
data_size=0; data_size=0;
int ue_index; int ue_index;
for(ue_index=0;ue_index<UE_NUM_SIM;++ue_index) for(ue_index=0;ue_index<UE_NUM_SIM;++ue_index)
{ {
if(UE_info_sim[ue_index].tc_rnti==UE_info->rnti) if(UE_info_sim[ue_index].tc_rnti==UE_info->rnti)
data_size = UE_info_sim[ue_index].data_size; data_size = UE_info_sim[ue_index].data_size;
} }*/
} }
/*Retransmission*/ /*Retransmission*/
else else
...@@ -136,7 +138,7 @@ int schedule_DL_NB_IoT(module_id_t module_id, eNB_MAC_INST_NB_IoT *mac_inst, UE_ ...@@ -136,7 +138,7 @@ int schedule_DL_NB_IoT(module_id_t module_id, eNB_MAC_INST_NB_IoT *mac_inst, UE_
} }
#endif #endif
data_size=200; //for testing //data_size=200; //for testing
LOG_D(MAC,"[%04d][DLSchedulerUSS] UE data size %d\n", mac_inst->current_subframe, data_size); LOG_D(MAC,"[%04d][DLSchedulerUSS] UE data size %d\n", mac_inst->current_subframe, data_size);
//Have DCCH data //Have DCCH data
......
...@@ -189,7 +189,7 @@ void rx_sdu_NB_IoT(module_id_t module_id, int CC_id, frame_t frame, sub_frame_t ...@@ -189,7 +189,7 @@ void rx_sdu_NB_IoT(module_id_t module_id, int CC_id, frame_t frame, sub_frame_t
int PHR = 0; int PHR = 0;
int ul_total_buffer = 0; int ul_total_buffer = 0;
//mac_NB_IoT_t *mac_inst; //mac_NB_IoT_t *mac_inst;
UE_TEMPLATE_NB_IoT *UE_info; UE_TEMPLATE_NB_IoT *UE_info = NULL;
uint8_t* msg4_rrc_pdu = NULL; uint8_t* msg4_rrc_pdu = NULL;
LOG_D(MAC,"RX_SDU_IN\n"); LOG_D(MAC,"RX_SDU_IN\n");
...@@ -270,6 +270,10 @@ void rx_sdu_NB_IoT(module_id_t module_id, int CC_id, frame_t frame, sub_frame_t ...@@ -270,6 +270,10 @@ void rx_sdu_NB_IoT(module_id_t module_id, int CC_id, frame_t frame, sub_frame_t
case DCCH0_NB_IoT: case DCCH0_NB_IoT:
case DCCH1_NB_IoT: case DCCH1_NB_IoT:
LOG_I(MAC,"DCCH PDU Here\n"); LOG_I(MAC,"DCCH PDU Here\n");
if (UE_info != NULL){
UE_info->direction = 1;//for DL scheduler
printf("*************************UE_info->direction(in eNB_scheduler_ulsch_NB_IoT.c)=%d*************************\n",UE_info->direction);
}
mac_rlc_data_ind( mac_rlc_data_ind(
module_id, module_id,
rnti, rnti,
......
...@@ -348,9 +348,9 @@ mac_rlc_status_resp_t mac_rlc_status_ind( ...@@ -348,9 +348,9 @@ mac_rlc_status_resp_t mac_rlc_status_ind(
rlc_union_t *rlc_union_p = NULL; rlc_union_t *rlc_union_p = NULL;
hash_key_t key = HASHTABLE_NOT_A_KEY_VALUE; hash_key_t key = HASHTABLE_NOT_A_KEY_VALUE;
hashtable_rc_t h_rc; hashtable_rc_t h_rc;
srb_flag_t srb_flag = (channel_idP <= 2) ? SRB_FLAG_YES : SRB_FLAG_NO; srb_flag_t srb_flag = (channel_idP <= 3) ? SRB_FLAG_YES : SRB_FLAG_NO;
protocol_ctxt_t ctxt; protocol_ctxt_t ctxt;
printf("**********************get into mac_rlc_status_ind (in rlc_mac.c)*********************\n");
PROTOCOL_CTXT_SET_BY_MODULE_ID(&ctxt, module_idP, enb_flagP, rntiP, frameP, subframeP, eNB_index); PROTOCOL_CTXT_SET_BY_MODULE_ID(&ctxt, module_idP, enb_flagP, rntiP, frameP, subframeP, eNB_index);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_MAC_RLC_STATUS_IND,VCD_FUNCTION_IN); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_MAC_RLC_STATUS_IND,VCD_FUNCTION_IN);
...@@ -380,8 +380,6 @@ mac_rlc_status_resp_t mac_rlc_status_ind( ...@@ -380,8 +380,6 @@ mac_rlc_status_resp_t mac_rlc_status_ind(
#endif #endif
if (MBMS_flagP) { if (MBMS_flagP) {
if (enb_flagP) { if (enb_flagP) {
mbms_id_p = &rlc_mbms_lcid2service_session_id_eNB[module_idP][channel_idP]; mbms_id_p = &rlc_mbms_lcid2service_session_id_eNB[module_idP][channel_idP];
...@@ -442,6 +440,7 @@ mac_rlc_status_resp_t mac_rlc_status_ind( ...@@ -442,6 +440,7 @@ mac_rlc_status_resp_t mac_rlc_status_ind(
} }
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_MAC_RLC_STATUS_IND,VCD_FUNCTION_OUT); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_MAC_RLC_STATUS_IND,VCD_FUNCTION_OUT);
printf("Ready to return mac_rlc_status_resp (in rlc_mac.c)********************\n");
return mac_rlc_status_resp; return mac_rlc_status_resp;
} }
......
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