Commit efa4401e authored by Matthieu Kanj's avatar Matthieu Kanj

msg4 generation

parent f31174ee
...@@ -295,8 +295,9 @@ int generate_NDLSCH_NB_IoT(PHY_VARS_eNB *eNB, ...@@ -295,8 +295,9 @@ int generate_NDLSCH_NB_IoT(PHY_VARS_eNB *eNB,
RAR->counter_current_sf_repetition =0; RAR->counter_current_sf_repetition =0;
} else { } else {
//printf("RAR done\n");
RAR->active = 0; RAR->active = 0;
RAR->active_msg2 = 0;
done =1; done =1;
} }
...@@ -322,8 +323,9 @@ int generate_NDLSCH_NB_IoT(PHY_VARS_eNB *eNB, ...@@ -322,8 +323,9 @@ int generate_NDLSCH_NB_IoT(PHY_VARS_eNB *eNB,
if (Nsf == RAR->pointer_to_subframe) if (Nsf == RAR->pointer_to_subframe)
{ {
//printf("RAR done\n");
RAR->active = 0; RAR->active = 0;
RAR->active_msg2 = 0;
done =1; done =1;
} }
......
...@@ -238,11 +238,10 @@ void handle_nfapi_dlsch_pdu_NB_IoT(PHY_VARS_eNB *eNB, ...@@ -238,11 +238,10 @@ void handle_nfapi_dlsch_pdu_NB_IoT(PHY_VARS_eNB *eNB,
ndlsch_harq = eNB->ndlsch[(uint8_t)UE_id]->harq_process; ndlsch_harq = eNB->ndlsch[(uint8_t)UE_id]->harq_process;
AssertFatal(ndlsch_harq!=NULL,"dlsch_harq for ue specific is null\n"); AssertFatal(ndlsch_harq!=NULL,"dlsch_harq for ue specific is null\n");
ndlsch->npdsch_start_symbol = rel13->start_symbol; ndlsch->active = 1;
ndlsch_harq->pdu = sdu;
//ndlsch->active = 1;
ndlsch->rnti = rel13->rnti; // how this value is tested in line 177 ???? i am missing something ???? ndlsch->rnti = rel13->rnti; // how this value is tested in line 177 ???? i am missing something ????
ndlsch->npdsch_start_symbol = rel13->start_symbol;
ndlsch->rnti_type = rel13->rnti_type; ndlsch->rnti_type = rel13->rnti_type;
ndlsch->resource_assignment = rel13->resource_assignment ; // for NDLSCH // this value point to --> number of subframes needed ndlsch->resource_assignment = rel13->resource_assignment ; // for NDLSCH // this value point to --> number of subframes needed
...@@ -254,6 +253,9 @@ void handle_nfapi_dlsch_pdu_NB_IoT(PHY_VARS_eNB *eNB, ...@@ -254,6 +253,9 @@ void handle_nfapi_dlsch_pdu_NB_IoT(PHY_VARS_eNB *eNB,
ndlsch->counter_repetition_number = Irep_to_Nrep_x[rel13->repetition_number]; ndlsch->counter_repetition_number = Irep_to_Nrep_x[rel13->repetition_number];
ndlsch->counter_current_sf_repetition = 0; ndlsch->counter_current_sf_repetition = 0;
ndlsch->pointer_to_subframe = 0; ndlsch->pointer_to_subframe = 0;
ndlsch_harq->TBS = rel13->length;
ndlsch_harq->pdu = sdu;
} }
} }
......
...@@ -335,6 +335,7 @@ void common_signal_procedures_NB_IoT(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc) ...@@ -335,6 +335,7 @@ void common_signal_procedures_NB_IoT(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc)
{ {
NB_IoT_eNB_NPDCCH_t *npdcch_str = eNB->npdcch_DCI; NB_IoT_eNB_NPDCCH_t *npdcch_str = eNB->npdcch_DCI;
NB_IoT_eNB_NDLSCH_t *RAR = eNB->ndlsch_RAR; NB_IoT_eNB_NDLSCH_t *RAR = eNB->ndlsch_RAR;
NB_IoT_eNB_NDLSCH_t *data = eNB->ndlsch[0];
///////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////// NPDCCH //////////////////////////////////// ///////////////////////////////////// NPDCCH ////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////
...@@ -348,6 +349,8 @@ void common_signal_procedures_NB_IoT(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc) ...@@ -348,6 +349,8 @@ void common_signal_procedures_NB_IoT(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc)
///////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////// NPDSCH //////////////////////////////////// ///////////////////////////////////// NPDSCH ////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////
if(eNB->ndlsch_RAR != NULL && RAR->active_msg2 == 1)
{
generate_NDLSCH_NB_IoT(eNB, generate_NDLSCH_NB_IoT(eNB,
RAR, RAR,
txdataF, txdataF,
...@@ -356,6 +359,17 @@ void common_signal_procedures_NB_IoT(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc) ...@@ -356,6 +359,17 @@ void common_signal_procedures_NB_IoT(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc)
frame, frame,
subframe, subframe,
RB_IoT_ID); RB_IoT_ID);
} else if(eNB->ndlsch[0] != NULL) {
generate_NDLSCH_NB_IoT(eNB,
data,
txdataF,
AMP,
fp,
frame,
subframe,
RB_IoT_ID);
}
/////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////
} }
......
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