Merge remote-tracking branch 'origin/benetel_integration' into develop_integration_2020_w36
This commit is contained in:
@@ -1151,7 +1151,7 @@ uint8_t compute_nr_root_seq(NR_RACH_ConfigCommon_t *rach_config,
|
||||
if (NCS == 0) return nb_preambles;
|
||||
else {
|
||||
r = L_ra/NCS;
|
||||
found_sequences = (nb_preambles/r) + (nb_preambles%r!=0); //ceil(nb_preambles/r)
|
||||
found_sequences = (nb_preambles/r) + (nb_preambles%r!=0); //ceil(nb_preambles/r)
|
||||
printf(" found_sequences %u\n", found_sequences);
|
||||
return (found_sequences);
|
||||
}
|
||||
|
||||
@@ -463,24 +463,53 @@ void gNB_dlsch_ulsch_scheduler(module_id_t module_idP,
|
||||
schedule_nr_mib(module_idP, frame, slot);
|
||||
}
|
||||
|
||||
// This schedule PRACH if we are not in phy_test mode
|
||||
if (get_softmodem_params()->phy_test == 0)
|
||||
schedule_nr_prach(module_idP, frame, slot);
|
||||
if (get_softmodem_params()->phy_test == 0)
|
||||
nr_schedule_RA(module_idP, frame_txP, slot_txP);
|
||||
else
|
||||
UE_list->fiveG_connected[UE_id] = true;
|
||||
|
||||
// This schedule SR
|
||||
// TODO
|
||||
if (get_softmodem_params()->phy_test == 1) {
|
||||
if (slot_txP == 7){
|
||||
NR_RA_t *ra = &RC.nrmac[module_idP]->common_channels[0].ra[0];
|
||||
ra->Msg2_frame = frame_txP;
|
||||
ra->Msg2_slot = slot_txP;
|
||||
ra->state = Msg2;
|
||||
ra->bwp_id = 1;
|
||||
NR_CellGroupConfig_t *secondaryCellGroup = UE_list->secondaryCellGroup[UE_id];
|
||||
NR_BWP_Downlink_t *bwp=secondaryCellGroup->spCellConfig->spCellConfigDedicated->downlinkBWP_ToAddModList->list.array[ra->bwp_id-1];
|
||||
struct NR_PDCCH_ConfigCommon__commonSearchSpaceList *commonSearchSpaceList = bwp->bwp_Common->pdcch_ConfigCommon->choice.setup->commonSearchSpaceList;
|
||||
for (int i=0;i<commonSearchSpaceList->list.count;i++) {
|
||||
NR_SearchSpace_t *ss=commonSearchSpaceList->list.array[i];
|
||||
if(ss->searchSpaceId == *bwp->bwp_Common->pdcch_ConfigCommon->choice.setup->ra_SearchSpace)
|
||||
ra->ra_ss=ss;
|
||||
}
|
||||
AssertFatal(ra->ra_ss!=NULL,"no search space for RA'n");
|
||||
|
||||
// This schedule CSI
|
||||
// TODO
|
||||
nr_generate_Msg2(module_idP, 0/*CC_id*/,
|
||||
frame_txP,
|
||||
slot_txP);
|
||||
}
|
||||
}
|
||||
|
||||
// This schedule RA procedure if not in phy_test mode
|
||||
// Otherwise already consider 5G already connected
|
||||
if (get_softmodem_params()->phy_test == 0) {
|
||||
nr_schedule_RA(module_idP, frame, slot);
|
||||
nr_schedule_reception_msg3(module_idP, 0, frame, slot);
|
||||
}
|
||||
else
|
||||
UE_list->fiveG_connected[UE_id] = true;
|
||||
// Phytest scheduling
|
||||
|
||||
if (get_softmodem_params()->phy_test) {
|
||||
|
||||
// TbD once RACH is available, start ta_timer when UE is connected
|
||||
if (ue_sched_ctl->ta_timer)
|
||||
ue_sched_ctl->ta_timer--;
|
||||
|
||||
if (ue_sched_ctl->ta_timer == 0) {
|
||||
gNB->ta_command = ue_sched_ctl->ta_update;
|
||||
/* if time is up, then set the timer to not send it for 5 frames
|
||||
// regardless of the TA value */
|
||||
ue_sched_ctl->ta_timer = 100;
|
||||
/* reset ta_update */
|
||||
ue_sched_ctl->ta_update = 31;
|
||||
/* MAC CE flag indicating TA length */
|
||||
gNB->ta_len = 2;
|
||||
}
|
||||
}
|
||||
|
||||
if (get_softmodem_params()->phy_test) {
|
||||
|
||||
|
||||
@@ -437,7 +437,10 @@ void nr_add_msg3(module_id_t module_idP, int CC_id, frame_t frameP, sub_frame_t
|
||||
NR_UE_list_t *UE_list = &mac->UE_list;
|
||||
int UE_id = 0;
|
||||
|
||||
AssertFatal(ra->state != RA_IDLE, "RA is not active for RA %X\n", ra->rnti);
|
||||
if (ra->state != RA_IDLE) {
|
||||
LOG_W(MAC,"RA is not active for RA %X. skipping msg3 scheduling\n", ra->rnti);
|
||||
return;
|
||||
}
|
||||
|
||||
LOG_D(MAC, "[gNB %d][RAPROC] Frame %d, Subframe %d : CC_id %d RA is active, Msg3 in (%d,%d)\n", module_idP, frameP, slotP, CC_id, ra->Msg3_frame, ra->Msg3_slot);
|
||||
|
||||
|
||||
+41
-35
@@ -9089,47 +9089,53 @@ void rrc_eNB_process_AdditionResponseInformation(const module_id_t enb_mod_idP,
|
||||
return;
|
||||
}
|
||||
|
||||
protocol_ctxt_t ctxt;
|
||||
rrc_eNB_ue_context_t *ue_context;
|
||||
unsigned char buffer[8192];
|
||||
int size;
|
||||
ue_context = rrc_eNB_get_ue_context(RC.rrc[enb_mod_idP], m->rnti);
|
||||
ue_context->ue_context.nb_of_modify_endc_e_rabs = m->nb_e_rabs_admitted_tobeadded;
|
||||
int j=0;
|
||||
protocol_ctxt_t ctxt;
|
||||
rrc_eNB_ue_context_t *ue_context;
|
||||
unsigned char buffer[8192];
|
||||
int size;
|
||||
|
||||
while(j < m->nb_e_rabs_admitted_tobeadded) {
|
||||
for (int e_rab_idx=0; e_rab_idx<ue_context->ue_context.setup_e_rabs; e_rab_idx++) {
|
||||
//Update ue_context information with gNB's address and new GTP tunnel ID
|
||||
if( ue_context->ue_context.e_rab[e_rab_idx].param.e_rab_id == m->e_rabs_admitted_tobeadded[j].e_rab_id) {
|
||||
memcpy(ue_context->ue_context.gnb_gtp_endc_addrs[e_rab_idx].buffer,
|
||||
m->e_rabs_admitted_tobeadded[j].gnb_addr.buffer,
|
||||
m->e_rabs_admitted_tobeadded[j].gnb_addr.length);
|
||||
ue_context->ue_context.gnb_gtp_endc_addrs[e_rab_idx].length = m->e_rabs_admitted_tobeadded[j].gnb_addr.length;
|
||||
ue_context->ue_context.gnb_gtp_endc_teid[e_rab_idx] = m->e_rabs_admitted_tobeadded[j].gtp_teid;
|
||||
ue_context->ue_context.e_rab[e_rab_idx].status = E_RAB_STATUS_TOMODIFY;
|
||||
break;
|
||||
ue_context = rrc_eNB_get_ue_context(RC.rrc[enb_mod_idP], m->rnti);
|
||||
if (ue_context) {
|
||||
ue_context->ue_context.nb_of_modify_endc_e_rabs = m->nb_e_rabs_admitted_tobeadded;
|
||||
|
||||
int j=0;
|
||||
while(j < m->nb_e_rabs_admitted_tobeadded){
|
||||
for (int e_rab_idx=0; e_rab_idx<ue_context->ue_context.setup_e_rabs; e_rab_idx++){
|
||||
//Update ue_context information with gNB's address and new GTP tunnel ID
|
||||
if( ue_context->ue_context.e_rab[e_rab_idx].param.e_rab_id == m->e_rabs_admitted_tobeadded[j].e_rab_id){
|
||||
memcpy(ue_context->ue_context.gnb_gtp_endc_addrs[e_rab_idx].buffer,
|
||||
m->e_rabs_admitted_tobeadded[j].gnb_addr.buffer,
|
||||
m->e_rabs_admitted_tobeadded[j].gnb_addr.length);
|
||||
ue_context->ue_context.gnb_gtp_endc_addrs[e_rab_idx].length = m->e_rabs_admitted_tobeadded[j].gnb_addr.length;
|
||||
ue_context->ue_context.gnb_gtp_endc_teid[e_rab_idx] = m->e_rabs_admitted_tobeadded[j].gtp_teid;
|
||||
ue_context->ue_context.e_rab[e_rab_idx].status = E_RAB_STATUS_TOMODIFY;
|
||||
break;
|
||||
}
|
||||
}
|
||||
j++;
|
||||
}
|
||||
|
||||
PROTOCOL_CTXT_SET_BY_INSTANCE(&ctxt,
|
||||
0,
|
||||
ENB_FLAG_YES,
|
||||
m->rnti,
|
||||
0, 0);
|
||||
|
||||
size = rrc_eNB_generate_RRCConnectionReconfiguration_endc(&ctxt, ue_context, buffer, 8192, scg_CellGroupConfig, nr1_conf);
|
||||
|
||||
rrc_data_req(&ctxt,
|
||||
DCCH,
|
||||
rrc_eNB_mui++,
|
||||
SDU_CONFIRM_NO,
|
||||
size,
|
||||
buffer,
|
||||
PDCP_TRANSMISSION_MODE_CONTROL);
|
||||
} else {
|
||||
LOG_E(F1AP, "no ue_context for RNTI %x, acknowledging release\n", m->rnti);
|
||||
}
|
||||
|
||||
j++;
|
||||
}
|
||||
|
||||
PROTOCOL_CTXT_SET_BY_INSTANCE(&ctxt,
|
||||
0,
|
||||
ENB_FLAG_YES,
|
||||
m->rnti,
|
||||
0, 0);
|
||||
size = rrc_eNB_generate_RRCConnectionReconfiguration_endc(&ctxt, ue_context, buffer, 8192, scg_CellGroupConfig, nr1_conf);
|
||||
rrc_data_req(&ctxt,
|
||||
DCCH,
|
||||
rrc_eNB_mui++,
|
||||
SDU_CONFIRM_NO,
|
||||
size,
|
||||
buffer,
|
||||
PDCP_TRANSMISSION_MODE_CONTROL);
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
void *rrc_enb_process_itti_msg(void *notUsed) {
|
||||
MessageDef *msg_p;
|
||||
|
||||
Reference in New Issue
Block a user