Commit 901d02ef authored by Matthieu Kanj's avatar Matthieu Kanj

bug fix

parent 7a2f8749
......@@ -317,9 +317,10 @@ int generate_NDLSCH_NB_IoT(NB_IoT_eNB_NDLSCH_t *RAR,
return(done);
}
/////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////
/*int generate_NDCCH_NB_IoT(NB_IoT_eNB_NPDCCH_t *DCI,
/*int generate_NPDCCH_NB_IoT(NB_IoT_eNB_NPDCCH_t *DCI,
int32_t **txdataF,
int16_t amp,
LTE_DL_FRAME_PARMS *frame_parms,
......@@ -329,116 +330,80 @@ int generate_NDLSCH_NB_IoT(NB_IoT_eNB_NDLSCH_t *RAR,
{
int done=0;
uint8_t *DCI = RAR->harq_process->pdu;
uint32_t rep = RAR->repetition_number;
uint8_t *DCI_pdu = DCI->pdu;
uint32_t rep = DCI->repetition_number;
uint8_t eutro_control_region = 3;
uint32_t counter_rep = RAR->counter_repetition_number;
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 counter_rep = DCI->counter_repetition_number;
uint32_t counter_sf_rep = DCI->counter_current_sf_repetition; /// for identifiying when to trigger new scrambling
uint32_t pointer_to_sf = DCI->pointer_to_subframe; /// to identify wich encoded subframe to transmit
if( RAR->active == 1 )
if( DCI->active == 1 )
{
int G = get_G_NB_IoT(frame_parms);
uint8_t Nsf = RAR->number_of_subframes_for_resource_assignment;
uint8_t Nsf = DCI->number_of_subframes_for_resource_assignment;
if( (counter_rep == rep) && (counter_sf_rep == 0) && (pointer_to_sf == 0) )
{
dlsch_encoding_NB_IoT(RAR_pdu,
RAR,
dlsch_encoding_NB_IoT(DCI_pdu,
DCI,
Nsf, ///// number_of_subframes_required
G); //// this vallue is fixed, should take into account in future the case of stand-alone & guard-band
dlsch_scrambling_Gen_NB_IoT(frame_parms,
RAR,
DCI,
Nsf*G,
frame,
subframe*2,
RAR->rnti);
DCI->rnti);
}
if( (counter_rep != rep) && (counter_sf_rep == 0) && (pointer_to_sf == 0) )
{
dlsch_scrambling_Gen_NB_IoT(frame_parms,
RAR,
DCI,
Nsf*G,
frame,
subframe*2,
RAR->rnti);
}
if( rep > 4)
{
RAR->counter_current_sf_repetition++;
dlsch_modulation_NB_IoT(txdataF,
amp,
frame_parms,
eutro_control_region, //should be replace by start_symbole // control region size for LTE , values between 0..3, (0 for stand-alone / 1, 2 or 3 for in-band)
RAR,
G, // number of bits per subframe
pointer_to_sf,
subframe,
RB_IoT_ID);
if(RAR->counter_current_sf_repetition == 4)
{
RAR->pointer_to_subframe++;
RAR->counter_current_sf_repetition =0;
if (Nsf == RAR->pointer_to_subframe && (RAR->counter_repetition_number > 4))
{
RAR->counter_repetition_number = RAR->counter_repetition_number-4;
RAR->pointer_to_subframe =0;
RAR->counter_current_sf_repetition =0;
} else {
RAR->active = 0;
done =1;
DCI->rnti);
}
}
} else {
RAR->counter_current_sf_repetition++;
DCI->counter_current_sf_repetition++;
dlsch_modulation_NB_IoT(txdataF,
amp,
frame_parms,
eutro_control_region, //should be replace by start_symbole // control region size for LTE , values between 0..3, (0 for stand-alone / 1, 2 or 3 for in-band)
RAR,
DCI,
G, // number of bits per subframe
pointer_to_sf,
subframe,
RB_IoT_ID);
if(RAR->counter_current_sf_repetition == rep)
if(DCI->counter_current_sf_repetition == rep)
{
RAR->pointer_to_subframe++;
DCI->pointer_to_subframe++;
if (Nsf == RAR->pointer_to_subframe)
if (Nsf == DCI->pointer_to_subframe)
{
RAR->active = 0;
DCI->active = 0;
done =1;
}
}
}
}
return(done);
}
*/
////////////////////////////////////////////////// backup ///////////////////////////
//////////////////////////////////////////////////// SIB23 ////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////// SIB23 ////////////////////////////////////////////////////////////////////////
/* if( (subframe >0) && (subframe !=5) && (With_NSSS == 0) && (frame%2==1) && (frame%64<16) ) ////if((subframe != 0) && (subframe != 4) && (subframe != 9) )
{
......
......@@ -161,8 +161,6 @@ int generate_eNB_dlsch_params_from_dci_NB_IoT(PHY_VARS_eNB_NB_IoT *eNB,
eNB->DCI_pdu = (DCI_PDU_NB_IoT*) malloc(sizeof(DCI_PDU_NB_IoT));
//N1 parameters
/// type = 0 => DCI Format N0, type = 1 => DCI Format N1, 1 bits
......
......@@ -88,6 +88,10 @@ void handle_nfapi_dlsch_pdu_NB_IoT(PHY_VARS_eNB *eNB,
*
*/
//LOG_I(PHY,"B NB-handle_nfapi_dlsch_pdu_NB_IoT SIB1\n");
ndlsch->active = 1;
ndlsch->rnti = 65535;
ndlsch_harq = ndlsch->harq_process;
ndlsch->ndlsch_type = SIB1;
......@@ -149,6 +153,7 @@ void handle_nfapi_dlsch_pdu_NB_IoT(PHY_VARS_eNB *eNB,
ndlsch23->active = 1;
ndlsch23->ndlsch_type = SI_Message;
ndlsch23->rnti = 65535;
ndlsch23->npdsch_start_symbol = rel13->start_symbol; //start OFDM symbol for the ndlsch transmission
//ndlsch_harq->pdu = sdu;
//LOG_I(PHY,"B content_sib23:%d\n",sdu);
......
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