Merge remote-tracking branch 'origin/develop' into ru_rau_enhancement_L1_renaming

Conflicts:
	cmake_targets/build_oai
	cmake_targets/oaisim_build_oai/CMakeLists.template
	cmake_targets/oaisim_mme_build_oai/CMakeLists.template
	cmake_targets/oaisim_noS1_build_oai/CMakeLists.template
	openair1/PHY/LTE_ESTIMATION/lte_sync_time.c
	openair1/PHY/LTE_ESTIMATION/lte_ul_channel_estimation.c
	openair1/PHY/LTE_TRANSPORT/dci_tools.c
	openair1/PHY/LTE_TRANSPORT/if4_tools.c
	openair1/PHY/LTE_TRANSPORT/prach.c
	openair1/PHY/LTE_TRANSPORT/pucch.c
	openair1/PHY/LTE_UE_TRANSPORT/dlsch_demodulation.c
	openair1/PHY/impl_defs_lte.h
	openair1/SCHED/fapi_l1.c
	openair1/SCHED/phy_procedures_lte_eNb.c
	openair1/SIMULATION/LTE_PHY/dlsim.c
	openair2/ENB_APP/enb_config.c
	openair2/ENB_APP/enb_paramdef.h
	openair2/LAYER2/MAC/eNB_scheduler_RA.c
	openair2/LAYER2/MAC/eNB_scheduler_primitives.c
	targets/ARCH/ETHERNET/USERSPACE/LIB/eth_udp.c
	targets/ARCH/ETHERNET/USERSPACE/LIB/ethernet_lib.c
	targets/RT/USER/lte-enb.c
	targets/RT/USER/lte-ru.c
	targets/RT/USER/lte-softmodem.c
	targets/RT/USER/lte-softmodem.h
