develop-nr merge
This commit is contained in:
+11
-45
@@ -61,7 +61,6 @@ void handle_nfapi_dci_dl_pdu(PHY_VARS_eNB *eNB,
|
||||
proc->subframe_tx, idx, pdcch_vars->num_dci);
|
||||
}
|
||||
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
|
||||
void handle_nfapi_mpdcch_pdu(PHY_VARS_eNB *eNB,
|
||||
L1_rxtx_proc_t *proc,
|
||||
@@ -77,7 +76,6 @@ void handle_nfapi_mpdcch_pdu(PHY_VARS_eNB *eNB,
|
||||
fill_mdci_and_dlsch(eNB,proc,&mpdcch_vars->mdci_alloc[mpdcch_vars->num_dci],pdu);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
void handle_nfapi_hi_dci0_dci_pdu(PHY_VARS_eNB *eNB,int frame,int subframe,L1_rxtx_proc_t *proc,
|
||||
nfapi_hi_dci0_request_pdu_t *hi_dci0_config_pdu) {
|
||||
@@ -139,28 +137,24 @@ void handle_nfapi_bch_pdu(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc,
|
||||
// adjust transmit amplitude here based on NFAPI info
|
||||
}
|
||||
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
extern uint32_t localRIV2alloc_LUT6[32];
|
||||
extern uint32_t localRIV2alloc_LUT25[512];
|
||||
extern uint32_t localRIV2alloc_LUT50_0[1600];
|
||||
extern uint32_t localRIV2alloc_LUT50_1[1600];
|
||||
extern uint32_t localRIV2alloc_LUT100_0[6000];
|
||||
extern uint32_t localRIV2alloc_LUT100_1[6000];
|
||||
extern uint32_t localRIV2alloc_LUT100_2[6000];
|
||||
extern uint32_t localRIV2alloc_LUT100_3[6000];
|
||||
#endif
|
||||
|
||||
extern uint32_t localRIV2alloc_LUT6[32];
|
||||
extern uint32_t localRIV2alloc_LUT25[512];
|
||||
extern uint32_t localRIV2alloc_LUT50_0[1600];
|
||||
extern uint32_t localRIV2alloc_LUT50_1[1600];
|
||||
extern uint32_t localRIV2alloc_LUT100_0[6000];
|
||||
extern uint32_t localRIV2alloc_LUT100_1[6000];
|
||||
extern uint32_t localRIV2alloc_LUT100_2[6000];
|
||||
extern uint32_t localRIV2alloc_LUT100_3[6000];
|
||||
|
||||
|
||||
void handle_nfapi_dlsch_pdu(PHY_VARS_eNB *eNB,int frame,int subframe,L1_rxtx_proc_t *proc,
|
||||
nfapi_dl_config_request_pdu_t *dl_config_pdu,
|
||||
uint8_t codeword_index,
|
||||
uint8_t *sdu) {
|
||||
nfapi_dl_config_dlsch_pdu_rel8_t *rel8 = &dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8;
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
nfapi_dl_config_dlsch_pdu_rel10_t *rel10 = &dl_config_pdu->dlsch_pdu.dlsch_pdu_rel10;
|
||||
#endif
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
nfapi_dl_config_dlsch_pdu_rel13_t *rel13 = &dl_config_pdu->dlsch_pdu.dlsch_pdu_rel13;
|
||||
#endif
|
||||
LTE_eNB_DLSCH_t *dlsch0=NULL,*dlsch1=NULL;
|
||||
LTE_DL_eNB_HARQ_t *dlsch0_harq=NULL,*dlsch1_harq=NULL;
|
||||
int UE_id;
|
||||
@@ -179,11 +173,9 @@ void handle_nfapi_dlsch_pdu(PHY_VARS_eNB *eNB,int frame,int subframe,L1_rxtx_pro
|
||||
//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(13, 0, 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[proc->frame_tx%2][proc->subframe_tx];
|
||||
|
||||
if((harq_pid < 0) || (harq_pid >= dlsch0->Mdlharq)) {
|
||||
@@ -245,7 +237,6 @@ void handle_nfapi_dlsch_pdu(PHY_VARS_eNB *eNB,int frame,int subframe,L1_rxtx_pro
|
||||
rel8->rnti,UE_id,harq_pid);
|
||||
}
|
||||
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(13, 0, 0))
|
||||
#ifdef PHY_TX_THREAD
|
||||
dlsch0_harq->sib1_br_flag=0;
|
||||
#else
|
||||
@@ -327,19 +318,14 @@ void handle_nfapi_dlsch_pdu(PHY_VARS_eNB *eNB,int frame,int subframe,L1_rxtx_pro
|
||||
dlsch0_harq->Qm = rel8->modulation;
|
||||
dlsch0_harq->codeword = 0;
|
||||
dlsch0_harq->pdsch_start = rel10->pdsch_start;
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
} else {
|
||||
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))
|
||||
LOG_D(PHY,"dlsch->i0:%04x dlsch0_harq[pdsch_start:%d nb_rb:%d vrb_type:%d rvidx:%d Nl:%d mimo_mode:%d dl_power_off:%d round:%d status:%d TBS:%d Qm:%d codeword:%d rb_alloc:%d] rel8[length:%d]\n",
|
||||
#ifdef PHY_TX_THREAD
|
||||
dlsch0_harq->i0,
|
||||
@@ -350,13 +336,6 @@ void handle_nfapi_dlsch_pdu(PHY_VARS_eNB *eNB,int frame,int subframe,L1_rxtx_pro
|
||||
dlsch0_harq->TBS, dlsch0_harq->Qm, dlsch0_harq->codeword, dlsch0_harq->rb_alloc[0],
|
||||
rel8->length
|
||||
);
|
||||
#else
|
||||
LOG_D(PHY,"dlsch0_harq[pdsch_start:%d nb_rb:%d vrb_type:%d rvidx:%d Nl:%d mimo_mode:%d dl_power_off:%d round:%d status:%d TBS:%d Qm:%d codeword:%d rb_alloc:%d] rel8[length:%d]\n",
|
||||
dlsch0_harq->pdsch_start, dlsch0_harq->nb_rb, dlsch0_harq->vrb_type, dlsch0_harq->rvidx, dlsch0_harq->Nl, dlsch0_harq->mimo_mode, dlsch0_harq->dl_power_off, dlsch0_harq->round, dlsch0_harq->status,
|
||||
dlsch0_harq->TBS, dlsch0_harq->Qm, dlsch0_harq->codeword, dlsch0_harq->rb_alloc[0],
|
||||
rel8->length
|
||||
);
|
||||
#endif
|
||||
dlsch0->active = 1;
|
||||
harq_pid = dlsch0->harq_ids[frame%2][proc->subframe_tx];
|
||||
dlsch0->harq_mask |= (1<<harq_pid);
|
||||
@@ -377,12 +356,9 @@ 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);
|
||||
}
|
||||
|
||||
#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
|
||||
@@ -583,11 +559,9 @@ void handle_uci_sr_pdu(PHY_VARS_eNB *eNB,
|
||||
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],
|
||||
@@ -610,11 +584,9 @@ 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);
|
||||
}
|
||||
|
||||
@@ -631,11 +603,9 @@ 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;
|
||||
}
|
||||
@@ -771,9 +741,7 @@ 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,
|
||||
NFAPI_SFNSF2SFN(DL_req->sfn_sf),NFAPI_SFNSF2SF(DL_req->sfn_sf),number_dl_pdu,
|
||||
@@ -906,7 +874,6 @@ void schedule_response(Sched_Rsp_t *Sched_INFO) {
|
||||
case NFAPI_DL_CONFIG_EPDCCH_DL_PDU_TYPE:
|
||||
// handle_nfapi_epdcch_pdu(eNB,dl_config_pdu);
|
||||
break;
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
|
||||
case NFAPI_DL_CONFIG_MPDCCH_PDU_TYPE:
|
||||
if (NFAPI_MODE!=NFAPI_MODE_VNF)
|
||||
@@ -914,7 +881,6 @@ void schedule_response(Sched_Rsp_t *Sched_INFO) {
|
||||
|
||||
eNB->mpdcch_vars[subframe&1].num_dci++;
|
||||
break;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -119,15 +119,12 @@ lte_subframe_t get_subframe_direction(uint8_t Mod_id,uint8_t CC_id,uint8_t subfr
|
||||
}
|
||||
|
||||
void pmch_procedures(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc) {
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
MCH_PDU *mch_pduP=NULL;
|
||||
// uint8_t sync_area=255;
|
||||
#endif
|
||||
int subframe = proc->subframe_tx;
|
||||
AssertFatal (1 == 0, "pmch not tested for the moment, exiting\n");
|
||||
// This is DL-Cell spec pilots in Control region
|
||||
generate_pilots_slot (eNB, eNB->common_vars.txdataF, AMP, subframe << 1, 1);
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
|
||||
// if mcch is active, send regardless of the node type: eNB or RN
|
||||
// when mcch is active, MAC sched does not allow MCCH and MTCH multiplexing
|
||||
@@ -155,8 +152,6 @@ void pmch_procedures(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc) {
|
||||
} else {
|
||||
LOG_D (PHY, "[eNB/RN] Frame %d subframe %d: MCH not generated \n", proc->frame_tx, subframe);
|
||||
}
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
void common_signal_procedures (PHY_VARS_eNB *eNB,int frame, int subframe) {
|
||||
@@ -241,8 +236,8 @@ bool dlsch_procedures(PHY_VARS_eNB *eNB,
|
||||
LTE_DL_FRAME_PARMS *fp=&eNB->frame_parms;
|
||||
|
||||
if (dlsch->rnti != 0xffff) {//frame < 200) {
|
||||
LOG_D(PHY,
|
||||
"[eNB %"PRIu8"][PDSCH %"PRIx16"/%"PRIu8"] Frame %d, subframe %d: Generating PDSCH/DLSCH (type %d) with input size = %"PRIu16", pdsch_start %d, G %d, nb_rb %"PRIu16", rb0 %x, rb1 %x, TBS %"PRIu16", pmi_alloc %"PRIx64", rv %"PRIu8" (round %"PRIu8")\n",
|
||||
LOG_D(PHY,
|
||||
"[eNB %"PRIu8"][PDSCH %"PRIx16"/%"PRIu8"] Frame %d, subframe %d: Generating PDSCH/DLSCH (type %d) with input size = %"PRIu16", pdsch_start %d, G %d, nb_rb %"PRIu16", rb0 %x, rb1 %x, TBS %"PRIu16", pmi_alloc %"PRIx64", rv %"PRIu8" (round %"PRIu8")\n",
|
||||
eNB->Mod_id, dlsch->rnti,harq_pid,
|
||||
frame, subframe, dlsch->ue_type,dlsch_harq->TBS/8, dlsch_harq->pdsch_start,
|
||||
get_G(fp,
|
||||
@@ -279,8 +274,8 @@ bool dlsch_procedures(PHY_VARS_eNB *eNB,
|
||||
|
||||
if (dlsch->rnti!=0xffff)
|
||||
LOG_D(PHY,"Generating DLSCH/PDSCH pdu:%p pdsch_start:%d frame:%d subframe:%d nb_rb:%d rb_alloc:%d Qm:%d Nl:%d round:%d\n",
|
||||
dlsch_harq->pdu,dlsch_harq->pdsch_start,frame,subframe,dlsch_harq->nb_rb,dlsch_harq->rb_alloc[0],
|
||||
dlsch_harq->Qm,dlsch_harq->Nl,dlsch_harq->round);
|
||||
dlsch_harq->pdu,dlsch_harq->pdsch_start,frame,subframe,dlsch_harq->nb_rb,dlsch_harq->rb_alloc[0],
|
||||
dlsch_harq->Qm,dlsch_harq->Nl,dlsch_harq->round);
|
||||
|
||||
// 36-212
|
||||
if (NFAPI_MODE==NFAPI_MONOLITHIC || NFAPI_MODE==NFAPI_MODE_PNF) { // monolthic OR PNF - do not need turbo encoding on VNF
|
||||
@@ -309,6 +304,7 @@ bool dlsch_procedures(PHY_VARS_eNB *eNB,
|
||||
if(eNB->dlsch_encoding_stats.p_time>500*3000 && opp_enabled == 1) {
|
||||
print_meas_now(&eNB->dlsch_encoding_stats,"total coding",stderr);
|
||||
}
|
||||
|
||||
#ifdef PHY_TX_THREAD
|
||||
dlsch->active[subframe] = 0;
|
||||
#else
|
||||
@@ -318,6 +314,7 @@ bool dlsch_procedures(PHY_VARS_eNB *eNB,
|
||||
LOG_D(PHY,"Generated DLSCH dlsch_harq[round:%d]\n",dlsch_harq->round);
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -333,32 +330,31 @@ void pdsch_procedures(PHY_VARS_eNB *eNB,
|
||||
// 36-211
|
||||
start_meas(&eNB->dlsch_scrambling_stats);
|
||||
dlsch_scrambling(fp,
|
||||
0,
|
||||
dlsch,
|
||||
harq_pid,
|
||||
get_G(fp,
|
||||
dlsch_harq->nb_rb,
|
||||
dlsch_harq->rb_alloc,
|
||||
dlsch_harq->Qm,
|
||||
dlsch_harq->Nl,
|
||||
dlsch_harq->pdsch_start,
|
||||
frame,subframe,
|
||||
0),
|
||||
0,
|
||||
frame,
|
||||
subframe<<1);
|
||||
0,
|
||||
dlsch,
|
||||
harq_pid,
|
||||
get_G(fp,
|
||||
dlsch_harq->nb_rb,
|
||||
dlsch_harq->rb_alloc,
|
||||
dlsch_harq->Qm,
|
||||
dlsch_harq->Nl,
|
||||
dlsch_harq->pdsch_start,
|
||||
frame,subframe,
|
||||
0),
|
||||
0,
|
||||
frame,
|
||||
subframe<<1);
|
||||
stop_meas(&eNB->dlsch_scrambling_stats);
|
||||
start_meas(&eNB->dlsch_modulation_stats);
|
||||
dlsch_modulation(eNB,
|
||||
eNB->common_vars.txdataF,
|
||||
AMP,
|
||||
frame,
|
||||
subframe,
|
||||
dlsch_harq->pdsch_start,
|
||||
dlsch,
|
||||
dlsch->ue_type==0 ? dlsch1 : (LTE_eNB_DLSCH_t *)NULL);
|
||||
eNB->common_vars.txdataF,
|
||||
AMP,
|
||||
frame,
|
||||
subframe,
|
||||
dlsch_harq->pdsch_start,
|
||||
dlsch,
|
||||
dlsch->ue_type==0 ? dlsch1 : (LTE_eNB_DLSCH_t *)NULL);
|
||||
stop_meas(&eNB->dlsch_modulation_stats);
|
||||
|
||||
LOG_D(PHY,"Generated PDSCH dlsch_harq[round:%d]\n",dlsch_harq->round);
|
||||
}
|
||||
|
||||
@@ -374,9 +370,7 @@ void phy_procedures_eNB_TX(PHY_VARS_eNB *eNB,
|
||||
int16_t UE_id=0;
|
||||
uint8_t num_pdcch_symbols=0;
|
||||
uint8_t num_dci=0;
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
uint8_t num_mdci = 0;
|
||||
#endif
|
||||
uint8_t ul_subframe;
|
||||
uint32_t ul_frame;
|
||||
LTE_DL_FRAME_PARMS *fp=&eNB->frame_parms;
|
||||
@@ -420,11 +414,8 @@ void phy_procedures_eNB_TX(PHY_VARS_eNB *eNB,
|
||||
// (subframe_select(fp,ul_subframe)==SF_UL)) { // This means that there is a potential UL subframe that will be scheduled here
|
||||
if (ul_subframe < 10) { // This means that there is a potential UL subframe that will be scheduled here
|
||||
for (i=0; i<NUMBER_OF_UE_MAX; i++) {
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
|
||||
if (eNB->ulsch[i] && eNB->ulsch[i]->ue_type >0) harq_pid = 0;
|
||||
else
|
||||
#endif
|
||||
harq_pid = subframe2harq_pid(fp,ul_frame,ul_subframe);
|
||||
|
||||
if (eNB->ulsch[i]) {
|
||||
@@ -459,7 +450,7 @@ void phy_procedures_eNB_TX(PHY_VARS_eNB *eNB,
|
||||
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_DCI_INFO,num_pdcch_symbols);
|
||||
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME (VCD_SIGNAL_DUMPER_VARIABLES_DCI_INFO, (frame * 10) + subframe);
|
||||
|
||||
if (num_pdcch_symbols == 0){
|
||||
if (num_pdcch_symbols == 0) {
|
||||
LOG_E(PHY,"[eNB %"PRIu8"] Frame %d, subframe %d: Calling generate_dci_top (pdcch) (num_dci %"PRIu8") num_pdcch_symbols:%d\n",eNB->Mod_id,frame, subframe, num_dci, num_pdcch_symbols);
|
||||
return;
|
||||
}
|
||||
@@ -478,15 +469,12 @@ void phy_procedures_eNB_TX(PHY_VARS_eNB *eNB,
|
||||
fp,
|
||||
eNB->common_vars.txdataF,
|
||||
subframe);
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
num_mdci = eNB->mpdcch_vars[subframe &1].num_dci;
|
||||
|
||||
if (num_mdci > 0) {
|
||||
LOG_D (PHY, "[eNB %" PRIu8 "] Frame %d, subframe %d: Calling generate_mdci_top (mpdcch) (num_dci %" PRIu8 ")\n", eNB->Mod_id, frame, subframe, num_mdci);
|
||||
generate_mdci_top (eNB, frame, subframe, AMP, eNB->common_vars.txdataF);
|
||||
}
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
if (do_meas==1) stop_meas(&eNB->dlsch_common_and_dci);
|
||||
@@ -511,13 +499,10 @@ void phy_procedures_eNB_TX(PHY_VARS_eNB *eNB,
|
||||
) {
|
||||
// get harq_pid
|
||||
harq_pid = dlsch0->harq_ids[frame%2][subframe];
|
||||
//AssertFatal(harq_pid>=0,"harq_pid is negative\n");
|
||||
|
||||
if((harq_pid < 0) || (harq_pid >= dlsch0->Mdlharq)) {
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
//AssertFatal(harq_pid>=0,"harq_pid is negative\n");
|
||||
|
||||
if((harq_pid < 0) || (harq_pid >= dlsch0->Mdlharq)) {
|
||||
if (dlsch0->ue_type==0)
|
||||
#endif
|
||||
LOG_E(PHY,"harq_pid:%d corrupt must be 0-7 UE_id:%d frame:%d subframe:%d rnti:%x [ %1d.%1d.%1d.%1d.%1d.%1d.%1d.%1d\n", harq_pid,UE_id,frame,subframe,dlsch0->rnti,
|
||||
dlsch0->harq_ids[frame%2][0],
|
||||
dlsch0->harq_ids[frame%2][1],
|
||||
@@ -528,18 +513,18 @@ void phy_procedures_eNB_TX(PHY_VARS_eNB *eNB,
|
||||
dlsch0->harq_ids[frame%2][6],
|
||||
dlsch0->harq_ids[frame%2][7]);
|
||||
} else {
|
||||
if (dlsch_procedures(eNB,
|
||||
proc,
|
||||
harq_pid,
|
||||
dlsch0,
|
||||
&eNB->UE_stats[(uint32_t)UE_id])) {
|
||||
// if we generate dlsch, we must generate pdsch
|
||||
pdsch_procedures(eNB,
|
||||
proc,
|
||||
harq_pid,
|
||||
dlsch0,
|
||||
dlsch1);
|
||||
}
|
||||
if (dlsch_procedures(eNB,
|
||||
proc,
|
||||
harq_pid,
|
||||
dlsch0,
|
||||
&eNB->UE_stats[(uint32_t)UE_id])) {
|
||||
// if we generate dlsch, we must generate pdsch
|
||||
pdsch_procedures(eNB,
|
||||
proc,
|
||||
harq_pid,
|
||||
dlsch0,
|
||||
dlsch1);
|
||||
}
|
||||
}
|
||||
} else if ((dlsch0)&&(dlsch0->rnti>0)&&
|
||||
#ifdef PHY_TX_THREAD
|
||||
@@ -644,7 +629,6 @@ uci_procedures(PHY_VARS_eNB *eNB,
|
||||
subframe,
|
||||
uci->type,
|
||||
i);
|
||||
|
||||
uci->active = 0;
|
||||
|
||||
// Null out PUCCH PRBs for noise measurement
|
||||
@@ -652,24 +636,30 @@ uci_procedures(PHY_VARS_eNB *eNB,
|
||||
case 6:
|
||||
eNB->rb_mask_ul[0] |= (0x1 | (1 << 5)); // position 5
|
||||
break;
|
||||
|
||||
case 15:
|
||||
eNB->rb_mask_ul[0] |= (0x1 | (1 << 14)); // position 14
|
||||
break;
|
||||
|
||||
case 25:
|
||||
eNB->rb_mask_ul[0] |= (0x1 | (1 << 24)); // position 24
|
||||
break;
|
||||
|
||||
case 50:
|
||||
eNB->rb_mask_ul[0] |= 0x1;
|
||||
eNB->rb_mask_ul[1] |= (1 << 17); // position 49 (49-32)
|
||||
break;
|
||||
|
||||
case 75:
|
||||
eNB->rb_mask_ul[0] |= 0x1;
|
||||
eNB->rb_mask_ul[2] |= (1 << 10); // position 74 (74-64)
|
||||
break;
|
||||
|
||||
case 100:
|
||||
eNB->rb_mask_ul[0] |= 0x1;
|
||||
eNB->rb_mask_ul[3] |= (1 << 3); // position 99 (99-96)
|
||||
break;
|
||||
|
||||
default:
|
||||
LOG_E(PHY,"Unknown number for N_RB_UL %d\n", fp->N_RB_UL);
|
||||
break;
|
||||
@@ -690,10 +680,8 @@ uci_procedures(PHY_VARS_eNB *eNB,
|
||||
&SR_payload,
|
||||
frame,
|
||||
subframe,
|
||||
pucch1_thres
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,uci->ue_type
|
||||
#endif
|
||||
pucch1_thres,
|
||||
uci->ue_type
|
||||
);
|
||||
LOG_D(PHY,"[eNB %d][SR %x] Frame %d subframe %d Checking SR is %d (uci.type %d SR n1pucch is %d)\n",
|
||||
eNB->Mod_id,
|
||||
@@ -732,10 +720,8 @@ uci_procedures(PHY_VARS_eNB *eNB,
|
||||
pucch_b0b1[0],
|
||||
frame,
|
||||
subframe,
|
||||
pucch1ab_thres
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,uci->ue_type
|
||||
#endif
|
||||
pucch1ab_thres,
|
||||
uci->ue_type
|
||||
);
|
||||
|
||||
//dump_ulsch(eNB,frame,subframe,0,0); exit(-1);
|
||||
@@ -756,10 +742,8 @@ uci_procedures(PHY_VARS_eNB *eNB,
|
||||
pucch_b0b1[0],
|
||||
frame,
|
||||
subframe,
|
||||
pucch1ab_thres
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,uci->ue_type
|
||||
#endif
|
||||
pucch1ab_thres,
|
||||
uci->ue_type
|
||||
);
|
||||
}
|
||||
|
||||
@@ -786,10 +770,8 @@ uci_procedures(PHY_VARS_eNB *eNB,
|
||||
pucch_b0b1[0],
|
||||
frame,
|
||||
subframe,
|
||||
pucch1ab_thres
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,uci->ue_type
|
||||
#endif
|
||||
pucch1ab_thres,
|
||||
uci->ue_type
|
||||
);
|
||||
|
||||
if (uci->type==HARQ_SR && metric[0] > metric_SR) SR_payload = 0;
|
||||
@@ -806,10 +788,8 @@ uci_procedures(PHY_VARS_eNB *eNB,
|
||||
pucch_b0b1[0],
|
||||
frame,
|
||||
subframe,
|
||||
pucch1ab_thres
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,uci->ue_type
|
||||
#endif
|
||||
pucch1ab_thres,
|
||||
uci->ue_type
|
||||
);
|
||||
}
|
||||
|
||||
@@ -824,10 +804,8 @@ uci_procedures(PHY_VARS_eNB *eNB,
|
||||
metric[0] = rx_pucch (eNB, pucch_format1b, i, uci->n_pucch_1_0_sr[0], 0, //n2_pucch
|
||||
uci->srs_active, // shortened format
|
||||
pucch_b0b1[0], frame, subframe,
|
||||
pucch1ab_thres
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,uci->ue_type
|
||||
#endif
|
||||
pucch1ab_thres,
|
||||
uci->ue_type
|
||||
);
|
||||
} else { //using assigned pucch resources
|
||||
#ifdef DEBUG_PHY_PROC
|
||||
@@ -840,10 +818,8 @@ uci_procedures(PHY_VARS_eNB *eNB,
|
||||
metric[res] = rx_pucch (eNB, uci->pucch_fmt, i, uci->n_pucch_1[res][0], 0, // n2_pucch
|
||||
uci->srs_active, // shortened format
|
||||
pucch_b0b1[res], frame, subframe,
|
||||
pucch1ab_thres
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,uci->ue_type
|
||||
#endif
|
||||
pucch1ab_thres,
|
||||
uci->ue_type
|
||||
);
|
||||
|
||||
for (res=0; res<uci->num_pucch_resources; res++)
|
||||
@@ -856,10 +832,8 @@ uci_procedures(PHY_VARS_eNB *eNB,
|
||||
pucch_b0b1[res],
|
||||
frame,
|
||||
subframe,
|
||||
pucch1ab_thres
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,uci->ue_type
|
||||
#endif
|
||||
pucch1ab_thres,
|
||||
uci->ue_type
|
||||
);
|
||||
}
|
||||
|
||||
@@ -868,6 +842,7 @@ uci_procedures(PHY_VARS_eNB *eNB,
|
||||
uci->rnti,uci->type,SR_payload,frame,subframe,pucch_b0b1[0][0],pucch_b0b1[0][1],pucch_b0b1[1][0],pucch_b0b1[1][1]);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
if (SR_payload == 1) { // this implements Table 7.3.1 from 36.213
|
||||
if (pucch_b0b1[0][0] == 4) { // there isn't a likely transmission
|
||||
harq_ack[0] = 4; // DTX
|
||||
@@ -1357,8 +1332,7 @@ void init_td_thread(PHY_VARS_eNB *eNB) {
|
||||
L1_proc_t *proc = &eNB->proc;
|
||||
proc->tdp.eNB = eNB;
|
||||
proc->instance_cnt_td = -1;
|
||||
|
||||
threadCreate(&proc->pthread_td, td_thread, (void*)&proc->tdp, "TD", -1, OAI_PRIORITY_RT);
|
||||
threadCreate(&proc->pthread_td, td_thread, (void *)&proc->tdp, "TD", -1, OAI_PRIORITY_RT);
|
||||
}
|
||||
|
||||
void kill_td_thread(PHY_VARS_eNB *eNB) {
|
||||
@@ -1372,23 +1346,20 @@ void kill_td_thread(PHY_VARS_eNB *eNB) {
|
||||
|
||||
extern void *te_thread (void *);
|
||||
|
||||
void init_te_thread(PHY_VARS_eNB *eNB)
|
||||
{
|
||||
void init_te_thread(PHY_VARS_eNB *eNB) {
|
||||
L1_proc_t *proc = &eNB->proc;
|
||||
|
||||
for(int i=0; i<3 ; i++) {
|
||||
proc->tep[i].eNB = eNB;
|
||||
proc->tep[i].instance_cnt_te = -1;
|
||||
|
||||
LOG_I(PHY,"Creating te_thread %d\n",i);
|
||||
char txt[128];
|
||||
sprintf(txt,"TE_%d", i);
|
||||
threadCreate(&proc->tep[i].pthread_te, te_thread, (void*)&proc->tep[i], txt, -1, OAI_PRIORITY_RT);
|
||||
sprintf(txt,"TE_%d", i);
|
||||
threadCreate(&proc->tep[i].pthread_te, te_thread, (void *)&proc->tep[i], txt, -1, OAI_PRIORITY_RT);
|
||||
}
|
||||
}
|
||||
|
||||
void kill_te_thread(PHY_VARS_eNB *eNB)
|
||||
{
|
||||
void kill_te_thread(PHY_VARS_eNB *eNB) {
|
||||
L1_proc_t *proc = &eNB->proc;
|
||||
|
||||
for(int i=0; i<3 ; i++) {
|
||||
@@ -1401,20 +1372,16 @@ void kill_te_thread(PHY_VARS_eNB *eNB)
|
||||
}
|
||||
|
||||
void fill_rx_indication(PHY_VARS_eNB *eNB,
|
||||
int UE_id,
|
||||
int frame,
|
||||
int subframe)
|
||||
{
|
||||
int UE_id,
|
||||
int frame,
|
||||
int subframe) {
|
||||
nfapi_rx_indication_pdu_t *pdu;
|
||||
int timing_advance_update;
|
||||
int sync_pos;
|
||||
uint32_t harq_pid;
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
|
||||
if (eNB->ulsch[UE_id]->ue_type > 0) harq_pid = 0;
|
||||
else
|
||||
#endif
|
||||
{
|
||||
else {
|
||||
harq_pid = subframe2harq_pid (&eNB->frame_parms,
|
||||
frame, subframe);
|
||||
}
|
||||
@@ -1512,31 +1479,27 @@ static void do_release_harq(PHY_VARS_eNB *eNB,
|
||||
int harq_pid;
|
||||
int subframe_tx;
|
||||
int frame_tx;
|
||||
|
||||
AssertFatal(UE_id != -1, "No existing 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 (eNB->frame_parms.frame_type == FDD) {
|
||||
subframe_tx = (subframe + 6) % 10;
|
||||
frame_tx = ul_ACK_subframe2_dl_frame(&eNB->frame_parms,
|
||||
frame,
|
||||
subframe,
|
||||
subframe_tx);
|
||||
|
||||
frame,
|
||||
subframe,
|
||||
subframe_tx);
|
||||
harq_pid = dlsch0->harq_ids[frame_tx%2][subframe_tx];
|
||||
|
||||
if((harq_pid < 0) || (harq_pid >= dlsch0->Mdlharq)) {
|
||||
LOG_E(PHY,"illegal harq_pid %d %s:%d\n", harq_pid, __FILE__, __LINE__);
|
||||
return;
|
||||
}
|
||||
|
||||
dlsch0_harq = dlsch0->harq_processes[harq_pid];
|
||||
dlsch1_harq = dlsch1->harq_processes[harq_pid];
|
||||
|
||||
AssertFatal(dlsch0_harq != NULL, "dlsch0_harq is null\n");
|
||||
|
||||
#if T_TRACER
|
||||
|
||||
if (after_rounds != -1) {
|
||||
@@ -1561,7 +1524,6 @@ static void do_release_harq(PHY_VARS_eNB *eNB,
|
||||
dlsch0_harq->status = SCH_IDLE;
|
||||
dlsch0->harq_mask &= ~(1 << harq_pid);
|
||||
}
|
||||
|
||||
} else {
|
||||
/* Release all processes in the bundle that was acked, based on mask */
|
||||
/* This is at most 4 for multiplexing and 9 for bundling/special bundling */
|
||||
@@ -1569,13 +1531,12 @@ static void do_release_harq(PHY_VARS_eNB *eNB,
|
||||
|
||||
for (int m=0; m < M; m++) {
|
||||
subframe_tx = ul_ACK_subframe2_dl_subframe(&eNB->frame_parms,
|
||||
subframe,
|
||||
m);
|
||||
|
||||
subframe,
|
||||
m);
|
||||
frame_tx = ul_ACK_subframe2_dl_frame(&eNB->frame_parms,
|
||||
frame,
|
||||
subframe,
|
||||
subframe_tx);
|
||||
frame,
|
||||
subframe,
|
||||
subframe_tx);
|
||||
|
||||
if (((1 << m) & mask) > 0) {
|
||||
harq_pid = dlsch0->harq_ids[frame_tx%2][subframe_tx];
|
||||
@@ -1584,12 +1545,12 @@ static void do_release_harq(PHY_VARS_eNB *eNB,
|
||||
LOG_E(PHY,"illegal harq_pid %d %s:%d\n", harq_pid, __FILE__, __LINE__);
|
||||
return;
|
||||
}
|
||||
|
||||
dlsch0_harq = dlsch0->harq_processes[harq_pid];
|
||||
dlsch1_harq = dlsch1->harq_processes[harq_pid];
|
||||
|
||||
AssertFatal(dlsch0_harq != NULL, "Dlsch0_harq is null\n");
|
||||
|
||||
#if T_TRACER
|
||||
|
||||
if (after_rounds != -1) {
|
||||
T(T_ENB_PHY_DLSCH_UE_NACK,
|
||||
T_INT(0),
|
||||
@@ -1605,7 +1566,9 @@ static void do_release_harq(PHY_VARS_eNB *eNB,
|
||||
T_INT(dlsch0->rnti),
|
||||
T_INT(harq_pid));
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
if (dlsch0_harq->round >= after_rounds) {
|
||||
dlsch0_harq->status = SCH_IDLE;
|
||||
|
||||
@@ -1619,7 +1582,7 @@ static void do_release_harq(PHY_VARS_eNB *eNB,
|
||||
}
|
||||
|
||||
static void release_harq(PHY_VARS_eNB *eNB,int UE_id,int tb,uint16_t frame,uint8_t subframe,uint16_t mask, int is_ack) {
|
||||
/*
|
||||
/*
|
||||
* Maximum number of DL transmissions = 4.
|
||||
* TODO: get the value from configuration.
|
||||
* If is_ack is true then we release immediately. The value -1 can be used for that.
|
||||
@@ -2017,43 +1980,50 @@ void phy_procedures_eNB_uespec_RX(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc) {
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_ENB_RX_UESPEC, 0 );
|
||||
}
|
||||
|
||||
void release_rnti_of_phy(module_id_t mod_id){
|
||||
int i,j;
|
||||
int CC_id;
|
||||
rnti_t rnti;
|
||||
PHY_VARS_eNB *eNB_PHY = NULL;
|
||||
LTE_eNB_ULSCH_t *ulsch = NULL;
|
||||
LTE_eNB_DLSCH_t *dlsch = NULL;
|
||||
for(i = 0; i< release_rntis.number_of_TLVs;i++){
|
||||
for (CC_id = 0; CC_id < MAX_NUM_CCs; CC_id++) {
|
||||
eNB_PHY = RC.eNB[mod_id][CC_id];
|
||||
rnti = release_rntis.ue_release_request_TLVs_list[i].rnti;
|
||||
for (j=0; j<NUMBER_OF_UE_MAX; j++) {
|
||||
ulsch = eNB_PHY->ulsch[j];
|
||||
if((ulsch != NULL) && (ulsch->rnti == rnti)){
|
||||
LOG_I(PHY, "clean_eNb_ulsch ulsch[%d] UE %x\n", j, rnti);
|
||||
clean_eNb_ulsch(ulsch);
|
||||
}
|
||||
void release_rnti_of_phy(module_id_t mod_id) {
|
||||
int i,j;
|
||||
int CC_id;
|
||||
rnti_t rnti;
|
||||
PHY_VARS_eNB *eNB_PHY = NULL;
|
||||
LTE_eNB_ULSCH_t *ulsch = NULL;
|
||||
LTE_eNB_DLSCH_t *dlsch = NULL;
|
||||
|
||||
dlsch = eNB_PHY->dlsch[j][0];
|
||||
if((dlsch != NULL) && (dlsch->rnti == rnti)){
|
||||
LOG_I(PHY, "clean_eNb_dlsch dlsch[%d] UE %x \n", j, rnti);
|
||||
clean_eNb_dlsch(dlsch);
|
||||
}
|
||||
}
|
||||
ulsch = eNB_PHY->ulsch[j];
|
||||
if((ulsch != NULL) && (ulsch->rnti == rnti)){
|
||||
LOG_I(PHY, "clean_eNb_ulsch ulsch[%d] UE %x\n", j, rnti);
|
||||
clean_eNb_ulsch(ulsch);
|
||||
}
|
||||
for(j=0; j<NUMBER_OF_UCI_VARS_MAX; j++) {
|
||||
if(eNB_PHY->uci_vars[j].rnti == rnti){
|
||||
LOG_I(PHY, "clean eNb uci_vars[%d] UE %x \n",j, rnti);
|
||||
memset(&eNB_PHY->uci_vars[i],0,sizeof(LTE_eNB_UCI));
|
||||
}
|
||||
for(i = 0; i< release_rntis.number_of_TLVs; i++) {
|
||||
for (CC_id = 0; CC_id < MAX_NUM_CCs; CC_id++) {
|
||||
eNB_PHY = RC.eNB[mod_id][CC_id];
|
||||
rnti = release_rntis.ue_release_request_TLVs_list[i].rnti;
|
||||
|
||||
}
|
||||
for (j=0; j<NUMBER_OF_UE_MAX; j++) {
|
||||
ulsch = eNB_PHY->ulsch[j];
|
||||
|
||||
if((ulsch != NULL) && (ulsch->rnti == rnti)) {
|
||||
LOG_I(PHY, "clean_eNb_ulsch ulsch[%d] UE %x\n", j, rnti);
|
||||
clean_eNb_ulsch(ulsch);
|
||||
}
|
||||
|
||||
dlsch = eNB_PHY->dlsch[j][0];
|
||||
|
||||
if((dlsch != NULL) && (dlsch->rnti == rnti)) {
|
||||
LOG_I(PHY, "clean_eNb_dlsch dlsch[%d] UE %x \n", j, rnti);
|
||||
clean_eNb_dlsch(dlsch);
|
||||
}
|
||||
}
|
||||
|
||||
ulsch = eNB_PHY->ulsch[j];
|
||||
|
||||
if((ulsch != NULL) && (ulsch->rnti == rnti)) {
|
||||
LOG_I(PHY, "clean_eNb_ulsch ulsch[%d] UE %x\n", j, rnti);
|
||||
clean_eNb_ulsch(ulsch);
|
||||
}
|
||||
|
||||
for(j=0; j<NUMBER_OF_UCI_VARS_MAX; j++) {
|
||||
if(eNB_PHY->uci_vars[j].rnti == rnti) {
|
||||
LOG_I(PHY, "clean eNb uci_vars[%d] UE %x \n",j, rnti);
|
||||
memset(&eNB_PHY->uci_vars[i],0,sizeof(LTE_eNB_UCI));
|
||||
}
|
||||
}
|
||||
}
|
||||
memset(&release_rntis, 0, sizeof(nfapi_ue_release_request_body_t));
|
||||
}
|
||||
|
||||
memset(&release_rntis, 0, sizeof(nfapi_ue_release_request_body_t));
|
||||
}
|
||||
|
||||
@@ -53,16 +53,11 @@
|
||||
|
||||
extern int oai_nfapi_rach_ind(nfapi_rach_indication_t *rach_ind);
|
||||
|
||||
void prach_procedures(PHY_VARS_eNB *eNB
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,
|
||||
int br_flag
|
||||
#endif
|
||||
) {
|
||||
void prach_procedures(PHY_VARS_eNB *eNB,
|
||||
int br_flag ) {
|
||||
uint16_t max_preamble[4],max_preamble_energy[4],max_preamble_delay[4],avg_preamble_energy[4];
|
||||
uint16_t i;
|
||||
int frame,subframe;
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
|
||||
if (br_flag==1) {
|
||||
subframe = eNB->proc.subframe_prach_br;
|
||||
@@ -70,9 +65,7 @@ void prach_procedures(PHY_VARS_eNB *eNB
|
||||
pthread_mutex_lock(&eNB->UL_INFO_mutex);
|
||||
eNB->UL_INFO.rach_ind_br.rach_indication_body.number_of_preambles=0;
|
||||
pthread_mutex_unlock(&eNB->UL_INFO_mutex);
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
} else {
|
||||
pthread_mutex_lock(&eNB->UL_INFO_mutex);
|
||||
eNB->UL_INFO.rach_ind.rach_indication_body.number_of_preambles=0;
|
||||
pthread_mutex_unlock(&eNB->UL_INFO_mutex);
|
||||
@@ -90,13 +83,10 @@ void prach_procedures(PHY_VARS_eNB *eNB
|
||||
|
||||
for (ru_aa=0,aa=0; ru_aa<ru->nb_rx; ru_aa++,aa++) {
|
||||
eNB->prach_vars.rxsigF[0][aa] = eNB->RU_list[i]->prach_rxsigF[ru_aa];
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
int ce_level;
|
||||
|
||||
if (br_flag==1)
|
||||
for (ce_level=0; ce_level<4; ce_level++) eNB->prach_vars_br.rxsigF[ce_level][aa] = eNB->RU_list[i]->prach_rxsigF_br[ce_level][ru_aa];
|
||||
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@@ -106,12 +96,9 @@ void prach_procedures(PHY_VARS_eNB *eNB
|
||||
&max_preamble[0],
|
||||
&max_preamble_energy[0],
|
||||
&max_preamble_delay[0],
|
||||
&avg_preamble_energy[0],
|
||||
&avg_preamble_energy[0],
|
||||
frame,
|
||||
0
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,br_flag
|
||||
#endif
|
||||
0,br_flag
|
||||
);
|
||||
LOG_D(PHY,"[RAPROC] Frame %d, subframe %d : BR %d Most likely preamble %d, energy %d dB delay %d (prach_energy counter %d), threshold %d, I0 %d\n",
|
||||
frame,subframe,br_flag,
|
||||
@@ -119,9 +106,8 @@ void prach_procedures(PHY_VARS_eNB *eNB
|
||||
max_preamble_energy[0]/10,
|
||||
max_preamble_delay[0],
|
||||
eNB->prach_energy_counter,
|
||||
eNB->measurements.prach_I0+eNB->prach_DTX_threshold,
|
||||
eNB->measurements.prach_I0);
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
eNB->measurements.prach_I0+eNB->prach_DTX_threshold,
|
||||
eNB->measurements.prach_I0);
|
||||
|
||||
if (br_flag==1) {
|
||||
int prach_mask;
|
||||
@@ -161,9 +147,7 @@ void prach_procedures(PHY_VARS_eNB *eNB
|
||||
ind++;
|
||||
}
|
||||
} */// ce_level
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
} else {
|
||||
if ((eNB->prach_energy_counter == 100) &&
|
||||
(max_preamble_energy[0] > eNB->measurements.prach_I0+eNB->prach_DTX_threshold)) {
|
||||
LOG_I(PHY,"[eNB %d/%d][RAPROC] Frame %d, subframe %d Initiating RA procedure with preamble %d, energy %d.%d dB, delay %d\n",
|
||||
|
||||
@@ -127,12 +127,10 @@ void phy_procedures_eNB_S_RX(PHY_VARS_eNB *phy_vars_eNB,L1_rxtx_proc_t *proc);
|
||||
@param phy_vars_eNB Pointer to eNB variables on which to act
|
||||
@param br_flag indicator for eMTC PRACH
|
||||
*/
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
|
||||
void prach_procedures(PHY_VARS_eNB *eNB,
|
||||
int br_flag);
|
||||
#else
|
||||
void prach_procedures(PHY_VARS_eNB *eNB);
|
||||
#endif
|
||||
int br_flag);
|
||||
|
||||
|
||||
/*! \brief Function to compute timing of Msg3 transmission on UL-SCH (first UE transmission in RA procedure). This implements the timing in paragraph a) from Section 6.1.1 in 36.213 (p. 17 in version 8.6). Used by eNB upon transmission of random-access response (RA_RNTI) to program corresponding ULSCH reception procedure. Used by UE upon reception of random-access response (RA_RNTI) to program corresponding ULSCH transmission procedure. This does not support the UL_delay field in RAR (always assumed to be 0).
|
||||
@param frame_parms Pointer to DL frame parameter descriptor
|
||||
@@ -197,7 +195,7 @@ int8_t find_ue_ulsch(uint16_t rnti, PHY_VARS_eNB *phy_vars_eNB);
|
||||
|
||||
void schedule_response(Sched_Rsp_t *Sched_INFO);
|
||||
|
||||
LTE_eNB_UE_stats* get_UE_stats(uint8_t Mod_id, uint8_t CC_id,uint16_t rnti);
|
||||
LTE_eNB_UE_stats *get_UE_stats(uint8_t Mod_id, uint8_t CC_id,uint16_t rnti);
|
||||
|
||||
/*! \brief Function to compute subframe type as a function of Frame type and TDD Configuration (implements Table 4.2.2 from 36.211, p.11 from version 8.6) and subframe index. Same as subframe_select, except that it uses the Mod_id and is provided as a service to the MAC scheduler.
|
||||
@param Mod_id Index of eNB
|
||||
|
||||
Reference in New Issue
Block a user