Commit 125878cf authored by Matthieu Kanj's avatar Matthieu Kanj

SIB23 + NPDSCH repetitions

parent 1d1172ae
...@@ -135,17 +135,351 @@ int generate_SIB1(NB_IoT_eNB_NDLSCH_t *sib1_struct, ...@@ -135,17 +135,351 @@ int generate_SIB1(NB_IoT_eNB_NDLSCH_t *sib1_struct,
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
/*int generate_SIB23(NB_IoT_eNB_NPBCH_t *eNB_npbch, int generate_SIB23(NB_IoT_eNB_NDLSCH_t *SIB23,
int32_t **txdataF, int32_t **txdataF,
int amp, int16_t amp,
LTE_DL_FRAME_PARMS *frame_parms, LTE_DL_FRAME_PARMS *frame_parms,
uint8_t *npbch_pdu, uint32_t frame,
uint8_t frame_mod64, uint32_t subframe,
unsigned short NB_IoT_RB_ID) int RB_IoT_ID)
{ {
int done=0;
uint8_t *SIB23_pdu = SIB23->harq_process->pdu;
uint32_t rep = SIB23->resource_assignment;
uint8_t eutro_control_region = 3;
uint32_t counter_rep = SIB23->counter_repetition_number;
uint32_t pointer_to_sf = SIB23->pointer_to_subframe; /// to identify wich encoded subframe to transmit
if( SIB23->active == 1 )
{
int G = get_G_NB_IoT(frame_parms);
uint8_t Nsf = SIB23->resource_assignment; //value 2 or 8
if(counter_rep == rep)
{
dlsch_encoding_NB_IoT(SIB23_pdu,
SIB23,
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,
SIB23,
Nsf*G,
frame,
subframe*2,
SIB23->rnti);
}
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)
SIB23,
G, // number of bits per subframe
pointer_to_sf,
subframe,
RB_IoT_ID);
SIB23->counter_repetition_number--;
SIB23->pointer_to_subframe++;
if(SIB23->counter_repetition_number == 0)
{
SIB23->active = 0;
done =1;
}
}
return(done);
return(0);
} }
*/
//////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////
int generate_NDLSCH_NB_IoT(NB_IoT_eNB_NDLSCH_t *RAR,
int32_t **txdataF,
int16_t amp,
LTE_DL_FRAME_PARMS *frame_parms,
uint32_t frame,
uint32_t subframe,
int RB_IoT_ID)
{
int done = 0;
uint8_t *RAR_pdu = RAR->harq_process->pdu;
uint32_t rep = RAR->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
if( RAR->active == 1 )
{
int G = get_G_NB_IoT(frame_parms);
uint8_t Nsf = RAR->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,
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,
Nsf*G,
frame,
subframe*2,
RAR->rnti);
}
if( (counter_rep != rep) && (counter_sf_rep == 0) && (pointer_to_sf == 0) )
{
dlsch_scrambling_Gen_NB_IoT(frame_parms,
RAR,
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;
}
}
} else {
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 == rep)
{
RAR->pointer_to_subframe++;
if (Nsf == RAR->pointer_to_subframe)
{
RAR->active = 0;
done =1;
}
}
}
}
return(done);
}
/////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////
/*int generate_NDCCH_NB_IoT(NB_IoT_eNB_NDLSCH_t *RAR,
int32_t **txdataF,
int16_t amp,
LTE_DL_FRAME_PARMS *frame_parms,
uint32_t frame,
uint32_t subframe,
int RB_IoT_ID)
{
int done=0;
uint8_t *RAR_pdu = RAR->harq_process->pdu;
uint32_t rep = RAR->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
if( RAR->active == 1 )
{
int G = get_G_NB_IoT(frame_parms);
uint8_t Nsf = RAR->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,
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,
Nsf*G,
frame,
subframe*2,
RAR->rnti);
}
if( (counter_rep != rep) && (counter_sf_rep == 0) && (pointer_to_sf == 0) )
{
dlsch_scrambling_Gen_NB_IoT(frame_parms,
RAR,
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;
}
}
} else {
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 == rep)
{
RAR->pointer_to_subframe++;
if (Nsf == RAR->pointer_to_subframe)
{
RAR->active = 0;
done =1;
}
}
}
}
return(done);
}
*/
////////////////////////////////////////////////// backup ///////////////////////////
//////////////////////////////////////////////////// SIB23 ////////////////////////////////////////////////////////////////////////
/* if( (subframe >0) && (subframe !=5) && (With_NSSS == 0) && (frame%2==1) && (frame%64<16) ) ////if((subframe != 0) && (subframe != 4) && (subframe != 9) )
{
if( subframe == 1 )
{
dlsch_encoding_NB_IoT(sib23_pdu,
sib23,
8, ///// number_of_subframes_required
236); //////////// G*2
dlsch_scrambling_Gen_NB_IoT(fp, // is called only in subframe 4
sib23,
1888, ////// total_bits
frame,
subframe*2,
eNB->ndlsch_SIB23->rnti);
}
if( subframe < 5 )
{
dlsch_modulation_NB_IoT(txdataF,
AMP,
fp,
3, // control region size for LTE , values between 0..3, (0 for stand-alone / 1, 2 or 3 for in-band)
sib23,
236, // number of bits per subframe
(subframe-1), ///npdsch_data_subframe, data per subframe//subframe index of the data table of npdsch channel (G*Nsf) ((frame%32)/2),values are between 0..Nsf
subframe,
RB_IoT_ID);
} else {
dlsch_modulation_NB_IoT(txdataF,
AMP,
fp,
3, // control region size for LTE , values between 0..3, (0 for stand-alone / 1, 2 or 3 for in-band)
sib23,
236, // number of bits per subframe
(subframe-2),///npdsch_data_subframe, data per subframe//subframe index of the data table of npdsch channel (G*Nsf) ((frame%32)/2),values are between 0..Nsf
subframe,
RB_IoT_ID);
}
}
*/
\ No newline at end of file
...@@ -432,7 +432,6 @@ typedef struct { ...@@ -432,7 +432,6 @@ typedef struct {
uint32_t modulation; uint32_t modulation;
uint32_t number_of_subframes_for_resource_assignment; // for NDLSCH //table 16.4.1.3-1 // TS 36.213 uint32_t number_of_subframes_for_resource_assignment; // for NDLSCH //table 16.4.1.3-1 // TS 36.213
uint32_t counter_repetition_number; uint32_t counter_repetition_number;
uint32_t counter_current_sf_repetition; uint32_t counter_current_sf_repetition;
uint32_t pointer_to_subframe; uint32_t pointer_to_subframe;
......
...@@ -106,6 +106,22 @@ int allocate_REs_in_RB_NB_IoT(LTE_DL_FRAME_PARMS *frame_parms, ...@@ -106,6 +106,22 @@ int allocate_REs_in_RB_NB_IoT(LTE_DL_FRAME_PARMS *frame_parms,
uint8_t pilot_shift, uint8_t pilot_shift,
uint32_t *re_allocated); uint32_t *re_allocated);
int generate_NDLSCH_NB_IoT(NB_IoT_eNB_NDLSCH_t *RAR,
int32_t **txdataF,
int16_t amp,
LTE_DL_FRAME_PARMS *frame_parms,
uint32_t frame,
uint32_t subframe,
int RB_IoT_ID);
int generate_SIB23(NB_IoT_eNB_NDLSCH_t *SIB23,
int32_t **txdataF,
int16_t amp,
LTE_DL_FRAME_PARMS *frame_parms,
uint32_t frame,
uint32_t subframe,
int RB_IoT_ID);
int generate_SIB1(NB_IoT_eNB_NDLSCH_t *sib1_struct, int generate_SIB1(NB_IoT_eNB_NDLSCH_t *sib1_struct,
int32_t **txdataF, int32_t **txdataF,
int16_t amp, int16_t amp,
......
...@@ -54,11 +54,15 @@ void handle_nfapi_dlsch_pdu_NB_IoT(PHY_VARS_eNB *eNB, ...@@ -54,11 +54,15 @@ void handle_nfapi_dlsch_pdu_NB_IoT(PHY_VARS_eNB *eNB,
{ {
NB_IoT_eNB_NDLSCH_t *ndlsch; NB_IoT_eNB_NDLSCH_t *ndlsch;
NB_IoT_eNB_NDLSCH_t *ndlsch23;
NB_IoT_DL_eNB_HARQ_t *ndlsch_harq; NB_IoT_DL_eNB_HARQ_t *ndlsch_harq;
NB_IoT_DL_eNB_HARQ_t *ndlsch_harq23;
nfapi_dl_config_ndlsch_pdu_rel13_t *rel13 = &dl_config_pdu->ndlsch_pdu.ndlsch_pdu_rel13; nfapi_dl_config_ndlsch_pdu_rel13_t *rel13 = &dl_config_pdu->ndlsch_pdu.ndlsch_pdu_rel13;
int UE_id= -1; int UE_id= -1;
int flag_malloc = 0; int flag_malloc = 0;
ndlsch= eNB->ndlsch_SIB1; ndlsch= eNB->ndlsch_SIB1;
ndlsch23= eNB->ndlsch_SIB23;
// if(flag_malloc) free (ndlsch->harq_process); // if(flag_malloc) free (ndlsch->harq_process);
...@@ -137,28 +141,31 @@ void handle_nfapi_dlsch_pdu_NB_IoT(PHY_VARS_eNB *eNB, ...@@ -137,28 +141,31 @@ void handle_nfapi_dlsch_pdu_NB_IoT(PHY_VARS_eNB *eNB,
* *
*/ */
//LOG_I(PHY,"B NB-handle_nfapi_dlsch_pdu_NB_IoT SIB23\n"); //LOG_I(PHY,"B NB-handle_nfapi_dlsch_pdu_NB_IoT SIB23\n");
ndlsch_harq = ndlsch->harq_process; ndlsch_harq23 = ndlsch23->harq_process;
//new SI starting transmission (should enter here only the first time for a new transmission) //new SI starting transmission (should enter here only the first time for a new transmission)
if(sdu != NULL) if(sdu != NULL)
{ {
ndlsch->ndlsch_type = SI_Message; ndlsch23->active = 1;
ndlsch->npdsch_start_symbol = rel13->start_symbol; //start OFDM symbol for the ndlsch transmission ndlsch23->ndlsch_type = SI_Message;
ndlsch23->npdsch_start_symbol = rel13->start_symbol; //start OFDM symbol for the ndlsch transmission
//ndlsch_harq->pdu = sdu; //ndlsch_harq->pdu = sdu;
//LOG_I(PHY,"B content_sib23:%d\n",sdu); //LOG_I(PHY,"B content_sib23:%d\n",sdu);
ndlsch_harq->pdu = sdu; ndlsch_harq23->pdu = sdu;
ndlsch_harq->resource_assignment = rel13->number_of_subframes_for_resource_assignment;//value 2 or 8 ndlsch_harq23->resource_assignment = rel13->number_of_subframes_for_resource_assignment;//value 2 or 8
ndlsch_harq->repetition_number = rel13->repetition_number;//should be always fix to 0 to be mapped in 1 ndlsch_harq23->repetition_number = rel13->repetition_number;//should be always fix to 0 to be mapped in 1
ndlsch_harq->modulation = rel13->modulation; ndlsch_harq23->modulation = rel13->modulation;
//LOG_I(PHY,"A content_sib23:%d\n",sdu); //LOG_I(PHY,"A content_sib23:%d\n",sdu);
ndlsch23->counter_repetition_number = rel13->number_of_subframes_for_resource_assignment;
ndlsch23->counter_current_sf_repetition = 0;
ndlsch23->pointer_to_subframe = 0;
//SI information in reality have no feedback (so there is no retransmission from the HARQ view point since no sck and nack) //SI information in reality have no feedback (so there is no retransmission from the HARQ view point since no sck and nack)
// ndlsch_harq->frame = frame; // ndlsch_harq->frame = frame;
// ndlsch_harq->subframe = subframe; // ndlsch_harq->subframe = subframe;
ndlsch->nrs_antenna_ports = rel13->nrs_antenna_ports_assumed_by_the_ue; ndlsch23->nrs_antenna_ports = rel13->nrs_antenna_ports_assumed_by_the_ue;
ndlsch->scrambling_sequence_intialization = rel13->scrambling_sequence_initialization_cinit; ndlsch23->scrambling_sequence_intialization = rel13->scrambling_sequence_initialization_cinit;
} }
else else
{ {
...@@ -166,14 +173,14 @@ void handle_nfapi_dlsch_pdu_NB_IoT(PHY_VARS_eNB *eNB, ...@@ -166,14 +173,14 @@ void handle_nfapi_dlsch_pdu_NB_IoT(PHY_VARS_eNB *eNB,
//there is no need of repeating the configuration on the ndlsch //there is no need of repeating the configuration on the ndlsch
//ndlsch_harq->pdu = NULL; //ndlsch_harq->pdu = NULL;
//LOG_I(PHY,"sib23=NULL\n"); //LOG_I(PHY,"sib23=NULL\n");
ndlsch_harq->pdu = NULL; ndlsch_harq23->pdu = NULL;
} }
//Independently if we have the PDU or not (first transmission or repetition) the process is activated for triggering the ndlsch_procedure //Independently if we have the PDU or not (first transmission or repetition) the process is activated for triggering the ndlsch_procedure
//LOG_I(PHY,"ACTIVE_NB_IoT\n"); //LOG_I(PHY,"ACTIVE_NB_IoT\n");
ndlsch_harq->status = ACTIVE_NB_IoT; ndlsch_harq23->status = ACTIVE_NB_IoT;
//LOG_I(PHY,"A NB-handle_nfapi_dlsch_pdu_NB_IoT SIB23\n"); //LOG_I(PHY,"A NB-handle_nfapi_dlsch_pdu_NB_IoT SIB23\n");
} }
...@@ -188,10 +195,10 @@ void handle_nfapi_dlsch_pdu_NB_IoT(PHY_VARS_eNB *eNB, ...@@ -188,10 +195,10 @@ void handle_nfapi_dlsch_pdu_NB_IoT(PHY_VARS_eNB *eNB,
eNB->ndlsch_RAR->npdsch_start_symbol = rel13->start_symbol; eNB->ndlsch_RAR->npdsch_start_symbol = rel13->start_symbol;
eNB->ndlsch_RAR->active = 1; eNB->ndlsch_RAR->active = 1;
eNB->ndlsch_RAR->rnti = rel13->rnti; // how this value is tested in line 177 ???? i am missing something ???? eNB->ndlsch_RAR->rnti = rel13->rnti;
eNB->ndlsch_RAR->rnti_type = rel13->rnti_type; eNB->ndlsch_RAR->rnti_type = rel13->rnti_type;
eNB->ndlsch_RAR->resource_assignment = rel13->resource_assignment ; // for NDLSCH // this value point to --> number of subframes needed eNB->ndlsch_RAR->resource_assignment = rel13->resource_assignment; // for NDLSCH // this value point to --> number of subframes needed
eNB->ndlsch_RAR->repetition_number = rel13->repetition_number; eNB->ndlsch_RAR->repetition_number = rel13->repetition_number;
eNB->ndlsch_RAR->modulation = rel13->modulation; eNB->ndlsch_RAR->modulation = rel13->modulation;
......
...@@ -208,11 +208,6 @@ uint32_t is_SIB1_NB_IoT(const frame_t frameP, ...@@ -208,11 +208,6 @@ uint32_t is_SIB1_NB_IoT(const frame_t frameP,
return -1; return -1;
} }
/* For NB-IoT, we put NPBCH in later part, since it would be scheduled by MAC scheduler /* For NB-IoT, we put NPBCH in later part, since it would be scheduled by MAC scheduler
* It generates NRS/NPSS/NSSS * It generates NRS/NPSS/NSSS
* *
...@@ -227,6 +222,8 @@ void common_signal_procedures_NB_IoT(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc) ...@@ -227,6 +222,8 @@ void common_signal_procedures_NB_IoT(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc)
NB_IoT_eNB_NDLSCH_t *sib1 = eNB->ndlsch_SIB1; NB_IoT_eNB_NDLSCH_t *sib1 = eNB->ndlsch_SIB1;
NB_IoT_eNB_NDLSCH_t *sib23 = eNB->ndlsch_SIB23; NB_IoT_eNB_NDLSCH_t *sib23 = eNB->ndlsch_SIB23;
uint8_t *npbch_pdu = broadcast_str->pdu;
int **txdataF = eNB->common_vars.txdataF[0]; int **txdataF = eNB->common_vars.txdataF[0];
uint32_t subframe = proc->subframe_tx; uint32_t subframe = proc->subframe_tx;
uint32_t frame = proc->frame_tx; uint32_t frame = proc->frame_tx;
...@@ -234,7 +231,6 @@ void common_signal_procedures_NB_IoT(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc) ...@@ -234,7 +231,6 @@ void common_signal_procedures_NB_IoT(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc)
int RB_IoT_ID=22; // XXX should be initialized (RB reserved for NB-IoT, PRB index) int RB_IoT_ID=22; // XXX should be initialized (RB reserved for NB-IoT, PRB index)
int With_NSSS=0; // With_NSSS = 1; if the frame include a sub-Frame with NSSS signal int With_NSSS=0; // With_NSSS = 1; if the frame include a sub-Frame with NSSS signal
uint32_t hyper_frame=proc->HFN; uint32_t hyper_frame=proc->HFN;
//////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////
/* /*
...@@ -255,8 +251,8 @@ void common_signal_procedures_NB_IoT(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc) ...@@ -255,8 +251,8 @@ void common_signal_procedures_NB_IoT(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc)
///////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////
//uint8_t *control_region_size = get_NB_IoT_SIB1_eutracontrolregionsize(); //uint8_t *control_region_size = get_NB_IoT_SIB1_eutracontrolregionsize();
//int G=0; //int G=0;
//NSSS only happened in the even frame //NSSS only happened in the even frame
int nsss_state = 0;
if(frame%2==0) if(frame%2==0)
{ {
...@@ -275,7 +271,7 @@ void common_signal_procedures_NB_IoT(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc) ...@@ -275,7 +271,7 @@ void common_signal_procedures_NB_IoT(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc)
10, 10,
RB_IoT_ID); RB_IoT_ID);
} }
else if((subframe == 9)&&(With_NSSS == 1)) else if((subframe == 9) && (With_NSSS == 1))
{ {
generate_sss_NB_IoT(txdataF, generate_sss_NB_IoT(txdataF,
...@@ -285,23 +281,14 @@ void common_signal_procedures_NB_IoT(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc) ...@@ -285,23 +281,14 @@ void common_signal_procedures_NB_IoT(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc)
18, 18,
frame, frame,
RB_IoT_ID); RB_IoT_ID);
nsss_state = 1;
} }
//uint8_t *npbch_pdu = get_NB_IoT_MIB();
uint8_t *npbch_pdu = broadcast_str->pdu;
//uint8_t *sib1_pdu = get_NB_IoT_SIB1();
//uint8_t *sib23_pdu = get_NB_IoT_SIB23();
uint8_t *sib23_pdu = sib23->harq_process->pdu; uint8_t *sib23_pdu = sib23->harq_process->pdu;
if(subframe == 0) if(subframe == 0)
{ {
LOG_I(PHY,"MIB NB-IoT content:\n");
/* for(int i = 0; i<6;i++)
printf("%02X",broadcast_str->pdu[i]);
printf("\n");*/
generate_npbch(broadcast_str, generate_npbch(broadcast_str,
txdataF, txdataF,
AMP, AMP,
...@@ -310,25 +297,11 @@ void common_signal_procedures_NB_IoT(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc) ...@@ -310,25 +297,11 @@ void common_signal_procedures_NB_IoT(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc)
frame%64, frame%64,
RB_IoT_ID); RB_IoT_ID);
} }
//////////////////////////////// SIB1 //////////////////////////////
//////////////////////////////////////////// SIB1 //////////////////////////////////// int sib1_state = 0;
// we need two parameter, NB-IoT cell_id and scheduling info for sib1 (can be found in the MIB) if(subframe == 4)
// using scheduling_info parameter we can get the TBS size. {
// cell_id help to find the start subframe for sib1. sib1_state = generate_SIB1(sib1,
// MAC_TBStable_NB_IoT_SIB1 to be used to get TBS value.
//
// sib1->repetition_number_SIB1; //0-15 sib1->resource_assignment_SIB1; // always 8
// fp->Nid_cell
// TBStable_NB_IoT_SIB1[repetition_number_SIB1] /// TBS
//
// rep_val = 4 , 8, 16
// if( (subframe ==4) && (frame%2 == var_0_1) && (born_inf<= frame % rep_val) (frame % rep_val <= 16 + start_frame ))
//
// ndlsch->repetition_number_SIB1 -> 10 , should call get_rep_num_SIB1_NB_IoT(repetition_number_SIB1) -> value 4,8,16
//get_start_frame_SIB1_NB_IoT(lte_frame, get_rep_num_SIB1_NB_IoT(repetition_number_SIB1));
//if((subframe == 4) && (frame%2==0) && (frame%32<16) ) ////if((subframe != 0) && (subframe != 4) && (subframe != 9) )
generate_SIB1(sib1,
txdataF, txdataF,
AMP, AMP,
fp, fp,
...@@ -336,57 +309,17 @@ void common_signal_procedures_NB_IoT(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc) ...@@ -336,57 +309,17 @@ void common_signal_procedures_NB_IoT(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc)
subframe, subframe,
RB_IoT_ID, RB_IoT_ID,
0); 0);
///////////////////////////////////////////////////////// END ////////////////////////////////////////////////////////
//////////////////////////////////////////////////// SIB23 ////////////////////////////////////////////////////////////////////////
if( (subframe >0) && (subframe !=5) && (With_NSSS == 0) && (frame%2==1) && (frame%64<16) ) ////if((subframe != 0) && (subframe != 4) && (subframe != 9) )
{
LOG_I(PHY,"SIB2 NB-IoT content:\n");
/* for(int i = 0; i<6;i++)
printf("%02X",sib23->pdu[i]);
printf("\n");*/
if( subframe == 1 )
{
dlsch_encoding_NB_IoT(sib23_pdu,
sib23,
8, ///// number_of_subframes_required
236); //////////// G*2
dlsch_scrambling_Gen_NB_IoT(fp, // is called only in subframe 4
sib23,
1888, ////// total_bits
frame,
subframe*2,
eNB->ndlsch_SIB23->rnti);
} }
//////////////////////////////// SIB23 ///////////////////////////////
if( subframe < 5 ) if( (subframe != 0) && (subframe != 5) && (sib1_state != 1) && (nsss_state != 1))
{ {
generate_SIB23(sib23,
dlsch_modulation_NB_IoT(txdataF, txdataF,
AMP,
fp,
3, // control region size for LTE , values between 0..3, (0 for stand-alone / 1, 2 or 3 for in-band)
sib23,
236, // number of bits per subframe
(subframe-1),///npdsch_data_subframe, data per subframe//subframe index of the data table of npdsch channel (G*Nsf) ((frame%32)/2),values are between 0..Nsf
subframe,
RB_IoT_ID);
} else {
dlsch_modulation_NB_IoT(txdataF,
AMP, AMP,
fp, fp,
3, // control region size for LTE , values between 0..3, (0 for stand-alone / 1, 2 or 3 for in-band) frame,
sib23,
236, // number of bits per subframe
(subframe-2),///npdsch_data_subframe, data per subframe//subframe index of the data table of npdsch channel (G*Nsf) ((frame%32)/2),values are between 0..Nsf
subframe, subframe,
RB_IoT_ID); RB_IoT_ID);
}
} }
//////////////////////////////////////////////////// END //////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////// END ////////////////////////////////////////////////////////////////////////
......
...@@ -1301,7 +1301,7 @@ void set_default_frame_parms(LTE_DL_FRAME_PARMS *frame_parms[MAX_NUM_CCs]) { ...@@ -1301,7 +1301,7 @@ void set_default_frame_parms(LTE_DL_FRAME_PARMS *frame_parms[MAX_NUM_CCs]) {
frame_parms[CC_id]->prach_config_common.prach_ConfigInfo.highSpeedFlag=0; frame_parms[CC_id]->prach_config_common.prach_ConfigInfo.highSpeedFlag=0;
frame_parms[CC_id]->prach_config_common.prach_ConfigInfo.prach_FreqOffset=0; frame_parms[CC_id]->prach_config_common.prach_ConfigInfo.prach_FreqOffset=0;
frame_parms[CC_id]->nb_antennas_tx_NB_IoT = enb_properties->properties[i]->nb_antennas_tx[CC_id]; frame_parms[CC_id]->nb_antennas_tx_NB_IoT = 1;
frame_parms[CC_id]->control_region_size = 3; frame_parms[CC_id]->control_region_size = 3;
downlink_frequency[CC_id][0] = 2680000000; // Use float to avoid issue with frequency over 2^31. downlink_frequency[CC_id][0] = 2680000000; // Use float to avoid issue with frequency over 2^31.
......
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