Commit a83dc45c authored by Francesco Mani's avatar Francesco Mani

changes in logging for CSI RS and cleaning some other logging

parent cea71b47
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
#include "PHY/NR_TRANSPORT/nr_transport_proto.h" #include "PHY/NR_TRANSPORT/nr_transport_proto.h"
#include "PHY/MODULATION/nr_modulation.h" #include "PHY/MODULATION/nr_modulation.h"
//#define NR_CSIRS_DEBUG #define NR_CSIRS_DEBUG
void nr_generate_csi_rs(PHY_VARS_gNB *gNB, void nr_generate_csi_rs(PHY_VARS_gNB *gNB,
......
...@@ -412,7 +412,7 @@ void nr_decode_pucch0(PHY_VARS_gNB *gNB, ...@@ -412,7 +412,7 @@ void nr_decode_pucch0(PHY_VARS_gNB *gNB,
uci_pdu->harq->harq_confidence_level = (no_conf) ? 1 : 0; uci_pdu->harq->harq_confidence_level = (no_conf) ? 1 : 0;
uci_pdu->harq->harq_list = (nfapi_nr_harq_t*)malloc(1); uci_pdu->harq->harq_list = (nfapi_nr_harq_t*)malloc(1);
uci_pdu->harq->harq_list[0].harq_value = index&0x01; uci_pdu->harq->harq_list[0].harq_value = index&0x01;
LOG_I(PHY, "Slot %d HARQ value %d with confidence level (0 is good, 1 is bad) %d\n", LOG_D(PHY, "Slot %d HARQ value %d with confidence level (0 is good, 1 is bad) %d\n",
slot,uci_pdu->harq->harq_list[0].harq_value,uci_pdu->harq->harq_confidence_level); slot,uci_pdu->harq->harq_list[0].harq_value,uci_pdu->harq->harq_confidence_level);
if (pucch_pdu->sr_flag == 1) { if (pucch_pdu->sr_flag == 1) {
uci_pdu->sr = calloc(1,sizeof(*uci_pdu->sr)); uci_pdu->sr = calloc(1,sizeof(*uci_pdu->sr));
...@@ -427,7 +427,7 @@ void nr_decode_pucch0(PHY_VARS_gNB *gNB, ...@@ -427,7 +427,7 @@ void nr_decode_pucch0(PHY_VARS_gNB *gNB,
uci_pdu->harq->harq_list = (nfapi_nr_harq_t*)malloc(2); uci_pdu->harq->harq_list = (nfapi_nr_harq_t*)malloc(2);
uci_pdu->harq->harq_list[1].harq_value = index&0x01; uci_pdu->harq->harq_list[1].harq_value = index&0x01;
uci_pdu->harq->harq_list[0].harq_value = (index>>1)&0x01; uci_pdu->harq->harq_list[0].harq_value = (index>>1)&0x01;
LOG_I(PHY, "Slot %d HARQ values %d and %d with confidence level (0 is good, 1 is bad) %d\n", LOG_D(PHY, "Slot %d HARQ values %d and %d with confidence level (0 is good, 1 is bad) %d\n",
slot,uci_pdu->harq->harq_list[1].harq_value,uci_pdu->harq->harq_list[0].harq_value,uci_pdu->harq->harq_confidence_level); slot,uci_pdu->harq->harq_list[1].harq_value,uci_pdu->harq->harq_list[0].harq_value,uci_pdu->harq->harq_confidence_level);
if (pucch_pdu->sr_flag == 1) { if (pucch_pdu->sr_flag == 1) {
uci_pdu->sr = calloc(1,sizeof(*uci_pdu->sr)); uci_pdu->sr = calloc(1,sizeof(*uci_pdu->sr));
...@@ -1464,7 +1464,7 @@ void nr_decode_pucch2(PHY_VARS_gNB *gNB, ...@@ -1464,7 +1464,7 @@ void nr_decode_pucch2(PHY_VARS_gNB *gNB,
} }
} // cw loop } // cw loop
corr_dB = dB_fixed64((uint64_t)corr); corr_dB = dB_fixed64((uint64_t)corr);
LOG_I(PHY,"cw_ML %d, metric %d dB\n",cw_ML,corr_dB); LOG_D(PHY,"cw_ML %d, metric %d dB\n",cw_ML,corr_dB);
decodedPayload[0]=(uint64_t)cw_ML; decodedPayload[0]=(uint64_t)cw_ML;
} }
else { // polar coded case else { // polar coded case
...@@ -1523,7 +1523,7 @@ void nr_decode_pucch2(PHY_VARS_gNB *gNB, ...@@ -1523,7 +1523,7 @@ void nr_decode_pucch2(PHY_VARS_gNB *gNB,
corr_re = ( corr32_re[half_prb>>2][aa]/(2*nc_group_size*4/2)+((int16_t*)(&prod_re[aa]))[0]); corr_re = ( corr32_re[half_prb>>2][aa]/(2*nc_group_size*4/2)+((int16_t*)(&prod_re[aa]))[0]);
corr_im = ( corr32_im[half_prb>>2][aa]/(2*nc_group_size*4/2)+((int16_t*)(&prod_im[aa]))[0]); corr_im = ( corr32_im[half_prb>>2][aa]/(2*nc_group_size*4/2)+((int16_t*)(&prod_im[aa]))[0]);
corr_tmp += corr_re*corr_re + corr_im*corr_im; corr_tmp += corr_re*corr_re + corr_im*corr_im;
/*
LOG_D(PHY,"pucch2 half_prb %d cw %d (%d,%d) aa %d: (%d,%d,%d,%d,%d,%d,%d,%d)x(%d,%d,%d,%d,%d,%d,%d,%d) (%d,%d)+(%d,%d) = (%d,%d) => %d\n", LOG_D(PHY,"pucch2 half_prb %d cw %d (%d,%d) aa %d: (%d,%d,%d,%d,%d,%d,%d,%d)x(%d,%d,%d,%d,%d,%d,%d,%d) (%d,%d)+(%d,%d) = (%d,%d) => %d\n",
half_prb,cw,cw&15,cw>>4,aa, half_prb,cw,cw&15,cw>>4,aa,
((int16_t*)&pucch2_polar_4bit[cw&15])[0],((int16_t*)&pucch2_polar_4bit[cw>>4])[0], ((int16_t*)&pucch2_polar_4bit[cw&15])[0],((int16_t*)&pucch2_polar_4bit[cw>>4])[0],
...@@ -1540,15 +1540,15 @@ void nr_decode_pucch2(PHY_VARS_gNB *gNB, ...@@ -1540,15 +1540,15 @@ void nr_decode_pucch2(PHY_VARS_gNB *gNB,
corr_re, corr_re,
corr_im, corr_im,
corr_tmp); corr_tmp);
*/
} }
corr16 = _mm_set1_epi16((int16_t)(corr_tmp>>8)); corr16 = _mm_set1_epi16((int16_t)(corr_tmp>>8));
/*
LOG_D(PHY,"half_prb %d cw %d corr16 %d\n",half_prb,cw,corr_tmp>>8); LOG_D(PHY,"half_prb %d cw %d corr16 %d\n",half_prb,cw,corr_tmp>>8);
*/
llr_num = _mm_max_epi16(_mm_mullo_epi16(corr16,pucch2_polar_llr_num_lut[cw]),llr_num); llr_num = _mm_max_epi16(_mm_mullo_epi16(corr16,pucch2_polar_llr_num_lut[cw]),llr_num);
llr_den = _mm_max_epi16(_mm_mullo_epi16(corr16,pucch2_polar_llr_den_lut[cw]),llr_den); llr_den = _mm_max_epi16(_mm_mullo_epi16(corr16,pucch2_polar_llr_den_lut[cw]),llr_den);
/*
LOG_D(PHY,"lut_num (%d,%d,%d,%d,%d,%d,%d,%d)\n", LOG_D(PHY,"lut_num (%d,%d,%d,%d,%d,%d,%d,%d)\n",
((int16_t*)&pucch2_polar_llr_num_lut[cw])[0], ((int16_t*)&pucch2_polar_llr_num_lut[cw])[0],
((int16_t*)&pucch2_polar_llr_num_lut[cw])[1], ((int16_t*)&pucch2_polar_llr_num_lut[cw])[1],
...@@ -1577,7 +1577,7 @@ void nr_decode_pucch2(PHY_VARS_gNB *gNB, ...@@ -1577,7 +1577,7 @@ void nr_decode_pucch2(PHY_VARS_gNB *gNB,
((int16_t*)&llr_den)[5], ((int16_t*)&llr_den)[5],
((int16_t*)&llr_den)[6], ((int16_t*)&llr_den)[6],
((int16_t*)&llr_den)[7]); ((int16_t*)&llr_den)[7]);
*/
} }
// compute llrs // compute llrs
llrs[half_prb] = _mm_subs_epi16(llr_num,llr_den); llrs[half_prb] = _mm_subs_epi16(llr_num,llr_den);
......
...@@ -124,6 +124,7 @@ void handle_nfapi_nr_csirs_pdu(PHY_VARS_gNB *gNB, ...@@ -124,6 +124,7 @@ void handle_nfapi_nr_csirs_pdu(PHY_VARS_gNB *gNB,
for (int id=0; id<NUMBER_OF_NR_CSIRS_MAX; id++) { for (int id=0; id<NUMBER_OF_NR_CSIRS_MAX; id++) {
NR_gNB_CSIRS_t *csirs = &gNB->csirs_pdu[id]; NR_gNB_CSIRS_t *csirs = &gNB->csirs_pdu[id];
if (csirs->active == 0) { if (csirs->active == 0) {
LOG_I(PHY,"Frame %d Slot %d CSI_RS with ID %d is now active\n",frame,slot,id);
csirs->frame = frame; csirs->frame = frame;
csirs->slot = slot; csirs->slot = slot;
csirs->active = 1; csirs->active = 1;
...@@ -206,7 +207,7 @@ void nr_schedule_response(NR_Sched_Rsp_t *Sched_INFO){ ...@@ -206,7 +207,7 @@ void nr_schedule_response(NR_Sched_Rsp_t *Sched_INFO){
break; break;
case NFAPI_NR_DL_TTI_CSI_RS_PDU_TYPE: case NFAPI_NR_DL_TTI_CSI_RS_PDU_TYPE:
LOG_D(PHY,"frame %d, slot %d, Got NFAPI_NR_DL_TTI_CSI_RS_PDU_TYPE for %d.%d\n",frame,slot,DL_req->SFN,DL_req->Slot); LOG_I(PHY,"frame %d, slot %d, Got NFAPI_NR_DL_TTI_CSI_RS_PDU_TYPE for %d.%d\n",frame,slot,DL_req->SFN,DL_req->Slot);
handle_nfapi_nr_csirs_pdu(gNB, handle_nfapi_nr_csirs_pdu(gNB,
frame, slot, frame, slot,
&dl_tti_pdu->csi_rs_pdu); &dl_tti_pdu->csi_rs_pdu);
......
...@@ -372,7 +372,7 @@ void nr_schedule_pucch(int Mod_idP, ...@@ -372,7 +372,7 @@ void nr_schedule_pucch(int Mod_idP,
memset(pucch_pdu,0,sizeof(nfapi_nr_pucch_pdu_t)); memset(pucch_pdu,0,sizeof(nfapi_nr_pucch_pdu_t));
UL_tti_req->n_pdus+=1; UL_tti_req->n_pdus+=1;
LOG_I(MAC,"Scheduling pucch reception for frame %d slot %d with (%d, %d, %d) (SR ACK, CSI) bits\n", LOG_D(MAC,"Scheduling pucch reception for frame %d slot %d with (%d, %d, %d) (SR ACK, CSI) bits\n",
frameP,slotP,O_sr,O_ack,curr_pucch->csi_bits); frameP,slotP,O_sr,O_ack,curr_pucch->csi_bits);
nr_configure_pucch(pucch_pdu, nr_configure_pucch(pucch_pdu,
......
...@@ -1907,6 +1907,8 @@ void nr_csirs_scheduling(int Mod_idP, ...@@ -1907,6 +1907,8 @@ void nr_csirs_scheduling(int Mod_idP,
if((frame*n_slots_frame+slot-offset)%period == 0) { if((frame*n_slots_frame+slot-offset)%period == 0) {
LOG_I(MAC,"Scheduling CSI-RS in frame %d slot %d\n",frame,slot);
nfapi_nr_dl_tti_request_pdu_t *dl_tti_csirs_pdu = &dl_req->dl_tti_pdu_list[dl_req->nPDUs]; nfapi_nr_dl_tti_request_pdu_t *dl_tti_csirs_pdu = &dl_req->dl_tti_pdu_list[dl_req->nPDUs];
memset((void*)dl_tti_csirs_pdu,0,sizeof(nfapi_nr_dl_tti_request_pdu_t)); memset((void*)dl_tti_csirs_pdu,0,sizeof(nfapi_nr_dl_tti_request_pdu_t));
dl_tti_csirs_pdu->PDUType = NFAPI_NR_DL_TTI_CSI_RS_PDU_TYPE; dl_tti_csirs_pdu->PDUType = NFAPI_NR_DL_TTI_CSI_RS_PDU_TYPE;
...@@ -2217,7 +2219,7 @@ void compute_csi_bitlen (NR_CellGroupConfig_t *secondaryCellGroup, NR_UE_info_t ...@@ -2217,7 +2219,7 @@ void compute_csi_bitlen (NR_CellGroupConfig_t *secondaryCellGroup, NR_UE_info_t
UE_info->csi_report_template[UE_id][csi_report_id].CSI_report_bitlen[0].diff_rsrp_bitlen =0; UE_info->csi_report_template[UE_id][csi_report_id].CSI_report_bitlen[0].diff_rsrp_bitlen =0;
} }
LOG_I (MAC, "UCI: CSI_bit len : ssbri %d, rsrp: %d, diff_rsrp: %d", LOG_D (MAC, "UCI: CSI_bit len : ssbri %d, rsrp: %d, diff_rsrp: %d\n",
UE_info->csi_report_template[UE_id][csi_report_id].CSI_report_bitlen[0].cri_ssbri_bitlen, UE_info->csi_report_template[UE_id][csi_report_id].CSI_report_bitlen[0].cri_ssbri_bitlen,
UE_info->csi_report_template[UE_id][csi_report_id].CSI_report_bitlen[0].rsrp_bitlen, UE_info->csi_report_template[UE_id][csi_report_id].CSI_report_bitlen[0].rsrp_bitlen,
UE_info->csi_report_template[UE_id][csi_report_id].CSI_report_bitlen[0].diff_rsrp_bitlen); UE_info->csi_report_template[UE_id][csi_report_id].CSI_report_bitlen[0].diff_rsrp_bitlen);
......
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