Commit 7af4b83e authored by Robert Schmidt's avatar Robert Schmidt

Revert precoding stuff, correct timing log

precoding_stats timing is not part of ru->feptx_ofdm, but
ru->feptx_prec, so always print it.
parent b1f6be0c
...@@ -363,8 +363,11 @@ static size_t dump_L1_meas_stats(PHY_VARS_gNB *gNB, RU_t *ru, char *output, size ...@@ -363,8 +363,11 @@ static size_t dump_L1_meas_stats(PHY_VARS_gNB *gNB, RU_t *ru, char *output, size
if (ru->feprx) if (ru->feprx)
output += print_meas_log(&ru->ofdm_demod_stats, "feprx", NULL, NULL, output, end - output); output += print_meas_log(&ru->ofdm_demod_stats, "feprx", NULL, NULL, output, end - output);
if (ru->feptx_ofdm) { if (ru->feptx_prec) {
output += print_meas_log(&ru->precoding_stats,"feptx_prec",NULL,NULL, output, end - output); output += print_meas_log(&ru->precoding_stats,"feptx_prec",NULL,NULL, output, end - output);
}
if (ru->feptx_ofdm) {
output += print_meas_log(&ru->txdataF_copy_stats,"txdataF_copy",NULL,NULL, output, end - output); output += print_meas_log(&ru->txdataF_copy_stats,"txdataF_copy",NULL,NULL, output, end - output);
output += print_meas_log(&ru->ofdm_mod_stats,"feptx_ofdm",NULL,NULL, output, end - output); output += print_meas_log(&ru->ofdm_mod_stats,"feptx_ofdm",NULL,NULL, output, end - output);
output += print_meas_log(&ru->ofdm_total_stats,"feptx_total",NULL,NULL, output, end - output); output += print_meas_log(&ru->ofdm_total_stats,"feptx_total",NULL,NULL, output, end - output);
......
...@@ -192,14 +192,8 @@ void nr_phy_free_RU(RU_t *ru) ...@@ -192,14 +192,8 @@ void nr_phy_free_RU(RU_t *ru)
free_and_zero(ru->common.txdataF); free_and_zero(ru->common.txdataF);
// free IFFT input buffers (TX) // free IFFT input buffers (TX)
// nr_feptx_prec(): if no precoding, it just copies pointers instead of memory for (i = 0; i < ru->nb_tx; i++) free_and_zero(ru->common.txdataF_BF[i]);
// note that we still allocate that memory in nr_phy_init_RU(), otherwise free_and_zero(ru->common.txdataF_BF);
// we cannot execute in the first iteration because XYZ
bool no_precoding = ru->do_precoding == 0 || (ru->nb_tx == 1 && ru->nb_log_antennas == 1);
if (!no_precoding) {
for (i = 0; i < ru->nb_tx; i++) free_and_zero(ru->common.txdataF_BF[i]);
free_and_zero(ru->common.txdataF_BF);
}
// free FFT output buffers (RX) // free FFT output buffers (RX)
for (i = 0; i < ru->nb_rx; i++) free_and_zero(ru->common.rxdataF[i]); for (i = 0; i < ru->nb_rx; i++) free_and_zero(ru->common.rxdataF[i]);
......
...@@ -188,9 +188,13 @@ void nr_feptx_prec(RU_t *ru,int frame_tx,int tti_tx) { ...@@ -188,9 +188,13 @@ void nr_feptx_prec(RU_t *ru,int frame_tx,int tti_tx) {
if (nr_slot_select(cfg,frame_tx,slot_tx) == NR_UPLINK_SLOT) return; if (nr_slot_select(cfg,frame_tx,slot_tx) == NR_UPLINK_SLOT) return;
if (ru->do_precoding == 0 || (ru->nb_tx == 1 && ru->nb_log_antennas == 1)) { if (!ru->do_precoding || (ru->nb_tx == 1 && ru->nb_log_antennas == 1)) {
for (i = 0; i < ru->nb_log_antennas; ++i) for (i = 0; i < ru->nb_log_antennas; ++i) {
ru->common.txdataF_BF[i] = (int32_t *)&gNB->common_vars.txdataF[i][txdataF_offset]; //ru->common.txdataF_BF[i] = (int32_t *)&gNB->common_vars.txdataF[i][txdataF_offset];
memcpy(ru->common.txdataF_BF[i],
&gNB->common_vars.txdataF[i][txdataF_offset],
fp->samples_per_slot_wCP*sizeof(int32_t));
}
} }
else { else {
for(i=0; i<ru->nb_log_antennas; ++i) { for(i=0; i<ru->nb_log_antennas; ++i) {
......
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