From 9e7186c2cb9b76549fae48ccdaec1b442a8d0555 Mon Sep 17 00:00:00 2001 From: Sakthivel Velumani Date: Thu, 7 Nov 2019 17:00:30 +0100 Subject: [PATCH] updated dlsim --- .../PHY/NR_UE_ESTIMATION/nr_dl_channel_estimation.c | 1 - openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_decoding.c | 4 ++-- openair1/SIMULATION/NR_PHY/dlsim.c | 12 ++---------- 3 files changed, 4 insertions(+), 13 deletions(-) diff --git a/openair1/PHY/NR_UE_ESTIMATION/nr_dl_channel_estimation.c b/openair1/PHY/NR_UE_ESTIMATION/nr_dl_channel_estimation.c index ade2d1adec..cb5b51bc20 100644 --- a/openair1/PHY/NR_UE_ESTIMATION/nr_dl_channel_estimation.c +++ b/openair1/PHY/NR_UE_ESTIMATION/nr_dl_channel_estimation.c @@ -890,7 +890,6 @@ int nr_pdsch_channel_estimation(PHY_VARS_NR_UE *ue, dl_ch = (int16_t *)&dl_ch_estimates[aarx][ch_offset]; uint16_t idxDC = 2*(ue->frame_parms.ofdm_symbol_size - bwp_start_subcarrier); uint16_t idxPil = idxDC/2; - printf("idxDC %d idxPil %d\n",idxDC,idxPil); re_offset = k; pil = (int16_t *)&pilot[rb_offset*((config_type==0) ? 6:4)]; pil += (idxPil-4); diff --git a/openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_decoding.c b/openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_decoding.c index ce01ecbab6..53d481919e 100644 --- a/openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_decoding.c +++ b/openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_decoding.c @@ -564,13 +564,13 @@ uint32_t nr_dlsch_decoding(PHY_VARS_NR_UE *phy_vars_ue, // Fixme: correct type is unsigned, but nrLDPC_decoder and all called behind use signed int if (check_crc((uint8_t*)llrProcBuf,length_dec,harq_process->F,crc_type)) { - printf("\x1B[34m" "Segment %d CRC OK\n",r); + printf("\x1B[34m" "Segment %d CRC OK\n\033[0m",r); //Temporary hack no_iteration_ldpc = dlsch->max_ldpc_iterations; ret = no_iteration_ldpc; } else { - printf("\x1B[33m" "CRC NOK\n"); + printf("\x1B[33m" "CRC NOK\n\033[0m"); ret = 1 + dlsch->max_ldpc_iterations; } diff --git a/openair1/SIMULATION/NR_PHY/dlsim.c b/openair1/SIMULATION/NR_PHY/dlsim.c index e3e8eef767..e1628fe3e7 100644 --- a/openair1/SIMULATION/NR_PHY/dlsim.c +++ b/openair1/SIMULATION/NR_PHY/dlsim.c @@ -879,25 +879,17 @@ int main(int argc, char **argv) printf("*****************************************\n"); printf("SNR %f, (false positive %f)\n", SNR, - (float) n_false_positive / (float) n_trials); + (float) n_errors / (float) n_trials); printf("*****************************************\n"); printf("\n"); - if (errors_bit == 0) { - printf("PDSCH test OK\n"); - printf("\n"); - } - printf("SNR %f : n_errors (negative CRC) = %d/%d\n", SNR, n_errors, n_trials); printf("\n"); if ((float)n_errors/(float)n_trials <= target_error_rate) { - printf("PDCCH test OK\n"); + printf("PDSCH test OK\n"); break; } - - if (n_trials == 1) - break; } // NSR