|
|
|
@ -400,6 +400,7 @@ int decode_frame(srslte_pbch_t *q, uint32_t src, uint32_t dst, uint32_t n,
|
|
|
|
|
uint32_t nof_bits, uint32_t nof_ports) {
|
|
|
|
|
int j;
|
|
|
|
|
|
|
|
|
|
if (dst + n <= 4 && src + n <= 4) {
|
|
|
|
|
memcpy(&q->temp[dst * nof_bits], &q->llr[src * nof_bits],
|
|
|
|
|
n * nof_bits * sizeof(float));
|
|
|
|
|
|
|
|
|
@ -428,6 +429,11 @@ int decode_frame(srslte_pbch_t *q, uint32_t src, uint32_t dst, uint32_t n,
|
|
|
|
|
} else {
|
|
|
|
|
return SRSLTE_SUCCESS;
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
fprintf(stderr, "Error in PBCH decoder: Invalid frame pointers dst=%d, src=%d, n=%d\n", src, dst, n);
|
|
|
|
|
return -1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Decodes the PBCH channel
|
|
|
|
@ -526,6 +532,7 @@ int srslte_pbch_decode(srslte_pbch_t *q, cf_t *slot1_symbols, cf_t *ce_slot1[SRS
|
|
|
|
|
memcpy(bch_payload, q->data, sizeof(uint8_t) * SRSLTE_BCH_PAYLOAD_LEN);
|
|
|
|
|
}
|
|
|
|
|
INFO("Decoded PBCH: src=%d, dst=%d, nb=%d, sfn_offset=%d\n", src, dst, nb+1, (int) dst - src + q->frame_idx - 1);
|
|
|
|
|
srslte_pbch_decode_reset(q);
|
|
|
|
|
return 1;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|