@@ -154,7 +154,7 @@ int init_freq_channel_prach(channel_desc_t *desc,uint16_t nb_rb,int16_t n_sample
return(-1);
}
if(nb_rb-prach_prb_offset<6){
fprintf(stderr,"freq_channel_init: Impossible to allocate PRACH, modify prach_prb_offset value\n");
fprintf(stderr,"freq_channel_init: Impossible to allocate PRACH, check prach_prb_offset value (r_ra_prb=%d)\n",prach_prb_offset);
return(-1);
}
prach_samples=(prach_fmt<4)?13+839+12:3+139+2;
...
...
@@ -165,10 +165,10 @@ int init_freq_channel_prach(channel_desc_t *desc,uint16_t nb_rb,int16_t n_sample
delta_f=(prach_fmt<4)?nb_rb*180000/((n_samples-1)*12):nb_rb*180000/((n_samples-1)*2);//1.25 khz for preamble format 1,2,3. 7.5 khz for preample format 4
max_nb_rb_samples=nb_rb*180000/delta_f;//7200 if prach_fmt<4
prach_pbr_offset_samples=(prach_prb_offset+6)*180000/delta_f;//864 if prach_prb_offset=0,7200 if prach_prb_offset=44=50-6
for(intidx=0;idx<10;idx++)printf("dumping UL raw subframe %d: txdataF[%d] = (%d,%d)\n",subframe,idx,((short*)&txdataF[0][sf_offset+idx])[0],((short*)&txdataF[0][sf_offset+idx])[1]);
1e3/UE2eNB[0][eNB_id][CC_id]->sampling_rate,// sampling time (ns)
(double)PHY_vars_eNB_g[eNB_id][CC_id]->rx_total_gain_dB-66.227);// rx_gain (dB) (66.227 = 20*log10(pow2(11)) = gain from the adc that will be applied later)
for(intidx=0;idx<10;idx++)printf("dumping UL raw rx subframe (input) %d: rxdataF[%d] = (%f,%f)\n",subframe,idx,r_re_p_f[0][idx],r_im_p_f[0][idx]);
for(intidx=0;idx<10;idx++)printf("dumping UL raw rx subframe %d: rxdataF[%d] = (%d,%d)=====>%s\n",subframe,idx,((short*)&rxdataF[0][sf_offset+idx])[0],((short*)&rxdataF[0][sf_offset+idx])[1],(((((r_re_p_f[0][idx]<0)&&(((short*)&rxdataF[0][sf_offset+idx])[0]<0))||((r_re_p_f[0][idx]>=0)&&(((short*)&rxdataF[0][sf_offset+idx])[0]>=0))))&&(((r_im_p_f[0][idx]<0)&&(((short*)&rxdataF[0][sf_offset+idx])[1]<0))||((r_im_p_f[0][idx]>=0)&&(((short*)&rxdataF[0][sf_offset+idx])[1]>=0))))?"OK":"ERROR");