Commit 1d1172ae authored by Matthieu Kanj's avatar Matthieu Kanj

SIB1 done

parent 98550ce6
...@@ -46,11 +46,16 @@ int generate_SIB1(NB_IoT_eNB_NDLSCH_t *sib1_struct, ...@@ -46,11 +46,16 @@ int generate_SIB1(NB_IoT_eNB_NDLSCH_t *sib1_struct,
LTE_DL_FRAME_PARMS *frame_parms, LTE_DL_FRAME_PARMS *frame_parms,
uint32_t frame, uint32_t frame,
uint32_t subframe, uint32_t subframe,
int RB_IoT_ID) int RB_IoT_ID,
uint8_t operation_mode)
{ {
int done=0; int done=0;
uint8_t *sib1_pdu = sib1_struct->harq_process->pdu; uint8_t *sib1_pdu = sib1_struct->harq_process->pdu;
uint8_t opr_mode = 3;
if(operation_mode>=2)
{
opr_mode =0;
}
uint8_t tmp =0; uint8_t tmp =0;
uint8_t rep_val = 0; uint8_t rep_val = 0;
uint8_t start_frame = get_start_frame_SIB1_NB_IoT(frame_parms, get_rep_num_SIB1_NB_IoT(sib1_struct->repetition_number_SIB1)); uint8_t start_frame = get_start_frame_SIB1_NB_IoT(frame_parms, get_rep_num_SIB1_NB_IoT(sib1_struct->repetition_number_SIB1));
...@@ -91,17 +96,18 @@ int generate_SIB1(NB_IoT_eNB_NDLSCH_t *sib1_struct, ...@@ -91,17 +96,18 @@ int generate_SIB1(NB_IoT_eNB_NDLSCH_t *sib1_struct,
if((subframe == 4) && (frame%2 == var) && (born_inf<= frame % rep_val) && (frame % rep_val < born_sup )) if((subframe == 4) && (frame%2 == var) && (born_inf<= frame % rep_val) && (frame % rep_val < born_sup ))
{ {
int G = get_G_SIB1_NB_IoT(frame_parms,operation_mode);
if( frame % rep_val == var ) if( frame % rep_val == var )
{ {
dlsch_encoding_NB_IoT(sib1_pdu, dlsch_encoding_NB_IoT(sib1_pdu,
sib1_struct, sib1_struct,
8, ///// number_of_subframes_required 8, ///// number_of_subframes_required
236); //// this vallue is fixed, should take into account in future the case of stand-alone & guard-band 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, dlsch_scrambling_Gen_NB_IoT(frame_parms,
sib1_struct, sib1_struct,
1888, 8*G,
frame, frame,
subframe*2, subframe*2,
sib1_struct->rnti); sib1_struct->rnti);
...@@ -110,9 +116,9 @@ int generate_SIB1(NB_IoT_eNB_NDLSCH_t *sib1_struct, ...@@ -110,9 +116,9 @@ int generate_SIB1(NB_IoT_eNB_NDLSCH_t *sib1_struct,
dlsch_modulation_NB_IoT(txdataF, dlsch_modulation_NB_IoT(txdataF,
amp, amp,
frame_parms, frame_parms,
3, // control region size for LTE , values between 0..3, (0 for stand-alone / 1, 2 or 3 for in-band) opr_mode, // control region size for LTE , values between 0..3, (0 for stand-alone / 1, 2 or 3 for in-band)
sib1_struct, sib1_struct,
236, // number of bits per subframe G, // number of bits per subframe
((frame%16)/2), ((frame%16)/2),
4, 4,
RB_IoT_ID); RB_IoT_ID);
......
...@@ -100,9 +100,8 @@ int get_G_SIB1_NB_IoT(LTE_DL_FRAME_PARMS *frame_parms, uint8_t operation_mode_in ...@@ -100,9 +100,8 @@ int get_G_SIB1_NB_IoT(LTE_DL_FRAME_PARMS *frame_parms, uint8_t operation_mode_in
{ {
uint16_t num_ctrl_symbols = 0; // eutra_control_region_size values are 0,1,2 uint16_t num_ctrl_symbols = 0; // eutra_control_region_size values are 0,1,2
if(operation_mode_info<2) /// operation_mode_info, in-band, stand-alone, guard band if(operation_mode_info<2) /// operation_mode_info, in-band (two value 0,1), stand-alone(3), guard band (2)
{ {
num_ctrl_symbols = 2; num_ctrl_symbols = 2;
} }
uint8_t nb_antennas_tx_LTE = frame_parms->nb_antennas_tx; uint8_t nb_antennas_tx_LTE = frame_parms->nb_antennas_tx;
......
...@@ -112,7 +112,8 @@ int generate_SIB1(NB_IoT_eNB_NDLSCH_t *sib1_struct, ...@@ -112,7 +112,8 @@ int generate_SIB1(NB_IoT_eNB_NDLSCH_t *sib1_struct,
LTE_DL_FRAME_PARMS *frame_parms, LTE_DL_FRAME_PARMS *frame_parms,
uint32_t frame, uint32_t frame,
uint32_t subframe, uint32_t subframe,
int RB_IoT_ID); int RB_IoT_ID,
uint8_t operation_mode);
int generate_npbch(NB_IoT_eNB_NPBCH_t *eNB_npbch, int generate_npbch(NB_IoT_eNB_NPBCH_t *eNB_npbch,
int32_t **txdataF, int32_t **txdataF,
......
...@@ -334,7 +334,8 @@ void common_signal_procedures_NB_IoT(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc) ...@@ -334,7 +334,8 @@ void common_signal_procedures_NB_IoT(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc)
fp, fp,
frame, frame,
subframe, subframe,
RB_IoT_ID); RB_IoT_ID,
0);
///////////////////////////////////////////////////////// END //////////////////////////////////////////////////////// ///////////////////////////////////////////////////////// END ////////////////////////////////////////////////////////
//////////////////////////////////////////////////// SIB23 //////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////// SIB23 ////////////////////////////////////////////////////////////////////////
......
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