Commit efa4401e authored by Matthieu Kanj's avatar Matthieu Kanj

msg4 generation

parent f31174ee
...@@ -237,7 +237,7 @@ int generate_NDLSCH_NB_IoT(PHY_VARS_eNB *eNB, ...@@ -237,7 +237,7 @@ int generate_NDLSCH_NB_IoT(PHY_VARS_eNB *eNB,
uint32_t counter_sf_rep = RAR->counter_current_sf_repetition; /// for identifiying when to trigger new scrambling uint32_t counter_sf_rep = RAR->counter_current_sf_repetition; /// for identifiying when to trigger new scrambling
uint32_t pointer_to_sf = RAR->pointer_to_subframe; /// to identify wich encoded subframe to transmit uint32_t pointer_to_sf = RAR->pointer_to_subframe; /// to identify wich encoded subframe to transmit
int G = get_G_NB_IoT(frame_parms); int G = get_G_NB_IoT(frame_parms);
uint8_t Nsf = RAR->number_of_subframes_for_resource_assignment; uint8_t Nsf = RAR->number_of_subframes_for_resource_assignment;
//LOG_I(PHY,"[Frame: %d][Subframe: %d]sent RAR, rep : %d, counter_rep:%d, Num_res:%d\n",frame,subframe,rep,counter_rep,Nsf); //LOG_I(PHY,"[Frame: %d][Subframe: %d]sent RAR, rep : %d, counter_rep:%d, Num_res:%d\n",frame,subframe,rep,counter_rep,Nsf);
...@@ -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;
} }
......
...@@ -234,15 +234,14 @@ void handle_nfapi_dlsch_pdu_NB_IoT(PHY_VARS_eNB *eNB, ...@@ -234,15 +234,14 @@ void handle_nfapi_dlsch_pdu_NB_IoT(PHY_VARS_eNB *eNB,
//UE_id = find_ue_NB_IoT(rel13->rnti,eNB); //UE_id = find_ue_NB_IoT(rel13->rnti,eNB);
//AssertFatal(UE_id==-1,"no existing ue specific dlsch_context\n"); //AssertFatal(UE_id==-1,"no existing ue specific dlsch_context\n");
ndlsch = eNB->ndlsch[(uint8_t)UE_id]; ndlsch = eNB->ndlsch[(uint8_t)UE_id];
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;
} }
} }
......
...@@ -333,8 +333,9 @@ void common_signal_procedures_NB_IoT(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc) ...@@ -333,8 +333,9 @@ void common_signal_procedures_NB_IoT(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc)
if( (subframe != 0) && (subframe != 5) && (nsss_state != 1) && (fp->flag_free_sf == 0) ) if( (subframe != 0) && (subframe != 5) && (nsss_state != 1) && (fp->flag_free_sf == 0) )
{ {
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,14 +349,27 @@ void common_signal_procedures_NB_IoT(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc) ...@@ -348,14 +349,27 @@ void common_signal_procedures_NB_IoT(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc)
///////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////// NPDSCH //////////////////////////////////// ///////////////////////////////////// NPDSCH ////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////
generate_NDLSCH_NB_IoT(eNB, if(eNB->ndlsch_RAR != NULL && RAR->active_msg2 == 1)
RAR, {
txdataF, generate_NDLSCH_NB_IoT(eNB,
AMP, RAR,
fp, txdataF,
frame, AMP,
subframe, fp,
RB_IoT_ID); frame,
subframe,
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