Commit b6b2531d authored by Florian Kaltenberger's avatar Florian Kaltenberger

fix payload check in nr_pbchsim for >1 iterations

parent 70d241fb
...@@ -666,7 +666,7 @@ int nr_rx_pbch( PHY_VARS_NR_UE *ue, ...@@ -666,7 +666,7 @@ int nr_rx_pbch( PHY_VARS_NR_UE *ue,
if(decoderState == -1) if(decoderState == -1)
return(decoderState); return(decoderState);
printf("polar decoder output 0x%08x\n",nr_ue_pbch_vars->pbch_a_prime); //printf("polar decoder output 0x%08x\n",nr_ue_pbch_vars->pbch_a_prime);
//payload un-scrambling //payload un-scrambling
memset(&nr_ue_pbch_vars->pbch_a_interleaved, 0, sizeof(uint32_t) ); memset(&nr_ue_pbch_vars->pbch_a_interleaved, 0, sizeof(uint32_t) );
......
...@@ -574,7 +574,7 @@ int main(int argc, char **argv) ...@@ -574,7 +574,7 @@ int main(int argc, char **argv)
for (int i=0; i<8; i++) for (int i=0; i<8; i++)
gNB_xtra_byte |= ((gNB->pbch.pbch_a>>(31-i))&1)<<(7-i); gNB_xtra_byte |= ((gNB->pbch.pbch_a>>(31-i))&1)<<(7-i);
payload_ret += (UE->rx_ind.rx_indication_body->mib_pdu.additional_bits == gNB_xtra_byte); payload_ret = (UE->rx_ind.rx_indication_body->mib_pdu.additional_bits == gNB_xtra_byte);
for (i=0;i<3;i++){ for (i=0;i<3;i++){
payload_ret += (UE->rx_ind.rx_indication_body->mib_pdu.pdu[i] == gNB->pbch_pdu[2-i]); payload_ret += (UE->rx_ind.rx_indication_body->mib_pdu.pdu[i] == gNB->pbch_pdu[2-i]);
//printf("pdu byte %d gNB: 0x%02x UE: 0x%02x\n",i,gNB->pbch_pdu[i], UE->rx_ind.rx_indication_body->mib_pdu.pdu[i]); //printf("pdu byte %d gNB: 0x%02x UE: 0x%02x\n",i,gNB->pbch_pdu[i], UE->rx_ind.rx_indication_body->mib_pdu.pdu[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