This commit is contained in:
Raymond Knopp
2019-04-14 20:34:03 +02:00
712 changed files with 88321 additions and 52611 deletions
+176 -34
View File
@@ -55,6 +55,8 @@ void handle_nfapi_dci_dl_pdu(PHY_VARS_eNB *eNB,
LTE_eNB_PDCCH *pdcch_vars = &eNB->pdcch_vars[idx];
nfapi_dl_config_dci_dl_pdu *pdu = &dl_config_pdu->dci_dl_pdu;
if (nfapi_mode==2) return;
LOG_D(PHY,"Frame %d, Subframe %d: DCI processing - populating pdcch_vars->dci_alloc[%d] proc:subframe_tx:%d idx:%d pdcch_vars->num_dci:%d\n",frame,subframe, pdcch_vars->num_dci, proc->subframe_tx, idx, pdcch_vars->num_dci);
// copy dci configuration into eNB structure
@@ -73,6 +75,8 @@ void handle_nfapi_mpdcch_pdu(PHY_VARS_eNB *eNB,
LTE_eNB_MPDCCH *mpdcch_vars = &eNB->mpdcch_vars[idx];
nfapi_dl_config_mpdcch_pdu *pdu = &dl_config_pdu->mpdcch_pdu;
if (nfapi_mode==2) return;
LOG_D(PHY,"Frame %d, Subframe %d: MDCI processing\n",proc->frame_tx,proc->subframe_tx);
// copy dci configuration into eNB structure
@@ -87,17 +91,35 @@ void handle_nfapi_hi_dci0_dci_pdu(PHY_VARS_eNB *eNB,int frame,int subframe,L1_rx
int idx = subframe&1;
LTE_eNB_PDCCH *pdcch_vars = &eNB->pdcch_vars[idx];
if (nfapi_mode==2) return;
//LOG_D(PHY,"%s() SFN/SF:%04d%d Before num_dci:%d\n", __FUNCTION__,frame,subframe,pdcch_vars->num_dci);
// copy dci configuration in to eNB structure
fill_dci0(eNB,frame,subframe,proc,&pdcch_vars->dci_alloc[pdcch_vars->num_dci], &hi_dci0_config_pdu->dci_pdu);
}
void handle_nfapi_hi_dci0_mpdcch_dci_pdu(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc,
nfapi_hi_dci0_request_pdu_t *hi_dci0_config_pdu)
{
int idx = proc->subframe_tx&1;
LTE_eNB_MPDCCH *pdcch_vars = &eNB->mpdcch_vars[idx];
if (nfapi_mode==2) return;
// copy dci configuration in to eNB structure
fill_mpdcch_dci0(eNB,proc,&pdcch_vars->mdci_alloc[pdcch_vars->num_dci], &hi_dci0_config_pdu->mpdcch_dci_pdu);
}
void handle_nfapi_hi_dci0_hi_pdu(PHY_VARS_eNB *eNB,int frame,int subframe,L1_rxtx_proc_t *proc,
nfapi_hi_dci0_request_pdu_t *hi_dci0_config_pdu)
{
LTE_eNB_PHICH *phich = &eNB->phich_vars[subframe&1];
if (nfapi_mode==2) return;
// copy dci configuration in to eNB structure
LOG_D(PHY,"Received HI PDU with value %d (rbstart %d,cshift %d)\n",
hi_dci0_config_pdu->hi_pdu.hi_pdu_rel8.hi_value,
@@ -118,6 +140,8 @@ void handle_nfapi_bch_pdu(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc,
{
nfapi_dl_config_bch_pdu_rel8_t *rel8 = &dl_config_pdu->bch_pdu.bch_pdu_rel8;
if (nfapi_mode==2) return;
AssertFatal(rel8->length == 3, "BCH PDU has length %d != 3\n",rel8->length);
//LOG_D(PHY,"bch_pdu: %x,%x,%x\n",sdu[0],sdu[1],sdu[2]);
@@ -156,6 +180,8 @@ void handle_nfapi_dlsch_pdu(PHY_VARS_eNB *eNB,int frame,int subframe,L1_rxtx_pro
int UE_id;
int harq_pid;
if (nfapi_mode==2) return;
UE_id = find_dlsch(rel8->rnti,eNB,SEARCH_EXIST_OR_FREE);
if( (UE_id<0) || (UE_id>=NUMBER_OF_UE_MAX) ){
LOG_E(PHY,"illegal UE_id found!!! rnti %04x UE_id %d\n",rel8->rnti,UE_id);
@@ -168,24 +194,24 @@ void handle_nfapi_dlsch_pdu(PHY_VARS_eNB *eNB,int frame,int subframe,L1_rxtx_pro
dlsch1 = eNB->dlsch[UE_id][1];
#if (LTE_RRC_VERSION >= MAKE_VERSION(13, 0, 0))
if ((rel13->pdsch_payload_type < 2) && (rel13->ue_type>0)) dlsch0->harq_ids[frame%2][subframe] = 0;
if ((rel13->pdsch_payload_type < 2) && (rel13->ue_type>0)) dlsch0->harq_ids[proc->frame_tx%2][proc->subframe_tx] = 0;
#endif
harq_pid = dlsch0->harq_ids[frame%2][subframe];
harq_pid = dlsch0->harq_ids[proc->frame_tx%2][proc->subframe_tx];
AssertFatal((harq_pid>=0) && (harq_pid<8),"harq_pid %d not in 0...7 frame:%d subframe:%d subframe(TX):%d rnti:%x UE_id:%d dlsch0[harq_ids:%d:%d:%d:%d:%d:%d:%d:%d:%d:%d]\n",
harq_pid,
frame,subframe,
proc->subframe_tx,rel8->rnti,UE_id,
dlsch0->harq_ids[frame%2][0],
dlsch0->harq_ids[frame%2][1],
dlsch0->harq_ids[frame%2][2],
dlsch0->harq_ids[frame%2][3],
dlsch0->harq_ids[frame%2][4],
dlsch0->harq_ids[frame%2][5],
dlsch0->harq_ids[frame%2][6],
dlsch0->harq_ids[frame%2][7],
dlsch0->harq_ids[frame%2][8],
dlsch0->harq_ids[frame%2][9]
dlsch0->harq_ids[proc->frame_tx%2][0],
dlsch0->harq_ids[proc->frame_tx%2][1],
dlsch0->harq_ids[proc->frame_tx%2][2],
dlsch0->harq_ids[proc->frame_tx%2][3],
dlsch0->harq_ids[proc->frame_tx%2][4],
dlsch0->harq_ids[proc->frame_tx%2][5],
dlsch0->harq_ids[proc->frame_tx%2][6],
dlsch0->harq_ids[proc->frame_tx%2][7],
dlsch0->harq_ids[proc->frame_tx%2][8],
dlsch0->harq_ids[proc->frame_tx%2][9]
);
dlsch0_harq = dlsch0->harq_processes[harq_pid];
dlsch1_harq = dlsch1->harq_processes[harq_pid];
@@ -194,7 +220,7 @@ void handle_nfapi_dlsch_pdu(PHY_VARS_eNB *eNB,int frame,int subframe,L1_rxtx_pro
// compute DL power control parameters
eNB->pdsch_config_dedicated[UE_id].p_a = rel8->pa;
#ifdef PHY_TX_THREAD
#ifdef PHY_TX_THREAD
if (dlsch0->active[proc->subframe_tx]){
# else
if (dlsch0->active){
@@ -211,7 +237,7 @@ void handle_nfapi_dlsch_pdu(PHY_VARS_eNB *eNB,int frame,int subframe,L1_rxtx_pro
computeRhoB_eNB(rel8->pa,eNB->frame_parms.pdsch_config_common.p_b,eNB->frame_parms.nb_antenna_ports_eNB,dlsch1,dlsch1_harq->dl_power_off);
}
dlsch0_harq->pdsch_start = eNB->pdcch_vars[subframe & 1].num_pdcch_symbols;
dlsch0_harq->pdsch_start = eNB->pdcch_vars[proc->subframe_tx & 1].num_pdcch_symbols;
if (dlsch0_harq->round==0) { //get pointer to SDU if this a new SDU
if(sdu == NULL) {
@@ -244,18 +270,36 @@ void handle_nfapi_dlsch_pdu(PHY_VARS_eNB *eNB,int frame,int subframe,L1_rxtx_pro
#endif
if ((rel13->pdsch_payload_type <2) && (rel13->ue_type>0)) { // this is a BR/CE UE and SIB1-BR/SI-BR
UE_id = find_dlsch(rel8->rnti,eNB,SEARCH_EXIST_OR_FREE);
AssertFatal(UE_id!=-1,"no free or exiting dlsch_context\n");
AssertFatal(UE_id<NUMBER_OF_UE_MAX,"returned UE_id %d >= %d(NUMBER_OF_UE_MAX)\n",UE_id,NUMBER_OF_UE_MAX);
dlsch0 = eNB->dlsch[UE_id][0];
dlsch0->harq_mask = 1;
dlsch0_harq = dlsch0->harq_processes[0];
dlsch0_harq->pdu = sdu;
if (proc->frame_tx < 200) LOG_D(PHY,"NFAPI: frame %d, subframe %d (TX %d.%d): Programming SI-BR (%d) => %d\n",frame,subframe,proc->frame_tx,proc->subframe_tx,rel13->pdsch_payload_type,UE_id);
dlsch0->rnti = 0xFFFF;
dlsch0->Kmimo = 1;
dlsch0->Mdlharq = 4;
dlsch0->Nsoft = 25344;
dlsch0->i0 = rel13->initial_transmission_sf_io;
dlsch0_harq->pdsch_start = rel10->pdsch_start;
dlsch0->harq_ids[proc->frame_tx%2][proc->subframe_rx] = 0;
dlsch0_harq->frame = proc->frame_tx;
dlsch0_harq->subframe = proc->subframe_tx;
#ifdef PHY_TX_THREAD
if (rel13->pdsch_payload_type == 0) dlsch0_harq->sib1_br_flag=1;
#else
if (rel13->pdsch_payload_type == 0) dlsch0->sib1_br_flag=1;
#endif
// configure PDSCH
// configure PDSCH
switch (eNB->frame_parms.N_RB_DL) {
case 6:
dlsch0_harq->rb_alloc[0] = localRIV2alloc_LUT6[rel8->resource_block_coding];
@@ -299,12 +343,19 @@ void handle_nfapi_dlsch_pdu(PHY_VARS_eNB *eNB,int frame,int subframe,L1_rxtx_pro
dlsch0_harq->codeword = 0;
dlsch0_harq->pdsch_start = rel10->pdsch_start;
}
#ifdef PHY_TX_THREAD
dlsch0_harq->i0 = rel13->initial_transmission_sf_io;
#else
dlsch0->i0 = rel13->initial_transmission_sf_io;
else
#endif
{
UE_id = find_dlsch(rel8->rnti,eNB,SEARCH_EXIST_OR_FREE);
AssertFatal(UE_id!=-1,"no free or exiting dlsch_context\n");
AssertFatal(UE_id<NUMBER_OF_UE_MAX,"returned UE_id %d >= %d(NUMBER_OF_UE_MAX)\n",UE_id,NUMBER_OF_UE_MAX);
dlsch0 = eNB->dlsch[UE_id][0];
dlsch1 = eNB->dlsch[UE_id][1];
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
dlsch0->sib1_br_flag=0;
dlsch0->i0 = 0xFFFF;
#endif
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
@@ -323,9 +374,54 @@ void handle_nfapi_dlsch_pdu(PHY_VARS_eNB *eNB,int frame,int subframe,L1_rxtx_pro
rel8->length
);
#endif
dlsch0->active = 1;
harq_pid = dlsch0->harq_ids[frame%2][proc->subframe_tx];
dlsch0->harq_mask |= (1<<harq_pid);
AssertFatal((harq_pid>=0) && (harq_pid<8),"subframe %d: harq_pid %d not in 0...7\n",proc->subframe_tx,harq_pid);
dlsch0_harq = dlsch0->harq_processes[harq_pid];
dlsch1_harq = dlsch1->harq_processes[harq_pid];
AssertFatal(dlsch0_harq!=NULL,"dlsch_harq is null\n");
// compute DL power control parameters
if (dlsch0->active){
computeRhoA_eNB(rel8->pa,dlsch0,dlsch0_harq->dl_power_off, eNB->frame_parms.nb_antenna_ports_eNB);
computeRhoB_eNB(rel8->pa,eNB->frame_parms.pdsch_config_common.p_b,eNB->frame_parms.nb_antenna_ports_eNB,dlsch0,dlsch0_harq->dl_power_off);
}
if (dlsch1->active){
computeRhoA_eNB(rel8->pa, dlsch1,dlsch1_harq->dl_power_off, eNB->frame_parms.nb_antenna_ports_eNB);
computeRhoB_eNB(rel8->pa,eNB->frame_parms.pdsch_config_common.p_b,eNB->frame_parms.nb_antenna_ports_eNB,dlsch1,dlsch1_harq->dl_power_off);
}
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
if (rel13->ue_type>0)
dlsch0_harq->pdsch_start = rel10->pdsch_start;
else
#endif
dlsch0_harq->pdsch_start = eNB->pdcch_vars[proc->subframe_tx & 1].num_pdcch_symbols;
if (dlsch0_harq->round==0) { //get pointer to SDU if this a new SDU
AssertFatal(sdu!=NULL,"NFAPI: frame %d, subframe %d: programming dlsch for round 0, rnti %x, UE_id %d, harq_pid %d : sdu is null for pdu_index %d\n",
proc->frame_tx,proc->subframe_tx,rel8->rnti,UE_id,harq_pid,
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.pdu_index);
if (rel8->rnti != 0xFFFF) LOG_D(PHY,"NFAPI: frame %d, subframe %d: programming dlsch for round 0, rnti %x, UE_id %d, harq_pid %d\n",
proc->frame_tx,proc->subframe_tx,rel8->rnti,UE_id,harq_pid);
if (codeword_index == 0) dlsch0_harq->pdu = sdu;
else dlsch1_harq->pdu = sdu;
}
else {
if (rel8->rnti != 0xFFFF) LOG_D(PHY,"NFAPI: frame %d, subframe %d: programming dlsch for round %d, rnti %x, UE_id %d, harq_pid %d\n",
proc->frame_tx,proc->subframe_tx,dlsch0_harq->round,
rel8->rnti,UE_id,harq_pid);
}
}
}
uint16_t to_beta_offset_harqack[16]={16,20,25,32,40,50,64,80,101,127,160,248,400,640,1008,8};
int16_t to_beta_offset_harqack[16]={16,20,25,32,40,50,64,80,101,127,160,248,400,640,1008,8};
void handle_ulsch_harq_pdu(
PHY_VARS_eNB *eNB,
@@ -340,6 +436,8 @@ void handle_ulsch_harq_pdu(
LTE_eNB_ULSCH_t *ulsch=eNB->ulsch[UE_id];
LTE_UL_eNB_HARQ_t *ulsch_harq;
if (nfapi_mode==2) return;
int harq_pid = rel8->harq_process_number;
ulsch_harq = ulsch->harq_processes[harq_pid];
ulsch_harq->frame = frame;
@@ -363,6 +461,8 @@ void handle_ulsch_cqi_ri_pdu(PHY_VARS_eNB *eNB,int UE_id,nfapi_ul_config_request
int harq_pid = ul_config_pdu->ulsch_pdu.ulsch_pdu_rel8.harq_process_number;
LTE_UL_eNB_HARQ_t *ulsch_harq = ulsch->harq_processes[harq_pid];
if (nfapi_mode==2) return;
ulsch_harq->frame = frame;
ulsch_harq->subframe = subframe;
ulsch_harq->O_RI = rel9->aperiodic_cqi_pmi_ri_report.cc[0].ri_size;
@@ -384,6 +484,8 @@ void handle_ulsch_cqi_harq_ri_pdu(PHY_VARS_eNB *eNB,int UE_id,nfapi_ul_config_re
LTE_UL_eNB_HARQ_t *ulsch_harq = ulsch->harq_processes[harq_pid];
nfapi_ul_config_ulsch_harq_information *harq_information = &ul_config_pdu->ulsch_cqi_harq_ri_pdu.harq_information;
if (nfapi_mode==2) return;
ulsch_harq->frame = frame;
ulsch_harq->subframe = subframe;
ulsch_harq->O_RI = rel9->aperiodic_cqi_pmi_ri_report.cc[0].ri_size;
@@ -399,6 +501,9 @@ void handle_ulsch_cqi_harq_ri_pdu(PHY_VARS_eNB *eNB,int UE_id,nfapi_ul_config_re
void handle_uci_harq_information(PHY_VARS_eNB *eNB, LTE_eNB_UCI *uci,nfapi_ul_config_harq_information *harq_information)
{
if (nfapi_mode==2) return;
if (eNB->frame_parms.frame_type == FDD) {
uci->num_pucch_resources = harq_information->harq_information_rel9_fdd.number_of_pucch_resources;
@@ -452,7 +557,7 @@ void handle_uci_harq_information(PHY_VARS_eNB *eNB, LTE_eNB_UCI *uci,nfapi_ul_co
uci->n_pucch_3[0] = harq_information->harq_information_rel9_fdd.n_pucch_1_0;
uci->n_pucch_3[1] = harq_information->harq_information_rel11.n_pucch_2_0;
}
else AssertFatal(1==0,"unsupported HARQ mode %d\n",harq_information->harq_information_rel9_fdd.ack_nack_mode);
else AssertFatal(1==0,"unsupported FDD HARQ mode %d size %d\n",harq_information->harq_information_rel9_fdd.ack_nack_mode,harq_information->harq_information_rel9_fdd.harq_size);
}
else { // TDD
uci->num_pucch_resources = harq_information->harq_information_rel10_tdd.number_of_pucch_resources;
@@ -497,6 +602,8 @@ void handle_uci_sr_pdu(PHY_VARS_eNB *eNB,int UE_id,nfapi_ul_config_request_pdu_t
{
LTE_eNB_UCI *uci = &eNB->uci_vars[UE_id];
if (nfapi_mode==2) return;
uci->frame = frame;
uci->subframe = subframe;
uci->rnti = ul_config_pdu->uci_sr_pdu.ue_information.ue_information_rel8.rnti;
@@ -507,7 +614,11 @@ void handle_uci_sr_pdu(PHY_VARS_eNB *eNB,int UE_id,nfapi_ul_config_request_pdu_t
uci->n_pucch_1_0_sr[0] = ul_config_pdu->uci_sr_pdu.sr_information.sr_information_rel8.pucch_index;
uci->srs_active = srs_active;
uci->active = 1;
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
uci->ue_type = ul_config_pdu->uci_sr_pdu.ue_information.ue_information_rel13.ue_type;
uci->empty_symbols = ul_config_pdu->uci_sr_pdu.ue_information.ue_information_rel13.empty_symbols;
uci->total_repetitions = ul_config_pdu->uci_sr_pdu.ue_information.ue_information_rel13.total_number_of_repetitions;
#endif
LOG_D(PHY,"Programming UCI SR rnti %x, pucch1_0 %d for (%d,%d)\n",
uci->rnti,uci->n_pucch_1_0_sr[0],frame,subframe);
}
@@ -516,6 +627,8 @@ void handle_uci_sr_harq_pdu(PHY_VARS_eNB *eNB,int UE_id,nfapi_ul_config_request_
{
LTE_eNB_UCI *uci = &eNB->uci_vars[UE_id];
if (nfapi_mode==2) return;
uci->frame = frame;
uci->subframe = subframe;
uci->rnti = ul_config_pdu->uci_sr_harq_pdu.ue_information.ue_information_rel8.rnti;
@@ -525,7 +638,11 @@ void handle_uci_sr_harq_pdu(PHY_VARS_eNB *eNB,int UE_id,nfapi_ul_config_request_
uci->n_pucch_1_0_sr[0] = ul_config_pdu->uci_sr_harq_pdu.sr_information.sr_information_rel8.pucch_index;
uci->srs_active = srs_active;
uci->active = 1;
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
uci->ue_type = ul_config_pdu->uci_sr_harq_pdu.ue_information.ue_information_rel13.ue_type;
uci->empty_symbols = ul_config_pdu->uci_sr_harq_pdu.ue_information.ue_information_rel13.empty_symbols;
uci->total_repetitions = ul_config_pdu->uci_sr_harq_pdu.ue_information.ue_information_rel13.total_number_of_repetitions;
#endif
handle_uci_harq_information(eNB,uci,&ul_config_pdu->uci_sr_harq_pdu.harq_information);
}
@@ -533,6 +650,8 @@ void handle_uci_harq_pdu(PHY_VARS_eNB *eNB,int UE_id,nfapi_ul_config_request_pdu
{
LTE_eNB_UCI *uci = &eNB->uci_vars[UE_id];
if (nfapi_mode==2) return;
LOG_D(PHY,"Frame %d, Subframe %d: Programming UCI_HARQ process (type %d)\n",frame,subframe,HARQ);
uci->frame = frame;
uci->subframe = subframe;
@@ -540,7 +659,11 @@ void handle_uci_harq_pdu(PHY_VARS_eNB *eNB,int UE_id,nfapi_ul_config_request_pdu
uci->type = HARQ;
uci->srs_active = srs_active;
uci->num_antenna_ports = ul_config_pdu->uci_harq_pdu.harq_information.harq_information_rel11.num_ant_ports;
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
uci->ue_type = ul_config_pdu->uci_harq_pdu.ue_information.ue_information_rel13.ue_type;
uci->empty_symbols = ul_config_pdu->uci_harq_pdu.ue_information.ue_information_rel13.empty_symbols;
uci->total_repetitions = ul_config_pdu->uci_harq_pdu.ue_information.ue_information_rel13.total_number_of_repetitions;
#endif
handle_uci_harq_information(eNB,uci,&ul_config_pdu->uci_harq_pdu.harq_information);
uci->active=1;
@@ -550,6 +673,8 @@ void handle_srs_pdu(PHY_VARS_eNB *eNB,nfapi_ul_config_request_pdu_t *ul_config_p
{
int i;
if (nfapi_mode==2) return;
for (i=0;i<NUMBER_OF_UE_MAX;i++) {
if (eNB->soundingrs_ul_config_dedicated[i].active==1) continue;
@@ -576,12 +701,17 @@ void handle_nfapi_ul_pdu(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc,
nfapi_ul_config_ulsch_pdu_rel8_t *rel8 = &ul_config_pdu->ulsch_pdu.ulsch_pdu_rel8;
int16_t UE_id;
if (nfapi_mode==2) return;
// check if we have received a dci for this ue and ulsch descriptor is configured
if (ul_config_pdu->pdu_type == NFAPI_UL_CONFIG_ULSCH_PDU_TYPE) {
//if (UE_id == find_ulsch(ul_config_pdu->ulsch_pdu.ulsch_pdu_rel8.rnti,eNB,SEARCH_EXIST_OR_FREE)<0)
//for (int i=0;i<16;i++) if (eNB->ulsch[i]->harq_mask>0) LOG_I(PHY,"rnti %x, mask %x\n",eNB->ulsch[i]->rnti,eNB->ulsch[i]->harq_mask >0);
AssertFatal((UE_id = find_ulsch(ul_config_pdu->ulsch_pdu.ulsch_pdu_rel8.rnti,eNB,SEARCH_EXIST_OR_FREE))>=0,
"No existing UE ULSCH for rnti %x\n",rel8->rnti);
LOG_D(PHY,"Applying UL config for UE %d, rnti %x in frame %d, subframe %d, modulation %d, rvidx %d\n", UE_id,rel8->rnti,frame,subframe,rel8->modulation_type,rel8->redundancy_version);
LOG_D(PHY,"Applying UL config for UE %d, rnti %x for frame %d, subframe %d, modulation %d, rvidx %d, first_rb %d, nb_rb %d\n", UE_id,rel8->rnti,frame,subframe,rel8->modulation_type,rel8->redundancy_version,
rel8->resource_block_start,rel8->number_of_resource_blocks);
fill_ulsch(eNB,UE_id,&ul_config_pdu->ulsch_pdu,frame,subframe);
@@ -616,6 +746,9 @@ void handle_nfapi_ul_pdu(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc,
AssertFatal((UE_id = find_uci(ul_config_pdu->uci_harq_pdu.ue_information.ue_information_rel8.rnti,
proc->frame_tx,proc->subframe_tx,eNB,SEARCH_EXIST_OR_FREE))>=0,
"No available UE UCI for rnti %x\n",ul_config_pdu->uci_harq_pdu.ue_information.ue_information_rel8.rnti);
LOG_D(PHY,"Applying UL UCI_HARQ config for UE %d, rnti %x for frame %d, subframe %d\n",
UE_id,ul_config_pdu->uci_harq_pdu.ue_information.ue_information_rel8.rnti,frame,subframe);
handle_uci_harq_pdu(eNB,UE_id,ul_config_pdu,frame,subframe,srs_present);
}
else if (ul_config_pdu->pdu_type == NFAPI_UL_CONFIG_UCI_CQI_PDU_TYPE) {
@@ -696,6 +829,10 @@ void schedule_response(Sched_Rsp_t *Sched_INFO)
eNB->pdcch_vars[subframe&1].num_pdcch_symbols = number_pdcch_ofdm_symbols;
eNB->pdcch_vars[subframe&1].num_dci = 0;
eNB->phich_vars[subframe&1].num_hi = 0;
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
eNB->mpdcch_vars[subframe&1].num_dci = 0;
#endif
LOG_D(PHY,"NFAPI: Sched_INFO:SFN/SF:%04d%d DL_req:SFN/SF:%04d%d:dl_pdu:%d tx_req:SFN/SF:%04d%d:pdus:%d\n",
frame,subframe,
@@ -720,6 +857,7 @@ void schedule_response(Sched_Rsp_t *Sched_INFO)
harq_pid = subframe2harq_pid(fp,ul_frame,ul_subframe);
// clear DCI allocation maps for new subframe
for (i=0; i<NUMBER_OF_UE_MAX; i++) {
@@ -850,16 +988,20 @@ void schedule_response(Sched_Rsp_t *Sched_INFO)
switch (hi_dci0_req_pdu->pdu_type) {
case NFAPI_HI_DCI0_DCI_PDU_TYPE:
case NFAPI_HI_DCI0_DCI_PDU_TYPE:
handle_nfapi_hi_dci0_dci_pdu(eNB,NFAPI_SFNSF2SFN(HI_DCI0_req->sfn_sf),NFAPI_SFNSF2SF(HI_DCI0_req->sfn_sf),proc,hi_dci0_req_pdu);
eNB->pdcch_vars[NFAPI_SFNSF2SF(HI_DCI0_req->sfn_sf)&1].num_dci++;
break;
case NFAPI_HI_DCI0_MPDCCH_DCI_PDU_TYPE:
handle_nfapi_hi_dci0_mpdcch_dci_pdu(eNB,proc,hi_dci0_req_pdu);
eNB->mpdcch_vars[subframe&1].num_dci++;
break;
handle_nfapi_hi_dci0_dci_pdu(eNB,NFAPI_SFNSF2SFN(HI_DCI0_req->sfn_sf),NFAPI_SFNSF2SF(HI_DCI0_req->sfn_sf),proc,hi_dci0_req_pdu);
eNB->pdcch_vars[NFAPI_SFNSF2SF(HI_DCI0_req->sfn_sf)&1].num_dci++;
break;
case NFAPI_HI_DCI0_HI_PDU_TYPE:
handle_nfapi_hi_dci0_hi_pdu(eNB,NFAPI_SFNSF2SFN(HI_DCI0_req->sfn_sf),NFAPI_SFNSF2SF(HI_DCI0_req->sfn_sf),proc,hi_dci0_req_pdu);
break;
case NFAPI_HI_DCI0_HI_PDU_TYPE:
handle_nfapi_hi_dci0_hi_pdu(eNB,NFAPI_SFNSF2SFN(HI_DCI0_req->sfn_sf),NFAPI_SFNSF2SF(HI_DCI0_req->sfn_sf),proc,hi_dci0_req_pdu);
break;
}
}