UE PUCCH power control now accumulates TPC when receiveived (in dci_tools and not in pucch_pc)
git-svn-id: http://svn.eurecom.fr/openair4G/trunk@7619 818b1a75-f10b-46b9-bf7c-635c3b92a50f
This commit is contained in:
@@ -3531,6 +3531,7 @@ int generate_ue_dlsch_params_from_dci(uint8_t subframe,
|
||||
dlsch0_harq = dlsch[0]->harq_processes[harq_pid];
|
||||
NPRB = RIV2nb_rb_LUT6[rballoc];
|
||||
dlsch0_harq->delta_PUCCH = delta_PUCCH_lut[TPC&3];
|
||||
dlsch[0]->g_pucch += delta_PUCCH_lut[TPC&3];
|
||||
}
|
||||
|
||||
if (vrb_type == 0)
|
||||
@@ -3580,6 +3581,7 @@ int generate_ue_dlsch_params_from_dci(uint8_t subframe,
|
||||
dlsch0_harq = dlsch[0]->harq_processes[harq_pid];
|
||||
NPRB = RIV2nb_rb_LUT25[rballoc];
|
||||
dlsch0_harq->delta_PUCCH = delta_PUCCH_lut[TPC&3];
|
||||
dlsch[0]->g_pucch += delta_PUCCH_lut[TPC&3];
|
||||
}
|
||||
|
||||
if (vrb_type == 0)
|
||||
@@ -3628,6 +3630,7 @@ int generate_ue_dlsch_params_from_dci(uint8_t subframe,
|
||||
dlsch0_harq = dlsch[0]->harq_processes[harq_pid];
|
||||
NPRB = RIV2nb_rb_LUT50[rballoc];
|
||||
dlsch0_harq->delta_PUCCH = delta_PUCCH_lut[TPC&3];
|
||||
dlsch[0]->g_pucch += delta_PUCCH_lut[TPC&3];
|
||||
}
|
||||
|
||||
if (vrb_type == 0) {
|
||||
@@ -3678,6 +3681,7 @@ int generate_ue_dlsch_params_from_dci(uint8_t subframe,
|
||||
dlsch0_harq = dlsch[0]->harq_processes[harq_pid];
|
||||
NPRB = RIV2nb_rb_LUT100[rballoc];
|
||||
dlsch0_harq->delta_PUCCH = delta_PUCCH_lut[TPC&3];
|
||||
dlsch[0]->g_pucch += delta_PUCCH_lut[TPC&3];
|
||||
}
|
||||
|
||||
if (vrb_type == 0) {
|
||||
@@ -3861,6 +3865,8 @@ int generate_ue_dlsch_params_from_dci(uint8_t subframe,
|
||||
|
||||
dlsch0_harq = dlsch[0]->harq_processes[harq_pid];
|
||||
dlsch0_harq->delta_PUCCH = delta_PUCCH_lut[TPC&3];
|
||||
dlsch[0]->g_pucch += delta_PUCCH_lut[TPC&3];
|
||||
|
||||
dlsch[0]->current_harq_pid = harq_pid;
|
||||
dlsch[0]->harq_ack[subframe].harq_id = harq_pid;
|
||||
|
||||
@@ -3881,6 +3887,8 @@ int generate_ue_dlsch_params_from_dci(uint8_t subframe,
|
||||
|
||||
// printf("NPRB %d\n",NPRB);
|
||||
dlsch0_harq->delta_PUCCH = delta_PUCCH_lut[TPC&3];
|
||||
dlsch[0]->g_pucch += delta_PUCCH_lut[TPC&3];
|
||||
|
||||
if (TPC!=1)
|
||||
LOG_I(PHY,"format1 TPC %d, dlsch0_harq->delta_PUCCH %d\n",TPC,dlsch0_harq->delta_PUCCH);
|
||||
|
||||
@@ -4181,6 +4189,7 @@ int generate_ue_dlsch_params_from_dci(uint8_t subframe,
|
||||
dlsch0_harq->mcs = mcs1;
|
||||
|
||||
dlsch0_harq->delta_PUCCH = delta_PUCCH_lut[TPC&3];
|
||||
dlsch[0]->g_pucch += delta_PUCCH_lut[TPC&3];
|
||||
/*
|
||||
if (dlsch0_harq->mcs>20) {
|
||||
msg("dci_tools.c: mcs > 20 disabled for now (asked %d)\n",dlsch0_harq->mcs);
|
||||
@@ -4588,7 +4597,9 @@ int generate_ue_dlsch_params_from_dci(uint8_t subframe,
|
||||
|
||||
// printf("NPRB %d\n",NPRB);
|
||||
dlsch0_harq->delta_PUCCH = delta_PUCCH_lut[TPC&3];
|
||||
dlsch0->g_pucch += delta_PUCCH_lut[TPC&3];
|
||||
dlsch1_harq->delta_PUCCH = delta_PUCCH_lut[TPC&3];
|
||||
dlsch1->g_pucch += delta_PUCCH_lut[TPC&3];
|
||||
|
||||
dlsch0_harq->mcs = mcs1;
|
||||
dlsch1_harq->mcs = mcs2;
|
||||
@@ -4830,6 +4841,7 @@ int generate_ue_dlsch_params_from_dci(uint8_t subframe,
|
||||
|
||||
dlsch0_harq->mcs = ((DCI1E_5MHz_2A_M10PRB_TDD_t *)dci_pdu)->mcs;
|
||||
dlsch0_harq->delta_PUCCH = delta_PUCCH_lut[((DCI1E_5MHz_2A_M10PRB_TDD_t *)dci_pdu)->TPC&3];
|
||||
dlsch[0]->g_pucch += delta_PUCCH_lut[TPC&3];
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -685,6 +685,8 @@ typedef struct {
|
||||
uint8_t Kmimo;
|
||||
/// Maximum number of Turbo iterations
|
||||
uint8_t max_turbo_iterations;
|
||||
/// accumulated tx power adjustment for PUCCH
|
||||
int8_t g_pucch;
|
||||
} LTE_UE_DLSCH_t;
|
||||
|
||||
typedef enum {format0,
|
||||
|
||||
@@ -113,9 +113,9 @@ int dump_ue_stats(PHY_VARS_UE *phy_vars_ue, char* buffer, int length, runmode_t
|
||||
len += sprintf(&buffer[len], "[UE PROC] Po_PUCCH = %d dBm (Po_NOMINAL_PUCCH %d dBm, g_pucch %d dB)\n",
|
||||
get_PL(phy_vars_ue->Mod_id,phy_vars_ue->CC_id,0)+
|
||||
phy_vars_ue->lte_frame_parms.ul_power_control_config_common.p0_NominalPUCCH+
|
||||
phy_vars_ue->g_pucch[0],
|
||||
phy_vars_ue->dlsch_ue[0][0]->g_pucch,
|
||||
phy_vars_ue->lte_frame_parms.ul_power_control_config_common.p0_NominalPUCCH,
|
||||
phy_vars_ue->g_pucch[0]);
|
||||
phy_vars_ue->dlsch_ue[0][0]->g_pucch);
|
||||
}
|
||||
//for (eNB=0;eNB<NUMBER_OF_eNB_MAX;eNB++) {
|
||||
for (eNB=0; eNB<1; eNB++) {
|
||||
|
||||
@@ -484,7 +484,6 @@ typedef struct {
|
||||
uint8_t pucch_payload[22];
|
||||
|
||||
UE_MODE_t UE_mode[NUMBER_OF_CONNECTED_eNB_MAX];
|
||||
int8_t g_pucch[NUMBER_OF_CONNECTED_eNB_MAX];
|
||||
/// cell-specific reference symbols
|
||||
uint32_t lte_gold_table[7][20][2][14];
|
||||
|
||||
|
||||
@@ -2520,11 +2520,10 @@ int phy_procedures_UE_RX(PHY_VARS_UE *phy_vars_ue,uint8_t eNB_id,uint8_t abstrac
|
||||
}
|
||||
|
||||
#ifdef DLSCH_THREAD
|
||||
|
||||
if (phy_vars_ue->dlsch_ue[eNB_id][0]->active == 1) {
|
||||
// activate thread since Chest is now done for slot before slot_rx
|
||||
if (l==0) {
|
||||
LOG_D(PHY,"frame %d, slot_rx %d: Calling rx_pdsch_thread for harq_pid %d\n",frame_rx,slot_rx, phy_vars_ue->dlsch_ue[eNB_id][0]->current_harq_pid);
|
||||
LOG_I(PHY,"frame %d, slot_rx %d: Calling rx_pdsch_thread for harq_pid %d\n",frame_rx,slot_rx, phy_vars_ue->dlsch_ue[eNB_id][0]->current_harq_pid);
|
||||
|
||||
if (pthread_mutex_lock (&rx_pdsch_mutex) != 0) { // Signal MAC_PHY Scheduler
|
||||
LOG_E(PHY,"[UE %d] ERROR pthread_mutex_lock\n",phy_vars_ue->Mod_id); // lock before accessing shared resource
|
||||
|
||||
@@ -53,14 +53,13 @@ int8_t pucch_power_cntl(PHY_VARS_UE *phy_vars_ue,uint8_t subframe,uint8_t eNB_id
|
||||
if ((pucch_fmt == pucch_format1a) ||
|
||||
(pucch_fmt == pucch_format1b)) { // Update g_pucch based on TPC/delta_PUCCH received in PDCCH for this process
|
||||
harq_pid = phy_vars_ue->dlsch_ue[eNB_id][0]->harq_ack[subframe].harq_id;
|
||||
phy_vars_ue->g_pucch[eNB_id] += phy_vars_ue->dlsch_ue[eNB_id][0]->harq_processes[harq_pid]->delta_PUCCH;
|
||||
//this is now done in dci_tools
|
||||
//phy_vars_ue->g_pucch[eNB_id] += phy_vars_ue->dlsch_ue[eNB_id][0]->harq_processes[harq_pid]->delta_PUCCH;
|
||||
}
|
||||
|
||||
// phy_vars_ue->g_pucch[eNB_id] = 0;
|
||||
|
||||
Po_PUCCH = get_PL(phy_vars_ue->Mod_id,phy_vars_ue->CC_id,eNB_id)+
|
||||
phy_vars_ue->lte_frame_parms.ul_power_control_config_common.p0_NominalPUCCH+
|
||||
phy_vars_ue->g_pucch[eNB_id];
|
||||
phy_vars_ue->lte_frame_parms.ul_power_control_config_common.p0_NominalPUCCH+
|
||||
phy_vars_ue->dlsch_ue[eNB_id][0]->g_pucch;
|
||||
|
||||
switch (pucch_fmt) {
|
||||
case pucch_format1:
|
||||
@@ -103,7 +102,7 @@ int8_t pucch_power_cntl(PHY_VARS_UE *phy_vars_ue,uint8_t subframe,uint8_t eNB_id
|
||||
Po_PUCCH,
|
||||
phy_vars_ue->lte_frame_parms.ul_power_control_config_common.p0_NominalPUCCH,
|
||||
get_PL(phy_vars_ue->Mod_id,phy_vars_ue->CC_id,eNB_id),
|
||||
phy_vars_ue->g_pucch[eNB_id]);
|
||||
phy_vars_ue->dlsch_ue[eNB_id][0]->g_pucch);
|
||||
} else {
|
||||
LOG_I(PHY,"[UE %d][SR %x] frame %d, subframe %d: Po_PUCCH %d dBm : Po_NOMINAL_PUCCH %d dBm, PL %d dB g_pucch %d dB\n",
|
||||
phy_vars_ue->Mod_id,
|
||||
@@ -111,7 +110,7 @@ int8_t pucch_power_cntl(PHY_VARS_UE *phy_vars_ue,uint8_t subframe,uint8_t eNB_id
|
||||
Po_PUCCH,
|
||||
phy_vars_ue->lte_frame_parms.ul_power_control_config_common.p0_NominalPUCCH,
|
||||
get_PL(phy_vars_ue->Mod_id,phy_vars_ue->CC_id,eNB_id),
|
||||
phy_vars_ue->g_pucch[eNB_id]);
|
||||
phy_vars_ue->dlsch_ue[eNB_id][0]->g_pucch);
|
||||
}
|
||||
|
||||
return(Po_PUCCH);
|
||||
|
||||
Reference in New Issue
Block a user