diff --git a/openair1/PHY/INIT/nr_parms.c b/openair1/PHY/INIT/nr_parms.c index 1fcaaed494..8512beb0d5 100644 --- a/openair1/PHY/INIT/nr_parms.c +++ b/openair1/PHY/INIT/nr_parms.c @@ -165,18 +165,6 @@ int nr_init_frame_parms_ue(nfapi_config_request_t* config, LOG_I(PHY,"Initializing frame parms for mu %d, N_RB %d, Ncp %d\n",mu, N_RB, Ncp); #endif - frame_parms->frame_type = FDD; - frame_parms->tdd_config = 3; - //frame_parms[CC_id]->tdd_config_S = 0; - frame_parms->N_RB_DL = 100; - frame_parms->N_RB_UL = 100; - frame_parms->Ncp = NORMAL; - //frame_parms[CC_id]->Ncp_UL = NORMAL; - frame_parms->Nid_cell = 0; - //frame_parms[CC_id]->num_MBSFN_config = 0; - frame_parms->nb_antenna_ports_eNB = 1; - frame_parms->nb_antennas_tx = 1; - frame_parms->nb_antennas_rx = 1; if (Ncp == EXTENDED) AssertFatal(mu == NR_MU_2,"Invalid cyclic prefix %d for numerology index %d\n", Ncp, mu); diff --git a/openair1/PHY/NR_UE_TRANSPORT/nr_initial_sync.c b/openair1/PHY/NR_UE_TRANSPORT/nr_initial_sync.c index 4af870fb5f..793ded988f 100644 --- a/openair1/PHY/NR_UE_TRANSPORT/nr_initial_sync.c +++ b/openair1/PHY/NR_UE_TRANSPORT/nr_initial_sync.c @@ -52,7 +52,7 @@ void set_default_frame_parms_single(nfapi_config_request_t *config, NR_DL_FRAME_ //#define DEBUG_INITIAL_SYNCH -int pbch_detection(PHY_VARS_NR_UE *ue, runmode_t mode) +int nr_pbch_detection(PHY_VARS_NR_UE *ue, runmode_t mode) { uint8_t l,pbch_decoded,frame_mod4,pbch_tx_ant,dummy; @@ -262,12 +262,12 @@ int nr_initial_sync(PHY_VARS_NR_UE *ue, runmode_t mode) rx_sss_nr(ue,&metric_fdd_ncp,&phase_fdd_ncp); - set_default_frame_parms_single(config,&ue->frame_parms); + //set_default_frame_parms_single(config,&ue->frame_parms); nr_init_frame_parms_ue(config,&ue->frame_parms); nr_gold_pbch(ue); - ret = pbch_detection(ue,mode); - ret = -1; + ret = nr_pbch_detection(ue,mode); + ret = -1; //to be deleted // write_output("rxdata2.m","rxd2",ue->common_vars.rxdata[0],10*frame_parms->samples_per_tti,1,1); #ifdef DEBUG_INITIAL_SYNCH diff --git a/openair1/PHY/NR_UE_TRANSPORT/nr_pbch.c b/openair1/PHY/NR_UE_TRANSPORT/nr_pbch.c index c7e32e0a5e..6c942795e3 100644 --- a/openair1/PHY/NR_UE_TRANSPORT/nr_pbch.c +++ b/openair1/PHY/NR_UE_TRANSPORT/nr_pbch.c @@ -470,8 +470,8 @@ void nr_pbch_quantize(int8_t *pbch_llr8, } } -unsigned short sign(short x) { - return (unsigned short)x >> 15; +unsigned char sign(int8_t x) { + return (unsigned char)x >> 7; } uint16_t nr_rx_pbch( PHY_VARS_NR_UE *ue, @@ -612,7 +612,7 @@ uint16_t nr_rx_pbch( PHY_VARS_NR_UE *ue, decoderState = polar_decoder(demod_pbch_e, pbch_a, &frame_parms->pbch_polar_params, decoderListSize, aPrioriArray, pathMetricAppr); for (i=0; i<32 /*(NR_POLAR_PBCH_PAYLOAD_BITS>>3)*/; i++) - printf("pbch_a[%d] = %d \n", i,pbch_a[i]); + printf("pbch_a[%d] = %u \n", i,pbch_a[i]); //un-scrambling nr_pbch_unscrambling(frame_parms,pbch_a,NR_POLAR_PBCH_PAYLOAD_BITS); diff --git a/openair1/PHY/defs_nr_UE.h b/openair1/PHY/defs_nr_UE.h index 0c13919bd0..3df36fdc66 100644 --- a/openair1/PHY/defs_nr_UE.h +++ b/openair1/PHY/defs_nr_UE.h @@ -642,7 +642,7 @@ typedef struct { int32_t **dl_ch_estimates_ext; /// \brief Pointer to PBCH llrs. /// - first index: ? [0..1919] (hard coded) - int16_t *llr; + int8_t *llr; /// \brief Pointer to PBCH decoded output. /// - first index: ? [0..63] (hard coded) uint8_t *decoded_output;