remove permanent prach rxsigF in gNB and simplify the data structure
This commit is contained in:
committed by
Robert Schmidt
parent
4dd340b6bb
commit
cffb07d798
@@ -567,7 +567,7 @@ int main(int argc, char **argv){
|
||||
|
||||
phy_init_nr_gNB(gNB);
|
||||
nr_phy_init_RU(ru);
|
||||
nfapi_nr_prach_pdu_t *prach_pdu = &gNB->prach_vars.list.list[0].pdu;
|
||||
nfapi_nr_prach_pdu_t *prach_pdu = &gNB->prach_list.list[0].pdu;
|
||||
prach_pdu->num_cs = get_NCS(NCS_config, format0, restrictedSetConfig);
|
||||
prach_config->num_prach_fd_occasions_list[fd_occasion].num_root_sequences.value = 1+(64/(N_ZC/prach_pdu->num_cs));
|
||||
prach_pdu->prach_format = prach_format;
|
||||
@@ -769,25 +769,27 @@ int main(int argc, char **argv){
|
||||
nr_slot_fep_ul(frame_parms, ru->common.rxdata[aa], ru->common.rxdataF[aa], l, slot, ru->N_TA_offset);
|
||||
}
|
||||
}
|
||||
rx_nr_prach_ru(ru, prach_format, numRA, 0, prachStartSymbol, slot, prachOccasion, frame, slot);
|
||||
c16_t *rxsigF[ru->nb_rx];
|
||||
for (int i = 0; i < ru->nb_rx; ++i)
|
||||
rxsigF[i] = (c16_t *)ru->prach_rxsigF[prachOccasion][i];
|
||||
if (n_frames == 1)
|
||||
printf("ncs %d,num_seq %d\n",
|
||||
prach_pdu->num_cs,
|
||||
prach_config->num_prach_fd_occasions_list[fd_occasion].num_root_sequences.value);
|
||||
rx_nr_prach(gNB, prach_pdu, prachOccasion, frame, subframe, &preamble_rx, &preamble_energy, &preamble_delay, rxsigF);
|
||||
|
||||
rx_nr_prach_ru(ru, prach_format, numRA, 0, prachStartSymbol, slot, prachOccasion, frame, slot);
|
||||
// printf(" preamble_energy %d preamble_rx %d preamble_tx %d \n", preamble_energy, preamble_rx, preamble_tx);
|
||||
|
||||
for (int i = 0; i < ru->nb_rx; ++i)
|
||||
gNB->prach_vars.rxsigF[i] = ru->prach_rxsigF[prachOccasion][i];
|
||||
if (n_frames == 1) printf("ncs %d,num_seq %d\n",prach_pdu->num_cs, prach_config->num_prach_fd_occasions_list[fd_occasion].num_root_sequences.value);
|
||||
rx_nr_prach(gNB, prach_pdu, prachOccasion, frame, subframe, &preamble_rx, &preamble_energy, &preamble_delay);
|
||||
if (preamble_rx != preamble_tx)
|
||||
prach_errors++;
|
||||
else
|
||||
delay_avg += (double)preamble_delay;
|
||||
|
||||
// printf(" preamble_energy %d preamble_rx %d preamble_tx %d \n", preamble_energy, preamble_rx, preamble_tx);
|
||||
N_ZC = (prach_sequence_length) ? 139 : 839;
|
||||
|
||||
if (preamble_rx != preamble_tx)
|
||||
prach_errors++;
|
||||
else
|
||||
delay_avg += (double)preamble_delay;
|
||||
|
||||
N_ZC = (prach_sequence_length) ? 139 : 839;
|
||||
|
||||
if (n_frames==1) {
|
||||
printf("preamble %d (tx %d) : energy %d, delay %d\n",preamble_rx,preamble_tx,preamble_energy,preamble_delay);
|
||||
if (n_frames == 1) {
|
||||
printf("preamble %d (tx %d) : energy %d, delay %d\n", preamble_rx, preamble_tx, preamble_energy, preamble_delay);
|
||||
#ifdef NR_PRACH_DEBUG
|
||||
LOG_M("prach0.m","prach0", &txdata[0][prach_start], frame_parms->samples_per_subframe, 1, 1);
|
||||
LOG_M("rxsig0.m","rxs0", &ru->common.rxdata[0][subframe*frame_parms->samples_per_subframe], frame_parms->samples_per_subframe, 1, 1);
|
||||
@@ -797,7 +799,7 @@ int main(int argc, char **argv){
|
||||
LOG_M("prach_preamble.m","prachp", &gNB->X_u[0], N_ZC, 1, 1);
|
||||
LOG_M("ue_prach_preamble.m","prachp", &UE->X_u[0], N_ZC, 1, 1);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
printf("SNR %f dB, UE Speed %f km/h: errors %u/%d (delay %f)\n", SNR, ue_speed, prach_errors, n_frames, delay_avg/(double)(n_frames-prach_errors));
|
||||
|
||||
Reference in New Issue
Block a user