Commit 7b9b8348 authored by hongzhi wang's avatar hongzhi wang

ue pbch debug MIB

parent 05973357
...@@ -962,10 +962,11 @@ void phy_init_nr_top(PHY_VARS_NR_UE *ue) ...@@ -962,10 +962,11 @@ void phy_init_nr_top(PHY_VARS_NR_UE *ue)
// Polar encoder init for PBCH // Polar encoder init for PBCH
//nr_polar_init(&frame_parms->pbch_polar_params, 1); //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_init(&ue->nrPolar_params,
NR_POLAR_PBCH_MESSAGE_TYPE, NR_POLAR_PBCH_MESSAGE_TYPE,
NR_POLAR_PBCH_PAYLOAD_BITS, NR_POLAR_PBCH_PAYLOAD_BITS,
NR_POLAR_PBCH_AGGREGATION_LEVEL); NR_POLAR_PBCH_AGGREGATION_LEVEL);*/
//lte_sync_time_init(frame_parms); //lte_sync_time_init(frame_parms);
......
...@@ -653,7 +653,12 @@ int nr_rx_pbch( PHY_VARS_NR_UE *ue, ...@@ -653,7 +653,12 @@ int nr_rx_pbch( PHY_VARS_NR_UE *ue,
//#endif //#endif
//polar decoding de-rate matching //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); decoderState = polar_decoder(demod_pbch_e, pbch_a_b, currentPtr, decoderListSize, pathMetricAppr);
printf("polar decoder state %d\n", decoderState); printf("polar decoder state %d\n", decoderState);
if(decoderState == -1) if(decoderState == -1)
...@@ -697,6 +702,11 @@ int nr_rx_pbch( PHY_VARS_NR_UE *ue, ...@@ -697,6 +702,11 @@ int nr_rx_pbch( PHY_VARS_NR_UE *ue,
for (i=0; i<(NR_POLAR_PBCH_PAYLOAD_BITS>>3); i++) 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[(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 //#ifdef DEBUG_PBCH
for (i=0; i<(NR_POLAR_PBCH_PAYLOAD_BITS>>3); i++){ for (i=0; i<(NR_POLAR_PBCH_PAYLOAD_BITS>>3); i++){
//printf("unscrambling pbch_a[%d] = %x \n", i,pbch_a[i]); //printf("unscrambling pbch_a[%d] = %x \n", i,pbch_a[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