Commit f2adfcee authored by islam.galal's avatar islam.galal

Merge branch 'RU-RAU-split' of...

Merge branch 'RU-RAU-split' of http://gitlab.eurecom.fr/raymond.knopp/openairinterface5g into RU-RAU-split
parents 32201bf3 f0376c7e
......@@ -205,7 +205,7 @@ typedef struct RrcConfigurationReq_s {
long si_WindowLength_BR_r13 [MAX_NUM_CCs];
long si_RepetitionPattern_r13 [MAX_NUM_CCs];
BOOLEAN_t fdd_DownlinkOrTddSubframeBitmapBR_r13 [MAX_NUM_CCs];
BOOLEAN_t * fdd_DownlinkOrTddSubframeBitmapBR_r13 [MAX_NUM_CCs];
uint64_t fdd_DownlinkOrTddSubframeBitmapBR_val_r13 [MAX_NUM_CCs];
uint16_t fdd_UplinkSubframeBitmapBR_r13 [MAX_NUM_CCs];
long startSymbolBR_r13 [MAX_NUM_CCs];
......
......@@ -22,10 +22,10 @@
/*
enb_config.c
-------------------
AUTHOR : Lionel GAUTHIER, navid nikaein, Laurent Winckel
COMPANY : EURECOM
EMAIL : Lionel.Gauthier@eurecom.fr, navid.nikaein@eurecom.fr
*/
AUTHOR : Lionel GAUTHIER, navid nikaein, Laurent Winckel
COMPANY : EURECOM
EMAIL : Lionel.Gauthier@eurecom.fr, navid.nikaein@eurecom.fr
*/
#include <string.h>
#include <libconfig.h>
......@@ -3771,8 +3771,6 @@ int RCconfig_RRC(MessageDef *msg_p, uint32_t i, eNB_RRC_INST *rrc) {
RRC_CONFIGURATION_REQ(msg_p).bandwidthReducedAccessRelatedInfo_r13[j] = TRUE;
if (!config_setting_lookup_int(setting_br13, ENB_CONFIG_STRING_SI_WINDOWLENGTH_BR, &si_WindowLength_BR_r13) ||
!config_setting_lookup_int(setting_br13, ENB_CONFIG_STRING_SI_REPETITIONPATTERN, &si_RepetitionPattern_r13) ||
!config_setting_lookup_string(setting_br13, ENB_CONFIG_STRING_FDD_DLORTDD_SFB_BR, &fdd_DownlinkOrTddSubframeBitmapBR_r13) ||
!config_setting_lookup_int64(setting_br13, ENB_CONFIG_STRING_FDD_DLORTDDSFB_BR_VAL, &fdd_DownlinkOrTddSubframeBitmapBR_val_r13) ||
!config_setting_lookup_int(setting_br13, ENB_CONFIG_STRING_FDD_ULSUBFRAMEBITMAPBR, &fdd_UplinkSubframeBitmapBR_r13) ||
!config_setting_lookup_int(setting_br13, ENB_CONFIG_STRING_STARTSYMBOLBR, &startSymbolBR_r13) ||
!config_setting_lookup_int(setting_br13, ENB_CONFIG_STRING_SI_HOPPINGCONFIGCOMMON, &si_HoppingConfigCommon_r13))
......@@ -3782,13 +3780,29 @@ int RCconfig_RRC(MessageDef *msg_p, uint32_t i, eNB_RRC_INST *rrc) {
RC.config_file_name, i);
}
RRC_CONFIGURATION_REQ(msg_p).si_WindowLength_BR_r13[j] = si_WindowLength_BR_r13;
RRC_CONFIGURATION_REQ(msg_p).si_RepetitionPattern_r13[j] = si_RepetitionPattern_r13;
bool fdd_downlink_exist = config_setting_lookup_string(setting_br13, ENB_CONFIG_STRING_FDD_DLORTDD_SFB_BR, &fdd_DownlinkOrTddSubframeBitmapBR_r13);
if (fdd_downlink_exist)
{
RRC_CONFIGURATION_REQ(msg_p).fdd_DownlinkOrTddSubframeBitmapBR_r13[j] = CALLOC(1, sizeof(BOOLEAN_t));
if (!strcmp(fdd_DownlinkOrTddSubframeBitmapBR_r13, "subframePattern40-r13"))
RRC_CONFIGURATION_REQ(msg_p).fdd_DownlinkOrTddSubframeBitmapBR_r13[j] = FALSE;
*RRC_CONFIGURATION_REQ(msg_p).fdd_DownlinkOrTddSubframeBitmapBR_r13[j] = FALSE;
else
RRC_CONFIGURATION_REQ(msg_p).fdd_DownlinkOrTddSubframeBitmapBR_r13[j] = TRUE;
*RRC_CONFIGURATION_REQ(msg_p).fdd_DownlinkOrTddSubframeBitmapBR_r13[j] = TRUE;
config_setting_lookup_int64(setting_br13, ENB_CONFIG_STRING_FDD_DLORTDDSFB_BR_VAL, &fdd_DownlinkOrTddSubframeBitmapBR_val_r13);
RRC_CONFIGURATION_REQ(msg_p).fdd_DownlinkOrTddSubframeBitmapBR_val_r13[j] = fdd_DownlinkOrTddSubframeBitmapBR_val_r13;
}
else
{
RRC_CONFIGURATION_REQ(msg_p).fdd_DownlinkOrTddSubframeBitmapBR_r13[j] = NULL;
}
RRC_CONFIGURATION_REQ(msg_p).si_WindowLength_BR_r13[j] = si_WindowLength_BR_r13;
RRC_CONFIGURATION_REQ(msg_p).si_RepetitionPattern_r13[j] = si_RepetitionPattern_r13;
RRC_CONFIGURATION_REQ(msg_p).fdd_UplinkSubframeBitmapBR_r13[j] = fdd_UplinkSubframeBitmapBR_r13;
RRC_CONFIGURATION_REQ(msg_p).si_HoppingConfigCommon_r13[j] = si_HoppingConfigCommon_r13;
RRC_CONFIGURATION_REQ(msg_p).startSymbolBR_r13[j] = startSymbolBR_r13;
......@@ -4236,8 +4250,8 @@ int RCconfig_RRC(MessageDef *msg_p, uint32_t i, eNB_RRC_INST *rrc) {
}
}
}
}
int RCconfig_gtpu() {
}
int RCconfig_gtpu() {
config_t cfg;
config_setting_t *setting = NULL;
config_setting_t *subsetting = NULL;
......@@ -4317,10 +4331,10 @@ int RCconfig_gtpu() {
}
}
}
}
}
int RCconfig_S1(MessageDef *msg_p, uint32_t i) {
int RCconfig_S1(MessageDef *msg_p, uint32_t i) {
config_t cfg;
config_setting_t *setting = NULL;
config_setting_t *subsetting = NULL;
......@@ -4585,9 +4599,9 @@ int RCconfig_S1(MessageDef *msg_p, uint32_t i) {
}
}
return;
}
}
void RCConfig(const char *config_file_name) {
void RCConfig(const char *config_file_name) {
config_t cfg;
config_setting_t *setting = NULL;
......@@ -4638,4 +4652,4 @@ void RCConfig(const char *config_file_name) {
}
return;
}
}
......@@ -212,7 +212,7 @@ void generate_Msg2(module_id_t module_idP,int CC_idP,frame_t frameP,sub_frame_t
first_rb = narrowband_to_first_rb(&cc[CC_idP],RA_template->msg2_narrowband);
if ((RA_template->msg2_mpdcch_repetition_cnt == 0) &&
(mpdcch_sf_condition(eNB,CC_idP,frameP,subframeP,rmax,TYPE2)>0)){
(mpdcch_sf_condition(eNB,CC_idP,frameP,subframeP,rmax,TYPE2,-1)>0)){
// MPDCCH configuration for RAR
......@@ -561,7 +561,7 @@ void generate_Msg4(module_id_t module_idP,int CC_idP,frame_t frameP,sub_frame_t
first_rb = narrowband_to_first_rb(&cc[CC_idP],RA_template->msg34_narrowband);
if ((RA_template->msg4_mpdcch_repetition_cnt == 0) &&
(mpdcch_sf_condition(eNB,CC_idP,frameP,subframeP,rmax,TYPE2)>0)){
(mpdcch_sf_condition(eNB,CC_idP,frameP,subframeP,rmax,TYPE2,-1)>0)){
// MPDCCH configuration for RAR
memset((void*)dl_config_pdu,0,sizeof(nfapi_dl_config_request_pdu_t));
......
......@@ -416,14 +416,14 @@ set_ul_DAI(
void getRepetition(UE_TEMPLATE * pue_template,unsigned int *maxRep , unsigned int *narrowBandindex, unsigned int *first_rb){
EPDCCH_SetConfig_r11_t *epdcch_setconfig_r11;
AssertFatal(pue_template->physicalConfigDedicated, "no RRC physical configuration for this UE ") ;
AssertFatal(pue_template->physicalConfigDedicated->ext4, "no RRC physical configuration for this UE ") ;
AssertFatal(pue_template->physicalConfigDedicated !=NULL, "no RRC physical configuration for this UE ") ;
AssertFatal(pue_template->physicalConfigDedicated->ext4 !=NULL, "no RRC physical configuration for this UE ") ;
AssertFatal(pue_template->physicalConfigDedicated->ext4->epdcch_Config_r11->config_r11.choice.setup.setConfigToAddModList_r11->list.count > 0 ,"epdcch config list is empty") ;
epdcch_setconfig_r11 = pue_template->physicalConfigDedicated->ext4->epdcch_Config_r11->config_r11.choice.setup.setConfigToAddModList_r11->list.array[0] ;
AssertFatal(epdcch_setconfig_r11->ext2 && epdcch_setconfig_r11->ext2->mpdcch_config_r13 ," mpdcch config not found") ;
AssertFatal(epdcch_setconfig_r11->ext2 !=NULL && epdcch_setconfig_r11->ext2->mpdcch_config_r13 !=NULL," mpdcch config not found") ;
*maxRep = epdcch_setconfig_r11->ext2->mpdcch_config_r13->choice.setup.mpdcch_NumRepetition_r13 ;
......@@ -431,33 +431,6 @@ void getRepetition(UE_TEMPLATE * pue_template,unsigned int *maxRep , unsigned i
/*
epdcch_setconfig_r11->setConfigId_r11 = 0;
epdcch_setconfig_r11->transmissionType_r11 = EPDCCH_SetConfig_r11__transmissionType_r11_localised;
epdcch_setconfig_r11->resourceBlockAssignment_r11.numberPRB_Pairs_r11 = EPDCCH_SetConfig_r11__resourceBlockAssignment_r11__numberPRB_Pairs_r11_n2;
//epdcch_setconfig_r11->resourceBlockAssignment_r11.resourceBlockAssignment_r11 = calloc(0, sizeof(BIT_STRING_t));
epdcch_setconfig_r11->resourceBlockAssignment_r11.resourceBlockAssignment_r11.buf = calloc(0, 2 * sizeof(uint8_t));
epdcch_setconfig_r11->resourceBlockAssignment_r11.resourceBlockAssignment_r11.size = 2;
epdcch_setconfig_r11->resourceBlockAssignment_r11.resourceBlockAssignment_r11.bits_unused = 6;
epdcch_setconfig_r11->resourceBlockAssignment_r11.resourceBlockAssignment_r11.buf[0] = 0x0E;
epdcch_setconfig_r11->dmrs_ScramblingSequenceInt_r11 = 0;
epdcch_setconfig_r11->pucch_ResourceStartOffset_r11 = 0;
epdcch_setconfig_r11->re_MappingQCL_ConfigId_r11 = NULL;
epdcch_setconfig_r11->ext2 = calloc(1, sizeof(struct EPDCCH_SetConfig_r11__ext2));
epdcch_setconfig_r11->ext2->numberPRB_Pairs_v1310 = NULL;
epdcch_setconfig_r11->ext2->mpdcch_config_r13 = calloc(1, sizeof(struct EPDCCH_SetConfig_r11__ext2__mpdcch_config_r13));
epdcch_setconfig_r11->ext2->mpdcch_config_r13->present = EPDCCH_SetConfig_r11__ext2__mpdcch_config_r13_PR_setup;
epdcch_setconfig_r11->ext2->mpdcch_config_r13->choice.setup.csi_NumRepetitionCE_r13 = EPDCCH_SetConfig_r11__ext2__mpdcch_config_r13__setup__csi_NumRepetitionCE_r13_sf1;
epdcch_setconfig_r11->ext2->mpdcch_config_r13->choice.setup.mpdcch_pdsch_HoppingConfig_r13 = EPDCCH_SetConfig_r11__ext2__mpdcch_config_r13__setup__mpdcch_pdsch_HoppingConfig_r13_off;
epdcch_setconfig_r11->ext2->mpdcch_config_r13->choice.setup.mpdcch_StartSF_UESS_r13.present = EPDCCH_SetConfig_r11__ext2__mpdcch_config_r13__setup__mpdcch_StartSF_UESS_r13_PR_fdd_r13;
epdcch_setconfig_r11->ext2->mpdcch_config_r13->choice.setup.mpdcch_StartSF_UESS_r13.choice.fdd_r13 = EPDCCH_SetConfig_r11__ext2__mpdcch_config_r13__setup__mpdcch_StartSF_UESS_r13__fdd_r13_v1;
epdcch_setconfig_r11->ext2->mpdcch_config_r13->choice.setup.mpdcch_NumRepetition_r13 = EPDCCH_SetConfig_r11__ext2__mpdcch_config_r13__setup__mpdcch_NumRepetition_r13_r1;
epdcch_setconfig_r11->ext2->mpdcch_config_r13->choice.setup.mpdcch_Narrowband_r13 = 3;
ASN_SEQUENCE_ADD(physicalConfigDedicated2->ext4->epdcch_Config_r11->config_r11.choice.setup.setConfigToAddModList_r11, epdcch_setconfig_r11);
*/
}
......@@ -778,7 +751,7 @@ schedule_ue_spec_br(
vrb_map[first_rb + 5] = 1;
if ((UE_list->UE_template[CC_id][UE_id].mpdcch_repetition_cnt == 0) &&
(mpdcch_sf_condition(eNB, CC_id, frameP, subframeP, rmax, TYPEUESPEC) > 0))
(mpdcch_sf_condition(eNB, CC_id, frameP, subframeP, rmax, TYPEUESPEC,UE_id) > 0))
{
// MPDCCH configuration for RAR
dl_config_pdu = &dl_req->dl_config_pdu_list[dl_req->number_pdu];
......@@ -1393,7 +1366,7 @@ schedule_ue_spec_br(
vrb_map[first_rb + 5] = 1;
if ((UE_list->UE_template[CC_id][UE_id].mpdcch_repetition_cnt == 0) &&
(mpdcch_sf_condition(eNB, CC_id, frameP, subframeP, rmax, TYPEUESPEC) > 0))
(mpdcch_sf_condition(eNB, CC_id, frameP, subframeP, rmax, TYPEUESPEC,UE_id) > 0))
{
// MPDCCH configuration for RAR
dl_config_pdu = &dl_req->dl_config_pdu_list[dl_req->number_pdu];
......
......@@ -486,9 +486,13 @@ int get_numnarrowbandbits(long dl_Bandwidth) {
int startSF_fdd_RA_times2[8] = {2,3,4,5,8,10,16,20};
int startSF_tdd_RA[7] = {1,2,4,5,8,10,20};
int mpdcch_sf_condition(eNB_MAC_INST *eNB,int CC_id, frame_t frameP,sub_frame_t subframeP,int rmax,MPDCCH_TYPES_t mpdcch_type) {
int mpdcch_sf_condition(eNB_MAC_INST *eNB,int CC_id, frame_t frameP,sub_frame_t subframeP,int rmax,MPDCCH_TYPES_t mpdcch_type,int UE_id) {
struct PRACH_ConfigSIB_v1310 *ext4_prach = eNB->common_channels[CC_id].radioResourceConfigCommon_BR->ext4->prach_ConfigCommon_v1310;
EPDCCH_SetConfig_r11_t *epdcch_setconfig_r11= eNB->UE_list ->UE_template[CC_id][UE_id].physicalConfigDedicated->ext4->epdcch_Config_r11->config_r11.choice.setup.setConfigToAddModList_r11->list.array[0] ;
int T;
switch (mpdcch_type) {
......@@ -513,7 +517,14 @@ int mpdcch_sf_condition(eNB_MAC_INST *eNB,int CC_id, frame_t frameP,sub_frame_t
AssertFatal(1==0,"MPDCCH Type 2A not handled yet\n");
break;
case TYPEUESPEC:
AssertFatal(1==0,"MPDCCH Type UESPEC not handled yet\n");
AssertFatal(epdcch_setconfig_r11 != NULL," epdcch_setconfig_r11 is null for UE specific \n");
AssertFatal(epdcch_setconfig_r11->ext2 != NULL," ext2 doesn't exist in epdcch config ' \n");
if (eNB->common_channels[CC_id].tdd_Config==NULL) //FDD
T = rmax*startSF_fdd_RA_times2[epdcch_setconfig_r11->ext2->mpdcch_config_r13->choice.setup.mpdcch_StartSF_UESS_r13.choice.fdd_r13]>>1;
else //TDD
T = rmax*startSF_tdd_RA[epdcch_setconfig_r11->ext2->mpdcch_config_r13->choice.setup.mpdcch_StartSF_UESS_r13.choice.tdd_r13];
break;
default:
return(0);
......
......@@ -905,7 +905,7 @@ uint8_t subframe2harqpid(COMMON_channels_t *cc,frame_t frame,sub_frame_t subfram
#ifdef Rel14
int get_numnarrowbandbits(long dl_Bandwidth);
int mpdcch_sf_condition(eNB_MAC_INST *eNB,int CC_id, frame_t frameP,sub_frame_t subframeP,int rmax,MPDCCH_TYPES_t mpdcch_type);
int mpdcch_sf_condition(eNB_MAC_INST *eNB,int CC_id, frame_t frameP,sub_frame_t subframeP,int rmax,MPDCCH_TYPES_t mpdcch_type,int UE_id);
int get_numnarrowbands(long dl_Bandwidth);
......
......@@ -587,12 +587,15 @@ uint8_t do_SIB1(rrc_eNB_carrier_data_t *carrier,
ASN_SEQUENCE_ADD(&sib1_1310->bandwidthReducedAccessRelatedInfo_r13->schedulingInfoList_BR_r13->list, schedulinginfo_br_13);
}
if (configuration->fdd_DownlinkOrTddSubframeBitmapBR_r13[CC_id])
{
sib1_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_DownlinkOrTddSubframeBitmapBR_r13
= calloc(1, sizeof(struct SystemInformationBlockType1_v1310_IEs__bandwidthReducedAccessRelatedInfo_r13__fdd_DownlinkOrTddSubframeBitmapBR_r13));
memset(sib1_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_DownlinkOrTddSubframeBitmapBR_r13, 0,
sizeof(sizeof(struct SystemInformationBlockType1_v1310_IEs__bandwidthReducedAccessRelatedInfo_r13__fdd_DownlinkOrTddSubframeBitmapBR_r13)));
if (configuration->bandwidthReducedAccessRelatedInfo_r13[CC_id])
if (*configuration->fdd_DownlinkOrTddSubframeBitmapBR_r13[CC_id])
{
sib1_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_DownlinkOrTddSubframeBitmapBR_r13->present
= SystemInformationBlockType1_v1310_IEs__bandwidthReducedAccessRelatedInfo_r13__fdd_DownlinkOrTddSubframeBitmapBR_r13_PR_subframePattern10_r13;
......@@ -613,6 +616,12 @@ uint8_t do_SIB1(rrc_eNB_carrier_data_t *carrier,
sib1_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_DownlinkOrTddSubframeBitmapBR_r13->choice.subframePattern40_r13.bits_unused = 0;
}
}
else
{
sib1_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_DownlinkOrTddSubframeBitmapBR_r13 = NULL;
}
sib1_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_UplinkSubframeBitmapBR_r13 = calloc(1, sizeof(BIT_STRING_t));
memset(sib1_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_UplinkSubframeBitmapBR_r13, 0, sizeof(BIT_STRING_t));
sib1_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_UplinkSubframeBitmapBR_r13->buf = calloc(2, sizeof(uint8_t));
......@@ -2275,6 +2284,8 @@ do_RRCConnectionSetup_BR(
epdcch_setconfig_r11->ext2->mpdcch_config_r13->choice.setup.mpdcch_Narrowband_r13 = 3;
ASN_SEQUENCE_ADD(physicalConfigDedicated2->ext4->epdcch_Config_r11->config_r11.choice.setup.setConfigToAddModList_r11, epdcch_setconfig_r11);
// FIXME allocate physicalConfigDedicated2->ext7
physicalConfigDedicated2->ext7 = CALLOC(1, sizeof(struct PhysicalConfigDedicated__ext7));
physicalConfigDedicated2->ext7->pdsch_ConfigDedicated_v1310 = NULL;
physicalConfigDedicated2->ext7->pusch_ConfigDedicated_r13 = NULL;
......@@ -2290,6 +2301,8 @@ do_RRCConnectionSetup_BR(
physicalConfigDedicated2->ext7->csi_RS_Config_v1310 = NULL;
// FIXME ce_Mode_r13 allocation
physicalConfigDedicated2->ext7->ce_Mode_r13 = CALLOC(1, sizeof(struct PhysicalConfigDedicated__ext7__ce_Mode_r13));
physicalConfigDedicated2->ext7->ce_Mode_r13->present = PhysicalConfigDedicated__ext7__ce_Mode_r13_PR_setup;
physicalConfigDedicated2->ext7->ce_Mode_r13->choice.setup = PhysicalConfigDedicated__ext7__ce_Mode_r13__setup_ce_ModeA;
physicalConfigDedicated2->ext7->csi_RS_ConfigNZPToAddModListExt_r13 = NULL;
......
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