Commit ca51ba7d authored by francescomani's avatar francescomani

ignoring PUCCH2 TPC for now

parent 815a15e5
...@@ -390,7 +390,7 @@ void nr_decode_pucch0(PHY_VARS_gNB *gNB, ...@@ -390,7 +390,7 @@ void nr_decode_pucch0(PHY_VARS_gNB *gNB,
index=maxpos; index=maxpos;
uci_stats->pucch0_n00 = gNB->measurements.n0_subband_power_tot_dB[prb_offset[0]]; uci_stats->pucch0_n00 = gNB->measurements.n0_subband_power_tot_dB[prb_offset[0]];
uci_stats->pucch0_n01 = gNB->measurements.n0_subband_power_tot_dB[prb_offset[1]]; uci_stats->pucch0_n01 = gNB->measurements.n0_subband_power_tot_dB[prb_offset[1]];
LOG_I(PHY,"n00[%d] = %d, n01[%d] = %d\n",prb_offset[0],uci_stats->pucch0_n00,prb_offset[1],uci_stats->pucch0_n01); LOG_D(PHY,"n00[%d] = %d, n01[%d] = %d\n",prb_offset[0],uci_stats->pucch0_n00,prb_offset[1],uci_stats->pucch0_n01);
// estimate CQI for MAC (from antenna port 0 only) // estimate CQI for MAC (from antenna port 0 only)
int max_n0 = uci_stats->pucch0_n00>uci_stats->pucch0_n01 ? uci_stats->pucch0_n00:uci_stats->pucch0_n01; int max_n0 = uci_stats->pucch0_n00>uci_stats->pucch0_n01 ? uci_stats->pucch0_n00:uci_stats->pucch0_n01;
int SNRtimes10,sigenergy=0; int SNRtimes10,sigenergy=0;
...@@ -1680,6 +1680,7 @@ void nr_decode_pucch2(PHY_VARS_gNB *gNB, ...@@ -1680,6 +1680,7 @@ void nr_decode_pucch2(PHY_VARS_gNB *gNB,
} }
// estimate CQI for MAC (from antenna port 0 only) // estimate CQI for MAC (from antenna port 0 only)
// TODO this computation is wrong -> to be ignored at MAC for now
int SNRtimes10 = dB_fixed_times10(signal_energy_nodc(&rxdataF[0][soffset+(l2*frame_parms->ofdm_symbol_size)+re_offset[0]], int SNRtimes10 = dB_fixed_times10(signal_energy_nodc(&rxdataF[0][soffset+(l2*frame_parms->ofdm_symbol_size)+re_offset[0]],
12*pucch_pdu->prb_size)) - 12*pucch_pdu->prb_size)) -
(10*gNB->measurements.n0_power_tot_dB); (10*gNB->measurements.n0_power_tot_dB);
......
...@@ -1493,10 +1493,11 @@ void handle_nr_uci_pucch_2_3_4(module_id_t mod_id, ...@@ -1493,10 +1493,11 @@ void handle_nr_uci_pucch_2_3_4(module_id_t mod_id,
NR_UE_sched_ctrl_t *sched_ctrl = &UE_info->UE_sched_ctrl[UE_id]; NR_UE_sched_ctrl_t *sched_ctrl = &UE_info->UE_sched_ctrl[UE_id];
// tpc (power control) // tpc (power control)
sched_ctrl->tpc1 = nr_get_tpc(RC.nrmac[mod_id]->pucch_target_snrx10, // TODO PUCCH2 SNR computation is not correct -> ignore the following
uci_234->ul_cqi, //sched_ctrl->tpc1 = nr_get_tpc(RC.nrmac[mod_id]->pucch_target_snrx10,
30); // uci_234->ul_cqi,
sched_ctrl->pucch_snrx10 = uci_234->ul_cqi * 5 - 640; // 30);
//sched_ctrl->pucch_snrx10 = uci_234->ul_cqi * 5 - 640;
if ((uci_234->pduBitmap >> 1) & 0x01) { if ((uci_234->pduBitmap >> 1) & 0x01) {
// iterate over received harq bits // iterate over received harq bits
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment