Merge remote-tracking branch 'origin/develop' into develop-entv
This commit is contained in:
@@ -1518,15 +1518,19 @@ void ue_ulsch_uespec_procedures(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB
|
||||
ue->ulsch[eNB_id]->harq_processes[harq_pid]->O_ACK = ack_status_cw0 + ack_status_cw1;
|
||||
}
|
||||
|
||||
if (ue->ulsch[eNB_id]->o_ACK[0]) {
|
||||
T(T_UE_PHY_DLSCH_UE_ACK, T_INT(eNB_id), T_INT(frame_tx%1024), T_INT(subframe_tx), T_INT(ue->dlsch[ue->current_thread_id[proc->subframe_rx]][eNB_id][0]->rnti),
|
||||
T_INT(ue->dlsch[ue->current_thread_id[proc->subframe_rx]][eNB_id][0]->current_harq_pid));
|
||||
} else {
|
||||
T(T_UE_PHY_DLSCH_UE_NACK, T_INT(eNB_id), T_INT(frame_tx%1024), T_INT(subframe_tx), T_INT(ue->dlsch[ue->current_thread_id[proc->subframe_rx]][eNB_id][0]->rnti),
|
||||
T_INT(ue->dlsch[ue->current_thread_id[proc->subframe_rx]][eNB_id][0]->current_harq_pid));
|
||||
}
|
||||
|
||||
if ( LOG_DEBUGFLAG(DEBUG_UE_PHYPROC)) {
|
||||
if(ue->ulsch[eNB_id]->o_ACK[0]) {
|
||||
LOG_I(PHY,"PUSCH ACK\n");
|
||||
T(T_UE_PHY_DLSCH_UE_ACK, T_INT(eNB_id), T_INT(frame_tx%1024), T_INT(subframe_tx), T_INT(ue->dlsch[ue->current_thread_id[proc->subframe_rx]][eNB_id][0]->rnti),
|
||||
T_INT(ue->dlsch[ue->current_thread_id[proc->subframe_rx]][eNB_id][0]->current_harq_pid));
|
||||
} else {
|
||||
LOG_I(PHY,"PUSCH NACK\n");
|
||||
T(T_UE_PHY_DLSCH_UE_NACK, T_INT(eNB_id), T_INT(frame_tx%1024), T_INT(subframe_tx), T_INT(ue->dlsch[ue->current_thread_id[proc->subframe_rx]][eNB_id][0]->rnti),
|
||||
T_INT(ue->dlsch[ue->current_thread_id[proc->subframe_rx]][eNB_id][0]->current_harq_pid));
|
||||
}
|
||||
|
||||
LOG_I(PHY,"[UE %d][PDSCH %x] AbsSubFrame %d.%d Generating ACK (%d,%d) for %d bits on PUSCH\n",
|
||||
@@ -1901,16 +1905,6 @@ void ue_pucch_procedures(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uin
|
||||
uint8_t isShortenPucch = (pSoundingrs_ul_config_dedicated->srsCellSubframe && frame_parms->soundingrs_ul_config_common.ackNackSRS_SimultaneousTransmission);
|
||||
bundling_flag = ue->pucch_config_dedicated[eNB_id].tdd_AckNackFeedbackMode;
|
||||
|
||||
if ((frame_parms->frame_type==FDD) ||
|
||||
(bundling_flag==bundling) ||
|
||||
((frame_parms->frame_type==TDD)&&(frame_parms->tdd_config==1)&&((subframe_tx!=2)||(subframe_tx!=7)))) {
|
||||
format = pucch_format1a;
|
||||
// LOG_D(PHY,"[UE] PUCCH 1a\n");
|
||||
} else {
|
||||
format = pucch_format1b;
|
||||
// LOG_D(PHY,"[UE] PUCCH 1b\n");
|
||||
}
|
||||
|
||||
// Part - I
|
||||
// Collect feedback that should be transmitted at this subframe
|
||||
// - SR
|
||||
@@ -2046,14 +2040,12 @@ void ue_pucch_procedures(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uin
|
||||
}
|
||||
}
|
||||
|
||||
if (LOG_DEBUGFLAG(DEBUG_UE_PHYPROC)) {
|
||||
if(pucch_payload[0]) {
|
||||
T(T_UE_PHY_DLSCH_UE_ACK, T_INT(eNB_id), T_INT(frame_tx%1024), T_INT(subframe_tx), T_INT(ue->dlsch[ue->current_thread_id[proc->subframe_rx]][eNB_id][0]->rnti),
|
||||
T_INT(ue->dlsch[ue->current_thread_id[proc->subframe_rx]][eNB_id][0]->current_harq_pid));
|
||||
} else {
|
||||
T(T_UE_PHY_DLSCH_UE_NACK, T_INT(eNB_id), T_INT(frame_tx%1024), T_INT(subframe_tx), T_INT(ue->dlsch[ue->current_thread_id[proc->subframe_rx]][eNB_id][0]->rnti),
|
||||
T_INT(ue->dlsch[ue->current_thread_id[proc->subframe_rx]][eNB_id][0]->current_harq_pid));
|
||||
}
|
||||
if (pucch_payload[0]) {
|
||||
T(T_UE_PHY_DLSCH_UE_ACK, T_INT(eNB_id), T_INT(frame_tx%1024), T_INT(subframe_tx), T_INT(ue->dlsch[ue->current_thread_id[proc->subframe_rx]][eNB_id][0]->rnti),
|
||||
T_INT(ue->dlsch[ue->current_thread_id[proc->subframe_rx]][eNB_id][0]->current_harq_pid));
|
||||
} else {
|
||||
T(T_UE_PHY_DLSCH_UE_NACK, T_INT(eNB_id), T_INT(frame_tx%1024), T_INT(subframe_tx), T_INT(ue->dlsch[ue->current_thread_id[proc->subframe_rx]][eNB_id][0]->rnti),
|
||||
T_INT(ue->dlsch[ue->current_thread_id[proc->subframe_rx]][eNB_id][0]->current_harq_pid));
|
||||
}
|
||||
|
||||
generate_pucch1x(ue->common_vars.txdataF,
|
||||
@@ -2774,18 +2766,21 @@ int ue_pdcch_procedures(uint8_t eNB_id,PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint
|
||||
CBA_RNTI,
|
||||
eNB_id,
|
||||
0)==0)) {
|
||||
int harq_pid = subframe2harq_pid(&ue->frame_parms,
|
||||
pdcch_alloc2ul_frame(&ue->frame_parms,proc->frame_rx,proc->subframe_rx),
|
||||
pdcch_alloc2ul_subframe(&ue->frame_parms,proc->subframe_rx));
|
||||
T(T_UE_PHY_ULSCH_UE_DCI, T_INT(eNB_id), T_INT(proc->frame_rx%1024), T_INT(proc->subframe_rx),
|
||||
T_INT(dci_alloc_rx[i].rnti),
|
||||
T_INT(harq_pid),
|
||||
T_INT(ue->ulsch[eNB_id]->harq_processes[harq_pid]->mcs),
|
||||
T_INT(ue->ulsch[eNB_id]->harq_processes[harq_pid]->round),
|
||||
T_INT(ue->ulsch[eNB_id]->harq_processes[harq_pid]->first_rb),
|
||||
T_INT(ue->ulsch[eNB_id]->harq_processes[harq_pid]->nb_rb),
|
||||
T_INT(ue->ulsch[eNB_id]->harq_processes[harq_pid]->TBS));
|
||||
if (LOG_DEBUGFLAG(DEBUG_UE_PHYPROC)) {
|
||||
LOG_USEDINLOG_VAR(int8_t,harq_pid) = subframe2harq_pid(&ue->frame_parms,
|
||||
pdcch_alloc2ul_frame(&ue->frame_parms,proc->frame_rx,proc->subframe_rx),
|
||||
pdcch_alloc2ul_subframe(&ue->frame_parms,proc->subframe_rx));
|
||||
T(T_UE_PHY_ULSCH_UE_DCI, T_INT(eNB_id), T_INT(proc->frame_rx%1024), T_INT(proc->subframe_rx),
|
||||
T_INT(dci_alloc_rx[i].rnti),
|
||||
T_INT(harq_pid),
|
||||
T_INT(ue->ulsch[eNB_id]->harq_processes[harq_pid]->mcs),
|
||||
T_INT(ue->ulsch[eNB_id]->harq_processes[harq_pid]->round),
|
||||
T_INT(ue->ulsch[eNB_id]->harq_processes[harq_pid]->first_rb),
|
||||
T_INT(ue->ulsch[eNB_id]->harq_processes[harq_pid]->nb_rb),
|
||||
T_INT(ue->ulsch[eNB_id]->harq_processes[harq_pid]->TBS));
|
||||
LOG_D(PHY,"[UE %d] Generate UE ULSCH C_RNTI format 0 (subframe %d)\n",ue->Mod_id,subframe_rx);
|
||||
}
|
||||
}
|
||||
@@ -3085,7 +3080,7 @@ void ue_pdsch_procedures(PHY_VARS_UE *ue, UE_rxtx_proc_t *proc, int eNB_id, PDSC
|
||||
int i_mod,eNB_id_i,dual_stream_UE;
|
||||
int first_symbol_flag=0;
|
||||
|
||||
if (dlsch0->active == 0)
|
||||
if (dlsch0 && dlsch0->active == 0)
|
||||
return;
|
||||
|
||||
for (m=s0; m<=s1; m++) {
|
||||
@@ -4313,7 +4308,7 @@ int phy_procedures_slot_parallelization_UE_RX(PHY_VARS_UE *ue,UE_rxtx_proc_t *pr
|
||||
ue->dlsch_ra[eNB_id]->active = 0;
|
||||
}
|
||||
|
||||
if (LOG_DEBUGFLAG(UE_TIMING)
|
||||
if (LOG_DEBUGFLAG(UE_TIMING)) {
|
||||
stop_meas(&ue->dlsch_procedures_stat[ue->current_thread_id[subframe_rx]]);
|
||||
LOG_I(PHY, "[AbsSFN %d.%d] Channel Decoder: %5.2f \n",frame_rx,subframe_rx,ue->dlsch_procedures_stat[ue->current_thread_id[subframe_rx]].p_time/(cpuf*1000.0));
|
||||
}
|
||||
|
||||
@@ -36,12 +36,10 @@
|
||||
#include "PHY/LTE_UE_TRANSPORT/transport_proto_ue.h"
|
||||
#include "PHY/phy_extern_ue.h"
|
||||
#include "PHY/LTE_ESTIMATION/lte_estimation.h"
|
||||
#include "nfapi/oai_integration/vendor_ext.h"
|
||||
|
||||
extern uint8_t nfapi_mode;
|
||||
|
||||
int16_t get_hundred_times_delta_IF(PHY_VARS_UE *ue,uint8_t eNB_id,uint8_t harq_pid)
|
||||
{
|
||||
|
||||
int16_t get_hundred_times_delta_IF(PHY_VARS_UE *ue,uint8_t eNB_id,uint8_t harq_pid) {
|
||||
uint32_t Nre = 2*ue->ulsch[eNB_id]->harq_processes[harq_pid]->Nsymb_initial *
|
||||
ue->ulsch[eNB_id]->harq_processes[harq_pid]->nb_rb*12;
|
||||
|
||||
@@ -51,9 +49,8 @@ int16_t get_hundred_times_delta_IF(PHY_VARS_UE *ue,uint8_t eNB_id,uint8_t harq_p
|
||||
uint32_t MPR_x100 = 100*ue->ulsch[eNB_id]->harq_processes[harq_pid]->TBS/Nre;
|
||||
// Note: MPR=is the effective spectral efficiency of the PUSCH
|
||||
// FK 20140908 sumKr is only set after the ulsch_encoding
|
||||
|
||||
uint16_t beta_offset_pusch = (ue->ulsch[eNB_id]->harq_processes[harq_pid]->control_only == 1) ?
|
||||
ue->ulsch[eNB_id]->beta_offset_cqi_times8:8;
|
||||
ue->ulsch[eNB_id]->beta_offset_cqi_times8:8;
|
||||
|
||||
if (ue->ul_power_control_dedicated[eNB_id].deltaMCS_Enabled == 1) {
|
||||
// This is the formula from Section 5.1.1.1 in 36.213 10*log10(deltaIF_PUSCH = (2^(MPR*Ks)-1)*beta_offset_pusch)
|
||||
@@ -67,34 +64,24 @@ int16_t get_hundred_times_delta_IF(PHY_VARS_UE *ue,uint8_t eNB_id,uint8_t harq_p
|
||||
|
||||
uint8_t alpha_lut[8] = {0,40,50,60,70,80,90,100};
|
||||
|
||||
void pusch_power_cntl(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uint8_t j, uint8_t abstraction_flag)
|
||||
{
|
||||
|
||||
|
||||
void pusch_power_cntl(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uint8_t j, uint8_t abstraction_flag) {
|
||||
uint8_t harq_pid = subframe2harq_pid(&ue->frame_parms,
|
||||
proc->frame_tx,
|
||||
proc->subframe_tx);
|
||||
|
||||
uint8_t nb_rb = ue->ulsch[eNB_id]->harq_processes[harq_pid]->nb_rb;
|
||||
int16_t PL;
|
||||
|
||||
|
||||
// P_pusch = 10*log10(nb_rb + P_opusch(j)+ alpha(u)*PL + delta_TF(i) + f(i))
|
||||
//
|
||||
// P_opusch(0) = P_oPTR + deltaP_Msg3 if PUSCH is transporting Msg3
|
||||
// else
|
||||
// P_opusch(0) = PO_NOMINAL_PUSCH(j) + P_O_UE_PUSCH(j)
|
||||
PL = get_PL(ue->Mod_id,ue->CC_id,eNB_id);
|
||||
|
||||
ue->ulsch[eNB_id]->Po_PUSCH = (hundred_times_log10_NPRB[nb_rb-1]+
|
||||
get_hundred_times_delta_IF(ue,eNB_id,harq_pid) +
|
||||
100*ue->ulsch[eNB_id]->f_pusch)/100;
|
||||
get_hundred_times_delta_IF(ue,eNB_id,harq_pid) +
|
||||
100*ue->ulsch[eNB_id]->f_pusch)/100;
|
||||
|
||||
if(ue->ulsch_Msg3_active[eNB_id] == 1) { // Msg3 PUSCH
|
||||
|
||||
ue->ulsch[eNB_id]->Po_PUSCH += (get_Po_NOMINAL_PUSCH(ue->Mod_id,0) + PL);
|
||||
|
||||
|
||||
LOG_I(PHY,"[UE %d][RAPROC] frame %d, subframe %d: Msg3 Po_PUSCH %d dBm (%d,%d,100*PL=%d,%d,%d)\n",
|
||||
ue->Mod_id,proc->frame_tx,proc->subframe_tx,ue->ulsch[eNB_id]->Po_PUSCH,
|
||||
100*get_Po_NOMINAL_PUSCH(ue->Mod_id,0),
|
||||
@@ -104,10 +91,9 @@ void pusch_power_cntl(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uint8_
|
||||
100*ue->ulsch[eNB_id]->f_pusch);
|
||||
} else if (j==0) { // SPS PUSCH
|
||||
} else if (j==1) { // Normal PUSCH
|
||||
|
||||
ue->ulsch[eNB_id]->Po_PUSCH += ((alpha_lut[ue->frame_parms.ul_power_control_config_common.alpha]*PL)/100);
|
||||
ue->ulsch[eNB_id]->Po_PUSCH += ue->frame_parms.ul_power_control_config_common.p0_NominalPUSCH;
|
||||
ue->ulsch[eNB_id]->PHR = ue->tx_power_max_dBm-ue->ulsch[eNB_id]->Po_PUSCH;
|
||||
ue->ulsch[eNB_id]->PHR = ue->tx_power_max_dBm-ue->ulsch[eNB_id]->Po_PUSCH;
|
||||
|
||||
if (ue->ulsch[eNB_id]->PHR < -23)
|
||||
ue->ulsch[eNB_id]->PHR = -23;
|
||||
@@ -126,13 +112,11 @@ void pusch_power_cntl(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uint8_
|
||||
get_hundred_times_delta_IF(ue,eNB_id,harq_pid)/100.0,
|
||||
ue->ulsch[eNB_id]->f_pusch);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
int8_t get_PHR(uint8_t Mod_id, uint8_t CC_id,uint8_t eNB_index)
|
||||
{
|
||||
if(nfapi_mode!=3)
|
||||
return PHY_vars_UE_g[Mod_id][CC_id]->ulsch[eNB_index]->PHR;
|
||||
else
|
||||
return 40; // For nfapi_mode=3 consider ideal conditions
|
||||
int8_t get_PHR(uint8_t Mod_id, uint8_t CC_id,uint8_t eNB_index) {
|
||||
if(NFAPI_MODE!=NFAPI_UE_STUB_PNF)
|
||||
return PHY_vars_UE_g[Mod_id][CC_id]->ulsch[eNB_index]->PHR;
|
||||
else
|
||||
return 40; // l1l2 simulator => ideal conditions
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user