Commit 56431152 authored by Raymond Knopp's avatar Raymond Knopp

applied patch for UE PUCCH TX from Albesmart. changed p-NR-FR1 to 0 (from 20)...

applied patch for UE PUCCH TX from Albesmart. changed p-NR-FR1 to 0 (from 20) to reduce SNR on UL. PUCCH is now functional after inserting physicalCellGroupConfig (before and after applying MasterCellGroupConfig)
parent a22a2b57
......@@ -247,7 +247,7 @@ void nr_decode_pucch0(PHY_VARS_gNB *gNB,
x_im[1] = table_5_2_2_2_2_Im[u[1]];
int16_t xr[2][24] __attribute__((aligned(32)));
int32_t xrtmag=0;
int64_t xrtmag=0;
uint8_t maxpos=0;
uint8_t index=0;
memset((void*)xr[0],0,24*sizeof(int16_t));
......@@ -272,10 +272,9 @@ void nr_decode_pucch0(PHY_VARS_gNB *gNB,
#endif
}
}
int32_t corr_re[2],corr_im[2],temp,no_corr=0;
int32_t av_corr=0;
int32_t corr_re[2],corr_im[2],no_corr=0;
int seq_index;
int64_t temp,av_corr=0;
for(i=0;i<nr_sequences;i++){
for (l=0;l<pucch_pdu->nr_of_symbols;l++) {
corr_re[l]=0;corr_im[l]=0;
......@@ -292,15 +291,15 @@ void nr_decode_pucch0(PHY_VARS_gNB *gNB,
}
}
#ifdef DEBUG_NR_PUCCH_RX
printf("PUCCH IDFT = (%d,%d)=>%f\n",corr_re[0],corr_im[0],10*log10(corr_re[0]*corr_re[0] + corr_im[0]*corr_im[0]));
if (l>1) printf("PUCCH 2nd symbol IDFT[%d/%d] = (%d,%d)=>%f\n",mcs[i],seq_index,corr_re[1],corr_im[1],10*log10(corr_re[1]*corr_re[1] + corr_im[1]*corr_im[1]));
#endif
//#ifdef DEBUG_NR_PUCCH_RX
LOG_I(PHY,"PUCCH IDFT = (%d,%d)=>%f\n",corr_re[0],corr_im[0],10*log10((double)corr_re[0]*corr_re[0] + (double)corr_im[0]*corr_im[0]));
if (l>1) LOG_I(PHY,"PUCCH 2nd symbol IDFT[%d/%d] = (%d,%d)=>%f\n",mcs[i],seq_index,corr_re[1],corr_im[1],10*log10((double)corr_re[1]*corr_re[1] + (double)corr_im[1]*corr_im[1]));
//#endif
if (pucch_pdu->freq_hop_flag == 0 && l==1) // non-coherent correlation
temp=corr_re[0]*corr_re[0] + corr_im[0]*corr_im[0];
temp=(int64_t)corr_re[0]*corr_re[0] + (int64_t)corr_im[0]*corr_im[0];
else if (pucch_pdu->freq_hop_flag == 0 && l==2) {
int32_t corr_re2 = corr_re[0]+corr_re[1];
int32_t corr_im2 = corr_im[0]+corr_im[1];
int64_t corr_re2 = (int64_t)corr_re[0]+corr_re[1];
int64_t corr_im2 = (int64_t)corr_im[0]+corr_im[1];
// coherent combining of 2 symbols and then complex modulus for single-frequency case
temp=corr_re2*corr_re2 + corr_im2*corr_im2;
}
......@@ -319,7 +318,7 @@ void nr_decode_pucch0(PHY_VARS_gNB *gNB,
no_corr=(av_corr-xrtmag)/(nr_sequences-1)/l;
av_corr/=nr_sequences/l;
uint8_t xrtmag_dB = dB_fixed(xrtmag);
uint8_t xrtmag_dB = dB_fixed64(xrtmag);
#ifdef DEBUG_NR_PUCCH_RX
printf("PUCCH 0 : maxpos %d\n",maxpos);
......
......@@ -112,9 +112,9 @@ void nr_generate_pucch0(PHY_VARS_NR_UE *ue,
}
for (int l=0; l<nrofSymbols; l++) {
alpha = nr_cyclic_shift_hopping(hoppingId,m0,mcs,l,startingSymbolIndex,nr_slot_tx);
#ifdef DEBUG_NR_PUCCH_TX
//#ifdef DEBUG_NR_PUCCH_TX
printf("\t [nr_generate_pucch0] sequence generation \tu=%d \tv=%d \talpha=%lf \t(for symbol l=%d)\n",u[l],v[l],alpha,l);
#endif
//#endif
for (int n=0; n<12; n++) {
x_n_re[l][n] = (int16_t)(((((int32_t)(round(32767*cos(alpha*n))) * table_5_2_2_2_2_Re[u[l]][n])>>15)
......
......@@ -466,7 +466,7 @@ bool pucch_procedures_ue_nr(PHY_VARS_NR_UE *ue, uint8_t gNB_id, UE_nr_rxtx_proc_
nb_symbols_total = get_nb_symbols_pucch(pucch_resource, format);
starting_symbol_index = get_starting_symb_idx(pucch_resource, format);
startingPRB = BWPstart + pucch_resource->startingPRB;
secondHopPRB = pucch_resource->intraSlotFrequencyHopping ? (BWPstart+pucch_resource->secondHopPRB) : startingPRB;
secondHopPRB = pucch_resource->intraSlotFrequencyHopping ? (BWPstart+*pucch_resource->secondHopPRB) : startingPRB;
if (format==pucch_format1_nr)
time_domain_occ = pucch_resource->format.choice.format1->timeDomainOCC;
if (format==pucch_format4_nr) {
......
......@@ -107,7 +107,8 @@ void handle_nr_uci(NR_UL_IND_t *UL_info)
UL_info->uci_ind.num_ucis = 0;
// mark corresponding PUCCH resources as free
// NOTE: we just assume it is BWP ID 1, to be revised for multiple BWPs
// NOTE: we just assume it is BWP ID 0 and 1, to be revised for multiple BWPs
RC.nrmac[mod_id]->pucch_index_used[0][slot] = 0;
RC.nrmac[mod_id]->pucch_index_used[1][slot] = 0;
}
......
......@@ -1151,7 +1151,7 @@ void fill_initial_cellGroupConfig(rnti_t rnti,
physicalCellGroupConfig = calloc(1,sizeof(*physicalCellGroupConfig));
physicalCellGroupConfig->p_NR_FR1 = calloc(1,sizeof(*physicalCellGroupConfig->p_NR_FR1));
*physicalCellGroupConfig->p_NR_FR1 = 20;
*physicalCellGroupConfig->p_NR_FR1 = 0;
physicalCellGroupConfig->pdsch_HARQ_ACK_Codebook = NR_PhysicalCellGroupConfig__pdsch_HARQ_ACK_Codebook_dynamic;
cellGroupConfig->physicalCellGroupConfig = physicalCellGroupConfig;
......
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