Commit 77072adf authored by Tien-Thinh Nguyen's avatar Tien-Thinh Nguyen

[RRC] support SIB18 (partially)

parent 709e5974
...@@ -560,8 +560,10 @@ uint8_t do_SIB23(uint8_t Mod_id, ...@@ -560,8 +560,10 @@ uint8_t do_SIB23(uint8_t Mod_id,
#endif #endif
) )
{ {
struct SystemInformation_r8_IEs__sib_TypeAndInfo__Member *sib2_part,*sib3_part; struct SystemInformation_r8_IEs__sib_TypeAndInfo__Member *sib2_part,*sib3_part;
#if defined(Rel14)
//TTN - for D2D //TTN - for D2D
struct SystemInformation_r8_IEs__sib_TypeAndInfo__Member *sib18_part, *sib19_part, *sib21_part; struct SystemInformation_r8_IEs__sib_TypeAndInfo__Member *sib18_part, *sib19_part, *sib21_part;
SL_CommRxPoolList_r12_t *SL_CommRxPoolList; //for SIB18 SL_CommRxPoolList_r12_t *SL_CommRxPoolList; //for SIB18
...@@ -570,7 +572,7 @@ uint8_t do_SIB23(uint8_t Mod_id, ...@@ -570,7 +572,7 @@ uint8_t do_SIB23(uint8_t Mod_id,
struct SL_DiscResourcePool_r12 *SL_DiscResourcePool; //for SIB19 (discRxPool) struct SL_DiscResourcePool_r12 *SL_DiscResourcePool; //for SIB19 (discRxPool)
SL_DiscRxPoolList_r12_t *SL_DiscRxPoolPSList; //for SIB19 (discRxPoolPS) SL_DiscRxPoolList_r12_t *SL_DiscRxPoolPSList; //for SIB19 (discRxPoolPS)
struct SL_DiscResourcePool_r12 *SL_DiscResourcePoolPS; //for SIB19 (discRxPoolPS) struct SL_DiscResourcePool_r12 *SL_DiscResourcePoolPS; //for SIB19 (discRxPoolPS)
#endif
#if defined(Rel10) || defined(Rel14) #if defined(Rel10) || defined(Rel14)
struct SystemInformation_r8_IEs__sib_TypeAndInfo__Member *sib13_part; struct SystemInformation_r8_IEs__sib_TypeAndInfo__Member *sib13_part;
...@@ -589,11 +591,12 @@ uint8_t do_SIB23(uint8_t Mod_id, ...@@ -589,11 +591,12 @@ uint8_t do_SIB23(uint8_t Mod_id,
uint8_t MBMS_flag = RC.rrc[Mod_id]->carrier[CC_id].MBMS_flag; uint8_t MBMS_flag = RC.rrc[Mod_id]->carrier[CC_id].MBMS_flag;
#endif #endif
#if defined(Rel10) || defined(Rel14)
//TTN - for D2D //TTN - for D2D
SystemInformationBlockType18_r12_t **sib18 = &RC.rrc[Mod_id]->carrier[CC_id].sib18; SystemInformationBlockType18_r12_t **sib18 = &RC.rrc[Mod_id]->carrier[CC_id].sib18;
SystemInformationBlockType19_r12_t **sib19 = &RC.rrc[Mod_id]->carrier[CC_id].sib19; SystemInformationBlockType19_r12_t **sib19 = &RC.rrc[Mod_id]->carrier[CC_id].sib19;
//SystemInformationBlockType21_r14_t **sib21 = &RC.rrc[Mod_id]->carrier[CC_id].sib21; //SystemInformationBlockType21_r14_t **sib21 = &RC.rrc[Mod_id]->carrier[CC_id].sib21;
#endif
if (bcch_message) { if (bcch_message) {
memset(bcch_message,0,sizeof(BCCH_DL_SCH_Message_t)); memset(bcch_message,0,sizeof(BCCH_DL_SCH_Message_t));
...@@ -639,6 +642,7 @@ uint8_t do_SIB23(uint8_t Mod_id, ...@@ -639,6 +642,7 @@ uint8_t do_SIB23(uint8_t Mod_id,
#endif #endif
#if defined(Rel10) || defined(Rel14)
//TTN - for D2D //TTN - for D2D
sib18_part = CALLOC(1,sizeof(struct SystemInformation_r8_IEs__sib_TypeAndInfo__Member)); sib18_part = CALLOC(1,sizeof(struct SystemInformation_r8_IEs__sib_TypeAndInfo__Member));
sib19_part = CALLOC(1,sizeof(struct SystemInformation_r8_IEs__sib_TypeAndInfo__Member)); sib19_part = CALLOC(1,sizeof(struct SystemInformation_r8_IEs__sib_TypeAndInfo__Member));
...@@ -655,6 +659,7 @@ uint8_t do_SIB23(uint8_t Mod_id, ...@@ -655,6 +659,7 @@ uint8_t do_SIB23(uint8_t Mod_id,
*sib19 = &sib19_part->choice.sib19_v1250; *sib19 = &sib19_part->choice.sib19_v1250;
//*sib21 = &sib19_part->choice.sib21_v14x0; //*sib21 = &sib19_part->choice.sib21_v14x0;
#endif
// sib2 // sib2
...@@ -1050,18 +1055,21 @@ uint8_t do_SIB23(uint8_t Mod_id, ...@@ -1050,18 +1055,21 @@ uint8_t do_SIB23(uint8_t Mod_id,
#endif #endif
#if defined(Rel10) || defined(Rel14)
//TTN - for D2D //TTN - for D2D
// SIB18 // SIB18
// fill in all elements of SIB18 if present // fill in all elements of SIB18 if present
//later we can read the parameters from the configuration file as for eNB's parameters //later we can read the parameters from the configuration file as for eNB's parameters
//commRxPool_r12 - should be filled with the parameters from the configuration file //commRxPool_r12 - should be filled with the parameters from the configuration file
(*sib18)->commConfig_r12 = CALLOC (1, sizeof(*(*sib18)->commConfig_r12)); (*sib18)->commConfig_r12 = CALLOC (1, sizeof(*(*sib18)->commConfig_r12));
SL_CommRxPoolList= &(*sib18)->commConfig_r12->commRxPool_r12; SL_CommRxPoolList= &(*sib18)->commConfig_r12->commRxPool_r12;
memset(SL_CommRxPoolList,0,sizeof(*SL_CommRxPoolList)); memset(SL_CommRxPoolList,0,sizeof(*SL_CommRxPoolList));
SL_CommResourcePool = CALLOC(1, sizeof(*SL_CommResourcePool)); SL_CommResourcePool = CALLOC(1, sizeof(*SL_CommResourcePool));
memset(SL_CommResourcePool,0,sizeof(*SL_CommResourcePool));
SL_CommResourcePool->sc_CP_Len_r12 = configuration->rxPool_sc_CP_Len[CC_id]; SL_CommResourcePool->sc_CP_Len_r12 = configuration->rxPool_sc_CP_Len[CC_id];
SL_CommResourcePool->sc_Period_r12 = configuration->rxPool_sc_Period[CC_id]; SL_CommResourcePool->sc_Period_r12 = configuration->rxPool_sc_Period[CC_id];
SL_CommResourcePool->data_CP_Len_r12 = configuration->rxPool_data_CP_Len[CC_id]; SL_CommResourcePool->data_CP_Len_r12 = configuration->rxPool_data_CP_Len[CC_id];
...@@ -1070,6 +1078,7 @@ uint8_t do_SIB23(uint8_t Mod_id, ...@@ -1070,6 +1078,7 @@ uint8_t do_SIB23(uint8_t Mod_id,
SL_CommResourcePool->sc_TF_ResourceConfig_r12.prb_Start_r12 = configuration->rxPool_ResourceConfig_prb_Start[CC_id]; SL_CommResourcePool->sc_TF_ResourceConfig_r12.prb_Start_r12 = configuration->rxPool_ResourceConfig_prb_Start[CC_id];
SL_CommResourcePool->sc_TF_ResourceConfig_r12.prb_End_r12 = configuration->rxPool_ResourceConfig_prb_End[CC_id]; SL_CommResourcePool->sc_TF_ResourceConfig_r12.prb_End_r12 = configuration->rxPool_ResourceConfig_prb_End[CC_id];
SL_CommResourcePool->sc_TF_ResourceConfig_r12.offsetIndicator_r12.present = configuration->rxPool_ResourceConfig_offsetIndicator_present[CC_id]; SL_CommResourcePool->sc_TF_ResourceConfig_r12.offsetIndicator_r12.present = configuration->rxPool_ResourceConfig_offsetIndicator_present[CC_id];
if (SL_CommResourcePool->sc_TF_ResourceConfig_r12.offsetIndicator_r12.present == SL_OffsetIndicator_r12_PR_small_r12 ) { if (SL_CommResourcePool->sc_TF_ResourceConfig_r12.offsetIndicator_r12.present == SL_OffsetIndicator_r12_PR_small_r12 ) {
SL_CommResourcePool->sc_TF_ResourceConfig_r12.offsetIndicator_r12.choice.small_r12 = configuration->rxPool_ResourceConfig_offsetIndicator_choice[CC_id] ; SL_CommResourcePool->sc_TF_ResourceConfig_r12.offsetIndicator_r12.choice.small_r12 = configuration->rxPool_ResourceConfig_offsetIndicator_choice[CC_id] ;
} else if (SL_CommResourcePool->sc_TF_ResourceConfig_r12.offsetIndicator_r12.present == SL_OffsetIndicator_r12_PR_large_r12 ){ } else if (SL_CommResourcePool->sc_TF_ResourceConfig_r12.offsetIndicator_r12.present == SL_OffsetIndicator_r12_PR_large_r12 ){
...@@ -1118,23 +1127,29 @@ uint8_t do_SIB23(uint8_t Mod_id, ...@@ -1118,23 +1127,29 @@ uint8_t do_SIB23(uint8_t Mod_id,
SL_CommResourcePool->dataHoppingConfig_r12.hoppingParameter_r12 = 0; SL_CommResourcePool->dataHoppingConfig_r12.hoppingParameter_r12 = 0;
SL_CommResourcePool->dataHoppingConfig_r12.numSubbands_r12 = SL_HoppingConfigComm_r12__numSubbands_r12_ns1; SL_CommResourcePool->dataHoppingConfig_r12.numSubbands_r12 = SL_HoppingConfigComm_r12__numSubbands_r12_ns1;
SL_CommResourcePool->dataHoppingConfig_r12.rb_Offset_r12 = 0; SL_CommResourcePool->dataHoppingConfig_r12.rb_Offset_r12 = 0;
//SL_CommResourcePool->dataHoppingConfig_r12._asn_ctx = asn_ctx_default; //SL_CommResourcePool->dataHoppingConfig_r12._asn_ctx = asn_ctx_default;
//ue_SelectedResourceConfig_r12 //ue_SelectedResourceConfig_r12
SL_CommResourcePool->ue_SelectedResourceConfig_r12 = CALLOC (1, sizeof (*SL_CommResourcePool->ue_SelectedResourceConfig_r12)); SL_CommResourcePool->ue_SelectedResourceConfig_r12 = CALLOC (1, sizeof (*SL_CommResourcePool->ue_SelectedResourceConfig_r12));
SL_CommResourcePool->ue_SelectedResourceConfig_r12->data_TF_ResourceConfig_r12.prb_Num_r12 = 0; SL_CommResourcePool->ue_SelectedResourceConfig_r12->data_TF_ResourceConfig_r12.prb_Num_r12 = 20;
SL_CommResourcePool->ue_SelectedResourceConfig_r12->data_TF_ResourceConfig_r12.prb_Start_r12 = 0; SL_CommResourcePool->ue_SelectedResourceConfig_r12->data_TF_ResourceConfig_r12.prb_Start_r12 = 5;
SL_CommResourcePool->ue_SelectedResourceConfig_r12->data_TF_ResourceConfig_r12.prb_End_r12 = 0; SL_CommResourcePool->ue_SelectedResourceConfig_r12->data_TF_ResourceConfig_r12.prb_End_r12 = 44;
SL_CommResourcePool->ue_SelectedResourceConfig_r12->data_TF_ResourceConfig_r12.offsetIndicator_r12.present = SL_OffsetIndicator_r12_PR_NOTHING; SL_CommResourcePool->ue_SelectedResourceConfig_r12->data_TF_ResourceConfig_r12.offsetIndicator_r12.present = SL_OffsetIndicator_r12_PR_small_r12;
SL_CommResourcePool->ue_SelectedResourceConfig_r12->data_TF_ResourceConfig_r12.offsetIndicator_r12.choice.small_r12 = 0 ; SL_CommResourcePool->ue_SelectedResourceConfig_r12->data_TF_ResourceConfig_r12.offsetIndicator_r12.choice.small_r12 = 0 ;
SL_CommResourcePool->ue_SelectedResourceConfig_r12->data_TF_ResourceConfig_r12.subframeBitmap_r12.present = SubframeBitmapSL_r12_PR_NOTHING; SL_CommResourcePool->ue_SelectedResourceConfig_r12->data_TF_ResourceConfig_r12.subframeBitmap_r12.present = SubframeBitmapSL_r12_PR_bs40_r12;
SL_CommResourcePool->ue_SelectedResourceConfig_r12->data_TF_ResourceConfig_r12.subframeBitmap_r12.choice.bs4_r12.size = 0; SL_CommResourcePool->ue_SelectedResourceConfig_r12->data_TF_ResourceConfig_r12.subframeBitmap_r12.choice.bs4_r12.size = 5;
SL_CommResourcePool->ue_SelectedResourceConfig_r12->data_TF_ResourceConfig_r12.subframeBitmap_r12.choice.bs4_r12.buf = NULL; SL_CommResourcePool->ue_SelectedResourceConfig_r12->data_TF_ResourceConfig_r12.subframeBitmap_r12.choice.bs4_r12.buf = CALLOC(1,5);
SL_CommResourcePool->ue_SelectedResourceConfig_r12->data_TF_ResourceConfig_r12.subframeBitmap_r12.choice.bs4_r12.bits_unused = 0; SL_CommResourcePool->ue_SelectedResourceConfig_r12->data_TF_ResourceConfig_r12.subframeBitmap_r12.choice.bs4_r12.bits_unused = 0;
SL_CommResourcePool->ue_SelectedResourceConfig_r12->data_TF_ResourceConfig_r12.subframeBitmap_r12.choice.bs4_r12.buf[0] = 0xF0;
SL_CommResourcePool->ue_SelectedResourceConfig_r12->data_TF_ResourceConfig_r12.subframeBitmap_r12.choice.bs4_r12.buf[1] = 0xFF;
SL_CommResourcePool->ue_SelectedResourceConfig_r12->data_TF_ResourceConfig_r12.subframeBitmap_r12.choice.bs4_r12.buf[2] = 0xFF;
SL_CommResourcePool->ue_SelectedResourceConfig_r12->data_TF_ResourceConfig_r12.subframeBitmap_r12.choice.bs4_r12.buf[3] = 0xFF;
SL_CommResourcePool->ue_SelectedResourceConfig_r12->data_TF_ResourceConfig_r12.subframeBitmap_r12.choice.bs4_r12.buf[4] = 0xFF;
//SL_CommResourcePool->ue_SelectedResourceConfig_r12->data_TF_ResourceConfig_r12.subframeBitmap_r12.choice.bs4_r12._asn_ctx = asn_ctx_default; //SL_CommResourcePool->ue_SelectedResourceConfig_r12->data_TF_ResourceConfig_r12.subframeBitmap_r12.choice.bs4_r12._asn_ctx = asn_ctx_default;
SL_CommResourcePool->ue_SelectedResourceConfig_r12->trpt_Subset_r12 = CALLOC (1, sizeof(*SL_CommResourcePool->ue_SelectedResourceConfig_r12->trpt_Subset_r12)); //SL_CommResourcePool->ue_SelectedResourceConfig_r12->trpt_Subset_r12 = CALLOC (1, sizeof(*SL_CommResourcePool->ue_SelectedResourceConfig_r12->trpt_Subset_r12));
//SL_CommResourcePool->ue_SelectedResourceConfig_r12->_asn_ctx = asn_ctx_default; //SL_CommResourcePool->ue_SelectedResourceConfig_r12->_asn_ctx = asn_ctx_default;
//rxParametersNCell_r12 //rxParametersNCell_r12
SL_CommResourcePool->rxParametersNCell_r12 = CALLOC (1, sizeof (*SL_CommResourcePool->rxParametersNCell_r12)); SL_CommResourcePool->rxParametersNCell_r12 = CALLOC (1, sizeof (*SL_CommResourcePool->rxParametersNCell_r12));
...@@ -1315,7 +1330,7 @@ uint8_t do_SIB23(uint8_t Mod_id, ...@@ -1315,7 +1330,7 @@ uint8_t do_SIB23(uint8_t Mod_id,
(*sib19)->lateNonCriticalExtension = NULL; (*sib19)->lateNonCriticalExtension = NULL;
//end SIB19 //end SIB19
#endif
bcch_message->message.present = BCCH_DL_SCH_MessageType_PR_c1; bcch_message->message.present = BCCH_DL_SCH_MessageType_PR_c1;
...@@ -1345,15 +1360,13 @@ uint8_t do_SIB23(uint8_t Mod_id, ...@@ -1345,15 +1360,13 @@ uint8_t do_SIB23(uint8_t Mod_id,
ASN_SEQUENCE_ADD(&bcch_message->message.choice.c1.choice.systemInformation.criticalExtensions.choice.systemInformation_r8.sib_TypeAndInfo.list,sib13_part); ASN_SEQUENCE_ADD(&bcch_message->message.choice.c1.choice.systemInformation.criticalExtensions.choice.systemInformation_r8.sib_TypeAndInfo.list,sib13_part);
} }
#endif
//Panos: Careful here! You have commented TTN's next two lines //Panos: Careful here! You have commented TTN's next two lines
//TTN - for D2D //TTN - for D2D
//ASN_SEQUENCE_ADD(&bcch_message->message.choice.c1.choice.systemInformation.criticalExtensions.choice.systemInformation_r8.sib_TypeAndInfo.list, sib18_part); ASN_SEQUENCE_ADD(&bcch_message->message.choice.c1.choice.systemInformation.criticalExtensions.choice.systemInformation_r8.sib_TypeAndInfo.list, sib18_part);
//ASN_SEQUENCE_ADD(&bcch_message->message.choice.c1.choice.systemInformation.criticalExtensions.choice.systemInformation_r8.sib_TypeAndInfo.list, sib19_part); //ASN_SEQUENCE_ADD(&bcch_message->message.choice.c1.choice.systemInformation.criticalExtensions.choice.systemInformation_r8.sib_TypeAndInfo.list, sib19_part);
//ASN_SEQUENCE_ADD(&bcch_message->message.choice.c1.choice.systemInformation.criticalExtensions.choice.systemInformation_r8.sib_TypeAndInfo.list, sib21_part); //ASN_SEQUENCE_ADD(&bcch_message->message.choice.c1.choice.systemInformation.criticalExtensions.choice.systemInformation_r8.sib_TypeAndInfo.list, sib21_part);
#endif
#ifdef XER_PRINT #ifdef XER_PRINT
xer_fprint(stdout, &asn_DEF_BCCH_DL_SCH_Message, (void*)bcch_message); xer_fprint(stdout, &asn_DEF_BCCH_DL_SCH_Message, (void*)bcch_message);
......
...@@ -287,6 +287,9 @@ static void init_SI_UE( const protocol_ctxt_t* const ctxt_pP, const uint8_t eNB_ ...@@ -287,6 +287,9 @@ static void init_SI_UE( const protocol_ctxt_t* const ctxt_pP, const uint8_t eNB_
#if defined(Rel10) || defined(Rel14) #if defined(Rel10) || defined(Rel14)
UE_rrc_inst[ctxt_pP->module_id].sib12[eNB_index] = malloc16_clear( sizeof(SystemInformationBlockType12_r9_t) ); UE_rrc_inst[ctxt_pP->module_id].sib12[eNB_index] = malloc16_clear( sizeof(SystemInformationBlockType12_r9_t) );
UE_rrc_inst[ctxt_pP->module_id].sib13[eNB_index] = malloc16_clear( sizeof(SystemInformationBlockType13_r9_t) ); UE_rrc_inst[ctxt_pP->module_id].sib13[eNB_index] = malloc16_clear( sizeof(SystemInformationBlockType13_r9_t) );
UE_rrc_inst[ctxt_pP->module_id].sib18[eNB_index] = malloc16_clear( sizeof(SystemInformationBlockType18_r12_t) );
UE_rrc_inst[ctxt_pP->module_id].sib19[eNB_index] = malloc16_clear( sizeof(SystemInformationBlockType19_r12_t) );
#endif #endif
UE_rrc_inst[ctxt_pP->module_id].SI[eNB_index] = (uint8_t*)malloc16_clear( 64 ); UE_rrc_inst[ctxt_pP->module_id].SI[eNB_index] = (uint8_t*)malloc16_clear( 64 );
...@@ -3866,14 +3869,9 @@ uint64_t arfcn_to_freq(long arfcn) { ...@@ -3866,14 +3869,9 @@ uint64_t arfcn_to_freq(long arfcn) {
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_RRC_UE_DECODE_SI, VCD_FUNCTION_IN ); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_RRC_UE_DECODE_SI, VCD_FUNCTION_IN );
// Dump contents // Dump contents
//TTN - should be modified since we use SystemInformation__criticalExtensions_PR_criticalExtensionsFuture
// instead of SystemInformation__criticalExtensions_PR_systemInformation_r8
// Panos: I brought this if condition back to previous form in order to prevent crashing. Pending to
// modify for SystemInformation__criticalExtensions_PR_criticalExtensionsFuture
if ((*si)->criticalExtensions.present == SystemInformation__criticalExtensions_PR_systemInformation_r8 || if ((*si)->criticalExtensions.present == SystemInformation__criticalExtensions_PR_systemInformation_r8 ||
(*si)->criticalExtensions.present == SystemInformation__criticalExtensions_PR_criticalExtensionsFuture) { (*si)->criticalExtensions.present == SystemInformation__criticalExtensions_PR_criticalExtensionsFuture) {
//if ((*si)->criticalExtensions.present == SystemInformation__criticalExtensions_PR_criticalExtensionsFuture) { LOG_I( RRC, "[UE] (*si)->criticalExtensions.choice.systemInformation_r8.sib_TypeAndInfo.list.count %d\n",
LOG_D( RRC, "[UE] (*si)->criticalExtensions.choice.systemInformation_r8.sib_TypeAndInfo.list.count %d\n",
(*si)->criticalExtensions.choice.systemInformation_r8.sib_TypeAndInfo.list.count ); (*si)->criticalExtensions.choice.systemInformation_r8.sib_TypeAndInfo.list.count );
} else { } else {
LOG_I( RRC, "Panos-D: decode_SI 2.3 \n"); LOG_I( RRC, "Panos-D: decode_SI 2.3 \n");
...@@ -3883,7 +3881,7 @@ uint64_t arfcn_to_freq(long arfcn) { ...@@ -3883,7 +3881,7 @@ uint64_t arfcn_to_freq(long arfcn) {
LOG_I( RRC, "Panos-D: decode_SI 3 \n"); LOG_I( RRC, "Panos-D: decode_SI 3 \n");
for (int i=0; i<(*si)->criticalExtensions.choice.systemInformation_r8.sib_TypeAndInfo.list.count; i++) { for (int i=0; i<(*si)->criticalExtensions.choice.systemInformation_r8.sib_TypeAndInfo.list.count; i++) {
LOG_D( RRC, "SI count %d\n", i ); LOG_I( RRC, "SI count %d\n", i );
struct SystemInformation_r8_IEs__sib_TypeAndInfo__Member *typeandinfo; struct SystemInformation_r8_IEs__sib_TypeAndInfo__Member *typeandinfo;
typeandinfo = (*si)->criticalExtensions.choice.systemInformation_r8.sib_TypeAndInfo.list.array[i]; typeandinfo = (*si)->criticalExtensions.choice.systemInformation_r8.sib_TypeAndInfo.list.array[i];
...@@ -4124,7 +4122,9 @@ uint64_t arfcn_to_freq(long arfcn) { ...@@ -4124,7 +4122,9 @@ uint64_t arfcn_to_freq(long arfcn) {
break; break;
} }
#endif #endif
//TTN - SIB18
#if defined(Rel10) || defined(Rel14)
//SIB18
case SystemInformation_r8_IEs__sib_TypeAndInfo__Member_PR_sib18_v1250: case SystemInformation_r8_IEs__sib_TypeAndInfo__Member_PR_sib18_v1250:
if ((UE_rrc_inst[ctxt_pP->module_id].Info[eNB_index].SIStatus&8192) == 0) { if ((UE_rrc_inst[ctxt_pP->module_id].Info[eNB_index].SIStatus&8192) == 0) {
UE_rrc_inst[ctxt_pP->module_id].Info[eNB_index].SIStatus|=8192; UE_rrc_inst[ctxt_pP->module_id].Info[eNB_index].SIStatus|=8192;
...@@ -4135,7 +4135,7 @@ uint64_t arfcn_to_freq(long arfcn) { ...@@ -4135,7 +4135,7 @@ uint64_t arfcn_to_freq(long arfcn) {
dump_sib18( UE_rrc_inst[ctxt_pP->module_id].sib18[eNB_index] ); dump_sib18( UE_rrc_inst[ctxt_pP->module_id].sib18[eNB_index] );
// adding here function to store necessary parameters to transfer to PHY layer // adding here function to store necessary parameters to transfer to PHY layer
LOG_I( RRC, "[FRAME %05"PRIu32"][RRC_UE][MOD %02"PRIu8"][][--- MAC_CONFIG_REQ (SIB18 params eNB %"PRIu8") --->][MAC_UE][MOD %02"PRIu8"][]\n", LOG_I( RRC, "[FRAME %05"PRIu32"][RRC_UE][MOD %02"PRIu8"][][--- MAC_CONFIG_REQ (SIB18 params eNB %"PRIu8") --->][MAC_UE][MOD %02"PRIu8"][]\n",
ctxt_pP->frame, ctxt_pP->module_id, eNB_index, ctxt_pP->module_id); ctxt_pP->frame, ctxt_pP->module_id, eNB_index, ctxt_pP->module_id);
//process SIB18 to transfer SL-related parameters to PHY //process SIB18 to transfer SL-related parameters to PHY
rrc_ue_process_sidelink_radioResourceConfig(ctxt_pP->module_id,eNB_index, rrc_ue_process_sidelink_radioResourceConfig(ctxt_pP->module_id,eNB_index,
...@@ -4143,34 +4143,34 @@ uint64_t arfcn_to_freq(long arfcn) { ...@@ -4143,34 +4143,34 @@ uint64_t arfcn_to_freq(long arfcn) {
(SystemInformationBlockType19_r12_t *)NULL, (SystemInformationBlockType19_r12_t *)NULL,
(SL_CommConfig_r12_t *)NULL, (SL_CommConfig_r12_t *)NULL,
(SL_DiscConfig_r12_t *)NULL (SL_DiscConfig_r12_t *)NULL
); );
} }
break; break;
//TTN - SIB19 //SIB19
case SystemInformation_r8_IEs__sib_TypeAndInfo__Member_PR_sib19_v1250: case SystemInformation_r8_IEs__sib_TypeAndInfo__Member_PR_sib19_v1250:
if ((UE_rrc_inst[ctxt_pP->module_id].Info[eNB_index].SIStatus&16384) == 0) { if ((UE_rrc_inst[ctxt_pP->module_id].Info[eNB_index].SIStatus&16384) == 0) {
UE_rrc_inst[ctxt_pP->module_id].Info[eNB_index].SIStatus|=16384; UE_rrc_inst[ctxt_pP->module_id].Info[eNB_index].SIStatus|=16384;
new_sib=1; new_sib=1;
memcpy( UE_rrc_inst[ctxt_pP->module_id].sib19[eNB_index], &typeandinfo->choice.sib19_v1250, sizeof(SystemInformationBlockType19_r12_t) );
LOG_I( RRC, "[UE %"PRIu8"] Frame %"PRIu32" Found SIB19 from eNB %"PRIu8"\n", ctxt_pP->module_id, ctxt_pP->frame, eNB_index );
dump_sib19( UE_rrc_inst[ctxt_pP->module_id].sib19[eNB_index] );
// adding here function to store necessary parameters to transfer to PHY layer
LOG_I( RRC, "[FRAME %05"PRIu32"][RRC_UE][MOD %02"PRIu8"][][--- MAC_CONFIG_REQ (SIB19 params eNB %"PRIu8") --->][MAC_UE][MOD %02"PRIu8"][]\n",
ctxt_pP->frame, ctxt_pP->module_id, eNB_index, ctxt_pP->module_id);
//process SIB19 to transfer SL-related parameters to PHY
rrc_ue_process_sidelink_radioResourceConfig(ctxt_pP->module_id,eNB_index,
(SystemInformationBlockType18_r12_t *)NULL,
UE_rrc_inst[ctxt_pP->module_id].sib19[eNB_index],
(SL_CommConfig_r12_t *)NULL,
(SL_DiscConfig_r12_t *)NULL
);
} memcpy( UE_rrc_inst[ctxt_pP->module_id].sib19[eNB_index], &typeandinfo->choice.sib19_v1250, sizeof(SystemInformationBlockType19_r12_t) );
break; LOG_I( RRC, "[UE %"PRIu8"] Frame %"PRIu32" Found SIB19 from eNB %"PRIu8"\n", ctxt_pP->module_id, ctxt_pP->frame, eNB_index );
dump_sib19( UE_rrc_inst[ctxt_pP->module_id].sib19[eNB_index] );
// adding here function to store necessary parameters to transfer to PHY layer
LOG_I( RRC, "[FRAME %05"PRIu32"][RRC_UE][MOD %02"PRIu8"][][--- MAC_CONFIG_REQ (SIB19 params eNB %"PRIu8") --->][MAC_UE][MOD %02"PRIu8"][]\n",
ctxt_pP->frame, ctxt_pP->module_id, eNB_index, ctxt_pP->module_id);
//process SIB19 to transfer SL-related parameters to PHY
rrc_ue_process_sidelink_radioResourceConfig(ctxt_pP->module_id,eNB_index,
(SystemInformationBlockType18_r12_t *)NULL,
UE_rrc_inst[ctxt_pP->module_id].sib19[eNB_index],
(SL_CommConfig_r12_t *)NULL,
(SL_DiscConfig_r12_t *)NULL
);
}
break;
#endif
default: default:
break; break;
} }
......
...@@ -248,6 +248,44 @@ init_SI( ...@@ -248,6 +248,44 @@ init_SI(
RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sib2->radioResourceConfigCommon.pusch_ConfigCommon. RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sib2->radioResourceConfigCommon.pusch_ConfigCommon.
ul_ReferenceSignalsPUSCH.cyclicShift); ul_ReferenceSignalsPUSCH.cyclicShift);
#if defined(Rel10) || defined(Rel14)
if (RC.rrc[ctxt_pP->module_id]->carrier[CC_id].MBMS_flag > 0) {
for (i = 0; i < RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sib2->mbsfn_SubframeConfigList->list.count; i++) {
// SIB 2
// LOG_D(RRC, "[eNB %d] mbsfn_SubframeConfigList.list.count = %ld\n", enb_mod_idP, RC.rrc[enb_mod_idP].sib2->mbsfn_SubframeConfigList->list.count);
LOG_D(RRC, PROTOCOL_RRC_CTXT_FMT" SIB13 contents for MBSFN subframe allocation %d/%d(partial)\n",
PROTOCOL_RRC_CTXT_ARGS(ctxt_pP),
i,
RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sib2->mbsfn_SubframeConfigList->list.count);
LOG_D(RRC, PROTOCOL_RRC_CTXT_FMT" mbsfn_Subframe_pattern is = %x\n",
PROTOCOL_RRC_CTXT_ARGS(ctxt_pP),
RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sib2->mbsfn_SubframeConfigList->list.array[i]->subframeAllocation.choice.oneFrame.buf[0] >> 0);
LOG_D(RRC, PROTOCOL_RRC_CTXT_FMT" radioframe_allocation_period = %ld (just index number, not the real value)\n",
PROTOCOL_RRC_CTXT_ARGS(ctxt_pP),
RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sib2->mbsfn_SubframeConfigList->list.array[i]->radioframeAllocationPeriod); // need to display the real value, using array of char (like in dumping SIB2)
LOG_D(RRC, PROTOCOL_RRC_CTXT_FMT" radioframe_allocation_offset = %ld\n",
PROTOCOL_RRC_CTXT_ARGS(ctxt_pP),
RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sib2->mbsfn_SubframeConfigList->list.array[i]->radioframeAllocationOffset);
}
// SIB13
for (i = 0; i < RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sib13->mbsfn_AreaInfoList_r9.list.count; i++) {
LOG_D(RRC, PROTOCOL_RRC_CTXT_FMT" SIB13 contents for MBSFN sync area %d/%d (partial)\n",
PROTOCOL_RRC_CTXT_ARGS(ctxt_pP),
i,
RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sib13->mbsfn_AreaInfoList_r9.list.count);
LOG_D(RRC, PROTOCOL_RRC_CTXT_FMT" MCCH Repetition Period: %ld (just index number, not real value)\n",
PROTOCOL_RRC_CTXT_ARGS(ctxt_pP),
RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sib13->mbsfn_AreaInfoList_r9.list.array[i]->mcch_Config_r9.mcch_RepetitionPeriod_r9);
LOG_D(RRC, PROTOCOL_RRC_CTXT_FMT" MCCH Offset: %ld\n",
PROTOCOL_RRC_CTXT_ARGS(ctxt_pP),
RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sib13->mbsfn_AreaInfoList_r9.list.array[i]->mcch_Config_r9.mcch_Offset_r9);
}
}
else memset((void*)&RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sib13,0,sizeof(RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sib13));
//TTN - SIB 18 //TTN - SIB 18
for (int j = 0; j < RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sib18->commConfig_r12->commRxPool_r12.list.count; j++) { for (int j = 0; j < RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sib18->commConfig_r12->commRxPool_r12.list.count; j++) {
LOG_I(RRC, PROTOCOL_RRC_CTXT_FMT" Contents of SIB18 %d/%d \n", LOG_I(RRC, PROTOCOL_RRC_CTXT_FMT" Contents of SIB18 %d/%d \n",
...@@ -317,43 +355,6 @@ init_SI( ...@@ -317,43 +355,6 @@ init_SI(
} }
#if defined(Rel10) || defined(Rel14)
if (RC.rrc[ctxt_pP->module_id]->carrier[CC_id].MBMS_flag > 0) {
for (i = 0; i < RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sib2->mbsfn_SubframeConfigList->list.count; i++) {
// SIB 2
// LOG_D(RRC, "[eNB %d] mbsfn_SubframeConfigList.list.count = %ld\n", enb_mod_idP, RC.rrc[enb_mod_idP].sib2->mbsfn_SubframeConfigList->list.count);
LOG_D(RRC, PROTOCOL_RRC_CTXT_FMT" SIB13 contents for MBSFN subframe allocation %d/%d(partial)\n",
PROTOCOL_RRC_CTXT_ARGS(ctxt_pP),
i,
RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sib2->mbsfn_SubframeConfigList->list.count);
LOG_D(RRC, PROTOCOL_RRC_CTXT_FMT" mbsfn_Subframe_pattern is = %x\n",
PROTOCOL_RRC_CTXT_ARGS(ctxt_pP),
RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sib2->mbsfn_SubframeConfigList->list.array[i]->subframeAllocation.choice.oneFrame.buf[0] >> 0);
LOG_D(RRC, PROTOCOL_RRC_CTXT_FMT" radioframe_allocation_period = %ld (just index number, not the real value)\n",
PROTOCOL_RRC_CTXT_ARGS(ctxt_pP),
RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sib2->mbsfn_SubframeConfigList->list.array[i]->radioframeAllocationPeriod); // need to display the real value, using array of char (like in dumping SIB2)
LOG_D(RRC, PROTOCOL_RRC_CTXT_FMT" radioframe_allocation_offset = %ld\n",
PROTOCOL_RRC_CTXT_ARGS(ctxt_pP),
RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sib2->mbsfn_SubframeConfigList->list.array[i]->radioframeAllocationOffset);
}
// SIB13
for (i = 0; i < RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sib13->mbsfn_AreaInfoList_r9.list.count; i++) {
LOG_D(RRC, PROTOCOL_RRC_CTXT_FMT" SIB13 contents for MBSFN sync area %d/%d (partial)\n",
PROTOCOL_RRC_CTXT_ARGS(ctxt_pP),
i,
RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sib13->mbsfn_AreaInfoList_r9.list.count);
LOG_D(RRC, PROTOCOL_RRC_CTXT_FMT" MCCH Repetition Period: %ld (just index number, not real value)\n",
PROTOCOL_RRC_CTXT_ARGS(ctxt_pP),
RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sib13->mbsfn_AreaInfoList_r9.list.array[i]->mcch_Config_r9.mcch_RepetitionPeriod_r9);
LOG_D(RRC, PROTOCOL_RRC_CTXT_FMT" MCCH Offset: %ld\n",
PROTOCOL_RRC_CTXT_ARGS(ctxt_pP),
RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sib13->mbsfn_AreaInfoList_r9.list.array[i]->mcch_Config_r9.mcch_Offset_r9);
}
}
else memset((void*)&RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sib13,0,sizeof(RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sib13));
#endif #endif
LOG_D(RRC, LOG_D(RRC,
......
...@@ -108,6 +108,26 @@ eNBs = ...@@ -108,6 +108,26 @@ eNBs =
ue_TimersAndConstants_n310 = 20; ue_TimersAndConstants_n310 = 20;
ue_TimersAndConstants_n311 = 1; ue_TimersAndConstants_n311 = 1;
ue_TransmissionMode = 1; ue_TransmissionMode = 1;
//Parameters for SIB18
rxPool_sc_CP_Len = "normal";
rxPool_sc_Period = "sf40";
rxPool_data_CP_Len = "normal";
rxPool_ResourceConfig_prb_Num = 20;
rxPool_ResourceConfig_prb_Start = 5;
rxPool_ResourceConfig_prb_End = 44;
rxPool_ResourceConfig_offsetIndicator_present = "prSmall";
rxPool_ResourceConfig_offsetIndicator_choice = 0;
rxPool_ResourceConfig_subframeBitmap_present = "prBs40";
rxPool_ResourceConfig_subframeBitmap_choice_bs_buf = "00000000000000000000";
rxPool_ResourceConfig_subframeBitmap_choice_bs_size = 5;
rxPool_ResourceConfig_subframeBitmap_choice_bs_bits_unused = 0;
/* rxPool_dataHoppingConfig_hoppingParameter = 0;
rxPool_dataHoppingConfig_numSubbands = "ns1";
rxPool_dataHoppingConfig_rbOffset = 0;
rxPool_commTxResourceUC-ReqAllowed = "TRUE";
*/
} }
); );
......
...@@ -299,9 +299,11 @@ void init_UE_stub(int nb_inst,int eMBMS_active, int uecap_xer_in, char *emul_ifa ...@@ -299,9 +299,11 @@ void init_UE_stub(int nb_inst,int eMBMS_active, int uecap_xer_in, char *emul_ifa
printf("UE threads created \n"); printf("UE threads created \n");
LOG_I(PHY,"Starting multicast link on %s\n",emul_iface); LOG_I(PHY,"Starting multicast link on %s\n",emul_iface);
if(nfapi_mode !=3)
multicast_link_start(ue_stub_rx_handler,0,emul_iface); multicast_link_start(ue_stub_rx_handler,0,emul_iface);
} }
...@@ -964,6 +966,7 @@ static void *UE_phy_stub_thread_rxn_txnp4(void *arg) { ...@@ -964,6 +966,7 @@ static void *UE_phy_stub_thread_rxn_txnp4(void *arg) {
//stop_meas(&UE->timer_stats); //stop_meas(&UE->timer_stats);
//t_diff = get_time_meas_us(&UE->timer_stats); //t_diff = get_time_meas_us(&UE->timer_stats);
//LOG_E(MAC," Panos-D Absolute time: %f\n", t_diff); //LOG_E(MAC," Panos-D Absolute time: %f\n", t_diff);
if (nfapi_mode != 3)
phy_procedures_UE_SL_TX(UE,proc); phy_procedures_UE_SL_TX(UE,proc);
//#endif //#endif
} }
......
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