From 7b9b8348e140ea782a4429aa055ff694af0e5af8 Mon Sep 17 00:00:00 2001 From: hongzhi wang Date: Tue, 28 Aug 2018 11:47:57 +0200 Subject: [PATCH] ue pbch debug MIB --- openair1/PHY/INIT/nr_init_ue.c | 3 ++- openair1/PHY/NR_UE_TRANSPORT/nr_pbch.c | 12 +++++++++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/openair1/PHY/INIT/nr_init_ue.c b/openair1/PHY/INIT/nr_init_ue.c index cb560dc322..d102b1f8f9 100644 --- a/openair1/PHY/INIT/nr_init_ue.c +++ b/openair1/PHY/INIT/nr_init_ue.c @@ -962,10 +962,11 @@ void phy_init_nr_top(PHY_VARS_NR_UE *ue) // Polar encoder init for PBCH //nr_polar_init(&frame_parms->pbch_polar_params, 1); + /*t_nrPolar_paramsPtr nrPolar_params = NULL, currentPtr = NULL; nr_polar_init(&ue->nrPolar_params, NR_POLAR_PBCH_MESSAGE_TYPE, NR_POLAR_PBCH_PAYLOAD_BITS, - NR_POLAR_PBCH_AGGREGATION_LEVEL); + NR_POLAR_PBCH_AGGREGATION_LEVEL);*/ //lte_sync_time_init(frame_parms); diff --git a/openair1/PHY/NR_UE_TRANSPORT/nr_pbch.c b/openair1/PHY/NR_UE_TRANSPORT/nr_pbch.c index 59646eda41..8c9166b1b3 100644 --- a/openair1/PHY/NR_UE_TRANSPORT/nr_pbch.c +++ b/openair1/PHY/NR_UE_TRANSPORT/nr_pbch.c @@ -653,7 +653,12 @@ int nr_rx_pbch( PHY_VARS_NR_UE *ue, //#endif //polar decoding de-rate matching - t_nrPolar_paramsPtr currentPtr = nr_polar_params(&ue->nrPolar_params, NR_POLAR_PBCH_MESSAGE_TYPE, NR_POLAR_PBCH_PAYLOAD_BITS, NR_POLAR_PBCH_AGGREGATION_LEVEL); + t_nrPolar_paramsPtr nrPolar_params = NULL, currentPtr = NULL; + nr_polar_init(&nrPolar_params, + NR_POLAR_PBCH_MESSAGE_TYPE, + NR_POLAR_PBCH_PAYLOAD_BITS, + NR_POLAR_PBCH_AGGREGATION_LEVEL); + currentPtr = nr_polar_params(nrPolar_params, NR_POLAR_PBCH_MESSAGE_TYPE, NR_POLAR_PBCH_PAYLOAD_BITS, NR_POLAR_PBCH_AGGREGATION_LEVEL); decoderState = polar_decoder(demod_pbch_e, pbch_a_b, currentPtr, decoderListSize, pathMetricAppr); printf("polar decoder state %d\n", decoderState); if(decoderState == -1) @@ -696,6 +701,11 @@ int nr_rx_pbch( PHY_VARS_NR_UE *ue, // Fix byte endian for (i=0; i<(NR_POLAR_PBCH_PAYLOAD_BITS>>3); i++) decoded_output[(NR_POLAR_PBCH_PAYLOAD_BITS>>3)-i-1] = pbch_a[i]; + + decoded_output[0] = 0x0a; + decoded_output[1] = 0x63; + decoded_output[2] = 0x00; + decoded_output[3] = 0x06; //#ifdef DEBUG_PBCH for (i=0; i<(NR_POLAR_PBCH_PAYLOAD_BITS>>3); i++){ -- GitLab