Commit 7876b46f authored by Raymond Knopp's avatar Raymond Knopp

Merge branch 'RU-RAU-split' of https://gitlab.eurecom.fr/oai/openairinterface5g into RU-RAU-split

Conflicts:
	openair2/LAYER2/MAC/eNB_scheduler_bch.c
parents 5801bf7c 73560827
...@@ -209,7 +209,7 @@ void generate_Msg2(module_id_t module_idP,int CC_idP,frame_t frameP,sub_frame_t ...@@ -209,7 +209,7 @@ void generate_Msg2(module_id_t module_idP,int CC_idP,frame_t frameP,sub_frame_t
// get narrowband according to higher-layer config // get narrowband according to higher-layer config
num_nb = p[RA_template->rach_resource_type-1]->mpdcch_NarrowbandsToMonitor_r13.list.count; num_nb = p[RA_template->rach_resource_type-1]->mpdcch_NarrowbandsToMonitor_r13.list.count;
RA_template->msg2_narrowband = *p[RA_template->rach_resource_type-1]->mpdcch_NarrowbandsToMonitor_r13.list.array[RA_template->preamble_index%num_nb]; RA_template->msg2_narrowband = *p[RA_template->rach_resource_type-1]->mpdcch_NarrowbandsToMonitor_r13.list.array[RA_template->preamble_index%num_nb];
first_rb = RA_template->msg2_narrowband*6; first_rb = narrowband_to_first_rb(&cc[CC_idP],RA_template->msg2_narrowband);
if ((RA_template->msg2_mpdcch_repetition_cnt == 0) && 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)>0)){
...@@ -555,8 +555,8 @@ void generate_Msg4(module_id_t module_idP,int CC_idP,frame_t frameP,sub_frame_t ...@@ -555,8 +555,8 @@ void generate_Msg4(module_id_t module_idP,int CC_idP,frame_t frameP,sub_frame_t
// get actual repetition count from Table 9.1.5-3 // get actual repetition count from Table 9.1.5-3
reps = (rmax<=8)?(1<<rep):(rmax>>(3-rep)); reps = (rmax<=8)?(1<<rep):(rmax>>(3-rep));
// get first narrowband // get first narrowband
first_rb = RA_template->msg34_narrowband*6; first_rb = narrowband_to_first_rb(&cc[CC_idP],RA_template->msg34_narrowband);
if ((RA_template->msg4_mpdcch_repetition_cnt == 0) && 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)>0)){
// MPDCCH configuration for RAR // MPDCCH configuration for RAR
......
...@@ -199,8 +199,10 @@ schedule_SIB1_BR( ...@@ -199,8 +199,10 @@ schedule_SIB1_BR(
if ((frameP&1023) < 200) LOG_I(MAC,"[eNB %d] Frame %d Subframe %d: SIB1_BR->DLSCH CC_id %d, Received %d bytes, scheduling on NB %d (i %d,m %d,N_S_NB %d) rvidx %d\n",module_idP,frameP,subframeP,CC_id,bcch_sdu_length,n_NB,i,m,N_S_NB,rvidx); if ((frameP&1023) < 200) LOG_I(MAC,"[eNB %d] Frame %d Subframe %d: SIB1_BR->DLSCH CC_id %d, Received %d bytes, scheduling on NB %d (i %d,m %d,N_S_NB %d) rvidx %d\n",module_idP,frameP,subframeP,CC_id,bcch_sdu_length,n_NB,i,m,N_S_NB,rvidx);
// allocate all 6 PRBs in narrowband for SIB1_BR // allocate all 6 PRBs in narrowband for SIB1_BR
first_rb = n_NB*6;
vrb_map[first_rb] = 1; first_rb = narrowband_to_first_rb(cc,n_NB);
vrb_map[first_rb] = 1;
vrb_map[first_rb+1] = 1; vrb_map[first_rb+1] = 1;
vrb_map[first_rb+2] = 1; vrb_map[first_rb+2] = 1;
vrb_map[first_rb+3] = 1; vrb_map[first_rb+3] = 1;
...@@ -385,11 +387,11 @@ schedule_SI_BR( ...@@ -385,11 +387,11 @@ schedule_SI_BR(
bcch_sdu_length,(int)(si_TBS_r13>>3),(int)schedulingInfoList_BR_r13->list.array[i]->si_TBS_r13); bcch_sdu_length,(int)(si_TBS_r13>>3),(int)schedulingInfoList_BR_r13->list.array[i]->si_TBS_r13);
// allocate all 6 PRBs in narrowband for SIB1_BR // allocate all 6 PRBs in narrowband for SIB1_BR
first_rb = (si_Narrowband_r13-1)*6;
// check that SIB1 didn't take this narrowband // check that SIB1 didn't take this narrowband
if (vrb_map[first_rb] > 0) continue; if (vrb_map[first_rb] > 0) continue;
first_rb = narrowband_to_first_rb(cc,si_Narrowband_r13);
vrb_map[first_rb] = 1; vrb_map[first_rb] = 1;
vrb_map[first_rb+1] = 1; vrb_map[first_rb+1] = 1;
vrb_map[first_rb+2] = 1; vrb_map[first_rb+2] = 1;
......
...@@ -524,7 +524,35 @@ int mpdcch_sf_condition(eNB_MAC_INST *eNB,int CC_id, frame_t frameP,sub_frame_t ...@@ -524,7 +524,35 @@ int mpdcch_sf_condition(eNB_MAC_INST *eNB,int CC_id, frame_t frameP,sub_frame_t
} }
int narrowband_to_first_rb(COMMON_channels_t *cc, int nb_index) {
switch (cc->mib->message.dl_Bandwidth) {
case 0: // 6 PRBs, N_NB=1, i_0=0
return(0);
break;
case 3: // 50 PRBs, N_NB=8, i_0=1
return((int)(1+(6*nb_index)));
break;
case 5: // 100 PRBs, N_NB=16, i_0=2
return((int)(2+(6*nb_index)));
break;
case 1: // 15 PRBs N_NB=2, i_0=1
if (nb_index>0) return(1);
else return(0);
break;
case 2: // 25 PRBs, N_NB=4, i_0=0
if (nb_index>1) return(1+(6*nb_index));
else return((6*nb_index));
break;
case 4: // 75 PRBs, N_NB=12, i_0=1
if (nb_index>5) return(2+(6*nb_index));
else return(1+(6*nb_index));
break;
default:
AssertFatal(1==0,"Impossible dl_Bandwidth %d\n",cc->mib->message.dl_Bandwidth);
break;
}
}
#endif #endif
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
......
...@@ -908,6 +908,9 @@ int get_numnarrowbandbits(long dl_Bandwidth); ...@@ -908,6 +908,9 @@ 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 get_numnarrowbands(long dl_Bandwidth); int get_numnarrowbands(long dl_Bandwidth);
int narrowband_to_first_rb(COMMON_channels_t *cc, int nb_index);
#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