Commit 51e77fd0 authored by Sakthivel Velumani's avatar Sakthivel Velumani

Added pucch stats along with ulsch one

parent 6b5f8ff2
...@@ -121,6 +121,8 @@ int phy_init_nr_gNB(PHY_VARS_gNB *gNB, ...@@ -121,6 +121,8 @@ int phy_init_nr_gNB(PHY_VARS_gNB *gNB,
uint32_t ***pdcch_dmrs = gNB->nr_gold_pdcch_dmrs; uint32_t ***pdcch_dmrs = gNB->nr_gold_pdcch_dmrs;
AssertFatal(pdcch_dmrs!=NULL, "NR init: pdcch_dmrs malloc failed\n"); AssertFatal(pdcch_dmrs!=NULL, "NR init: pdcch_dmrs malloc failed\n");
gNB->bad_pucch = 0;
for (int slot=0; slot<fp->slots_per_frame; slot++) { for (int slot=0; slot<fp->slots_per_frame; slot++) {
pdcch_dmrs[slot] = (uint32_t **)malloc16(fp->symbols_per_slot*sizeof(uint32_t *)); pdcch_dmrs[slot] = (uint32_t **)malloc16(fp->symbols_per_slot*sizeof(uint32_t *));
AssertFatal(pdcch_dmrs[slot]!=NULL, "NR init: pdcch_dmrs for slot %d - malloc failed\n", slot); AssertFatal(pdcch_dmrs[slot]!=NULL, "NR init: pdcch_dmrs for slot %d - malloc failed\n", slot);
......
...@@ -390,6 +390,7 @@ void nr_decode_pucch0(PHY_VARS_gNB *gNB, ...@@ -390,6 +390,7 @@ void nr_decode_pucch0(PHY_VARS_gNB *gNB,
if ((xrtmag_dB<(11+dB_fixed(no_corr))) || (dB_fixed(av_corr)<(13+gNB->measurements.n0_power_tot_dB))) //TODO these are temporary threshold based on measurments with the phone if ((xrtmag_dB<(11+dB_fixed(no_corr))) || (dB_fixed(av_corr)<(13+gNB->measurements.n0_power_tot_dB))) //TODO these are temporary threshold based on measurments with the phone
no_conf=true; no_conf=true;
} }
gNB->bad_pucch += no_conf;
// first bit of bitmap for sr presence and second bit for acknack presence // first bit of bitmap for sr presence and second bit for acknack presence
uci_pdu->pduBitmap = pucch_pdu->sr_flag | ((pucch_pdu->bit_len_harq>0)<<1); uci_pdu->pduBitmap = pucch_pdu->sr_flag | ((pucch_pdu->bit_len_harq>0)<<1);
uci_pdu->pucch_format = 0; // format 0 uci_pdu->pucch_format = 0; // format 0
......
...@@ -797,6 +797,7 @@ typedef struct PHY_VARS_gNB_s { ...@@ -797,6 +797,7 @@ typedef struct PHY_VARS_gNB_s {
int prach_energy_counter; int prach_energy_counter;
int pucch0_thres; int pucch0_thres;
uint64_t bad_pucch;
/* /*
time_stats_t phy_proc; time_stats_t phy_proc;
*/ */
......
...@@ -683,7 +683,10 @@ void phy_procedures_gNB_uespec_RX(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx) ...@@ -683,7 +683,10 @@ void phy_procedures_gNB_uespec_RX(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx)
} }
} }
// figure out a better way to choose slot_rx, 19 is ok for a particular TDD configuration with 30kHz SCS // figure out a better way to choose slot_rx, 19 is ok for a particular TDD configuration with 30kHz SCS
if ((frame_rx&127) == 0 && slot_rx==19) dump_pusch_stats(gNB); if ((frame_rx&127) == 0 && slot_rx==19) {
dump_pusch_stats(gNB);
LOG_I(PHY, "Number of bad PUCCH received: %lu\n", gNB->bad_pucch);
}
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_gNB_UESPEC_RX,0); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_gNB_UESPEC_RX,0);
} }
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