|
|
@ -60,19 +60,19 @@ static void update_threshold(ue_sync_t *q) {
|
|
|
|
if (symbol_sz > 0) {
|
|
|
|
if (symbol_sz > 0) {
|
|
|
|
switch (symbol_sz) {
|
|
|
|
switch (symbol_sz) {
|
|
|
|
case 128:
|
|
|
|
case 128:
|
|
|
|
sync_set_threshold(&q->s, 20000, 2000);
|
|
|
|
sync_set_threshold(&q->s, 10000, 1000);
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case 256:
|
|
|
|
case 256:
|
|
|
|
sync_set_threshold(&q->s, 25000, 2500);
|
|
|
|
sync_set_threshold(&q->s, 20000, 2000);
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case 512:
|
|
|
|
case 512:
|
|
|
|
sync_set_threshold(&q->s, 38000, 3800);
|
|
|
|
sync_set_threshold(&q->s, 30000, 3000);
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case 1024:
|
|
|
|
case 1024:
|
|
|
|
sync_set_threshold(&q->s, 50000, 5000);
|
|
|
|
sync_set_threshold(&q->s, 40000, 4000);
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case 2048:
|
|
|
|
case 2048:
|
|
|
|
sync_set_threshold(&q->s, 80000, 4000);
|
|
|
|
sync_set_threshold(&q->s, 50000, 5000);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -318,14 +318,17 @@ static int mib_decoder_run(ue_sync_t *q) {
|
|
|
|
if (pbch_decode(&q->pbch, q->sf_symbols, q->ce, &q->mib) == 1) {
|
|
|
|
if (pbch_decode(&q->pbch, q->sf_symbols, q->ce, &q->mib) == 1) {
|
|
|
|
q->frame_number = q->mib.sfn;
|
|
|
|
q->frame_number = q->mib.sfn;
|
|
|
|
q->cell.nof_ports = q->mib.nof_ports;
|
|
|
|
q->cell.nof_ports = q->mib.nof_ports;
|
|
|
|
q->cell.nof_prb = q->mib.nof_prb;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!q->pbch_decoded) {
|
|
|
|
if (!q->pbch_decoded) {
|
|
|
|
printf("\n\nMIB decoded:\n");
|
|
|
|
printf("\n\nMIB decoded:\n");
|
|
|
|
pbch_mib_fprint(stdout, &q->mib, q->cell.id);
|
|
|
|
pbch_mib_fprint(stdout, &q->mib, q->cell.id);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (q->cell.nof_prb != q->mib.nof_prb) {
|
|
|
|
|
|
|
|
q->cell.nof_prb = q->mib.nof_prb;
|
|
|
|
if (q->change_srate) {
|
|
|
|
if (q->change_srate) {
|
|
|
|
ret = update_srate(q);
|
|
|
|
ret = update_srate(q);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
INFO("MIB decoded #%d SFN: %d\n", q->pbch_decoded, q->mib.sfn);
|
|
|
|
INFO("MIB decoded #%d SFN: %d\n", q->pbch_decoded, q->mib.sfn);
|
|
|
|
}
|
|
|
|
}
|
|
|
|