Commit 4760fa5a authored by Nick Ho's avatar Nick Ho

msg4 works, dci packing function need to revise

parent e0b60897
...@@ -411,8 +411,9 @@ int generate_eNB_dlsch_params_from_dci_NB_IoT(PHY_VARS_eNB *eNB, ...@@ -411,8 +411,9 @@ int generate_eNB_dlsch_params_from_dci_NB_IoT(PHY_VARS_eNB *eNB,
DCI_tmp = (uint8_t*)DLSCH_DCI_NB_IoT; DCI_tmp = (uint8_t*)DLSCH_DCI_NB_IoT;
DCI_flip = (uint8_t*)malloc(3*sizeof(uint8_t)); DCI_flip = (uint8_t*)malloc(3*sizeof(uint8_t));
DCI_flip[0] = 129;
DCI_flip[0] = DCI_tmp[2]*2; //DCI_flip[0] = DCI_tmp[2]*2;
DCI_flip[1] = DCI_tmp[1]*2; DCI_flip[1] = DCI_tmp[1]*2;
DCI_flip[2] = DCI_tmp[0]*2; DCI_flip[2] = DCI_tmp[0]*2;
//DCI_flip[2] = 4; //DCI_flip[2] = 4;
......
...@@ -880,7 +880,7 @@ void generate_eNB_dlsch_params_NB_IoT(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t * proc,n ...@@ -880,7 +880,7 @@ void generate_eNB_dlsch_params_NB_IoT(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t * proc,n
//parameters we don't consider pdsch config dedicated since not calling the phy config dedicated step2 //parameters we don't consider pdsch config dedicated since not calling the phy config dedicated step2
LOG_I(PHY,"Generating dlsch params for DCIN1 data and packing DCI\n"); LOG_I(PHY,"Generating dlsch params for DCIN1 data and packing DCI, res: %d\n",DCI_Content->DCIN1.ResAssign);
generate_eNB_dlsch_params_from_dci_NB_IoT(eNB, generate_eNB_dlsch_params_from_dci_NB_IoT(eNB,
frame, frame,
subframe, subframe,
......
...@@ -766,8 +766,9 @@ void schedule_msg4_NB_IoT(eNB_MAC_INST_NB_IoT *mac_inst, int abs_subframe){ ...@@ -766,8 +766,9 @@ void schedule_msg4_NB_IoT(eNB_MAC_INST_NB_IoT *mac_inst, int abs_subframe){
} }
// check msg4 resource // check msg4 resource
rep = dl_rep[msg4_nodes->ce_level]; rep = dl_rep[msg4_nodes->ce_level];
msg4_length = fill_msg4_NB_IoT_fixed(mac_inst,msg4_nodes); msg4_length = fill_msg4_NB_IoT(mac_inst,msg4_nodes);
I_mcs = get_I_mcs(msg4_nodes->ce_level); I_mcs = get_I_mcs(msg4_nodes->ce_level);
//I_mcs = 1;
I_tbs = I_mcs; I_tbs = I_mcs;
TBS = get_max_tbs(I_tbs); TBS = get_max_tbs(I_tbs);
if(TBS > msg4_length) if(TBS > msg4_length)
...@@ -986,7 +987,7 @@ int fill_msg4_NB_IoT( ...@@ -986,7 +987,7 @@ int fill_msg4_NB_IoT(
// we have three subheader here: 1 for Control element of Contention resolution, 2 for CCCH // we have three subheader here: 1 for Control element of Contention resolution, 2 for CCCH
SCH_SUBHEADER_FIXED_NB_IoT *msg4_sub_1 = (SCH_SUBHEADER_FIXED_NB_IoT*)dlsch_buffer; SCH_SUBHEADER_FIXED_NB_IoT *msg4_sub_1 = (SCH_SUBHEADER_FIXED_NB_IoT*)dlsch_buffer;
msg4_sub_1->R = 0; msg4_sub_1->R = 0;
msg4_sub_1->E = 0; msg4_sub_1->E = 1;
msg4_sub_1->LCID = UE_CONTENTION_RESOLUTION; msg4_sub_1->LCID = UE_CONTENTION_RESOLUTION;
length+=1; length+=1;
......
...@@ -180,6 +180,8 @@ int output_handler(eNB_MAC_INST_NB_IoT *mac_inst, module_id_t module_id, int CC_ ...@@ -180,6 +180,8 @@ int output_handler(eNB_MAC_INST_NB_IoT *mac_inst, module_id_t module_id, int CC_
dl_config_pdu->npdcch_pdu.npdcch_pdu_rel13.harq_ack_resource = ((DCIFormatN1_t *)DCI_pdu)->HARQackRes; dl_config_pdu->npdcch_pdu.npdcch_pdu_rel13.harq_ack_resource = ((DCIFormatN1_t *)DCI_pdu)->HARQackRes;
dl_config_pdu->npdcch_pdu.npdcch_pdu_rel13.npdcch_order_indication = ((DCIFormatN1_t *)DCI_pdu)->orderIndicator; dl_config_pdu->npdcch_pdu.npdcch_pdu_rel13.npdcch_order_indication = ((DCIFormatN1_t *)DCI_pdu)->orderIndicator;
dl_config_pdu->npdcch_pdu.npdcch_pdu_rel13.dci_subframe_repetition_number = ((DCIFormatN1_t *)DCI_pdu)->DCIRep; dl_config_pdu->npdcch_pdu.npdcch_pdu_rel13.dci_subframe_repetition_number = ((DCIFormatN1_t *)DCI_pdu)->DCIRep;
LOG_I(MAC,"[hypersfn:%2d][frame:%2d][subframe:%2d]NB-IoT fill DL DCI, res:%d\n",hypersfn,frame,subframe,dl_config_pdu->npdcch_pdu.npdcch_pdu_rel13.resource_assignment);
}else if(schedule_result_list_DL->direction == UL) // DCI for uplink }else if(schedule_result_list_DL->direction == UL) // DCI for uplink
{ {
LOG_D(MAC,"[hypersfn:%2d][frame:%2d][subframe:%2d]NB-IoT fill UL_DCI\n",hypersfn,frame,subframe); LOG_D(MAC,"[hypersfn:%2d][frame:%2d][subframe:%2d]NB-IoT fill UL_DCI\n",hypersfn,frame,subframe);
......
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