Skip to content

Commit

Permalink
Rel-16: support for seme-static CFI
Browse files Browse the repository at this point in the history
  • Loading branch information
kuehnhammer committed Oct 3, 2023
1 parent fcd519d commit 212260f
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 6 deletions.
1 change: 1 addition & 0 deletions lib/include/srsran/phy/common/phy_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,7 @@ typedef struct SRSRAN_API {
bool mbms_dedicated;
uint8_t additional_non_mbms_frames;
uint8_t mbsfn_prb;
uint32_t semi_static_cfi;
} srsran_cell_t;

// Common downlink properties that may change every subframe
Expand Down
5 changes: 4 additions & 1 deletion lib/src/phy/phch/pbch.c
Original file line number Diff line number Diff line change
Expand Up @@ -336,9 +336,12 @@ void srsran_pbch_mib_mbms_unpack(uint8_t* msg, srsran_cell_t* cell, uint32_t* sf
*sfn = srsran_bit_pack(&msg, 6) << 4;
}

uint32_t non_mbsfn_sf = srsran_bit_pack(&msg, 2);
if (additional_non_mbsfn_subframes) {
*additional_non_mbsfn_subframes = *msg++;
*additional_non_mbsfn_subframes = non_mbsfn_sf;
}

cell->semi_static_cfi = srsran_bit_pack(&msg, 2);
}

/**
Expand Down
14 changes: 9 additions & 5 deletions lib/src/phy/ue/ue_dl.c
Original file line number Diff line number Diff line change
Expand Up @@ -351,10 +351,15 @@ static int estimate_pdcch_pcfich(srsran_ue_dl_t* q, srsran_dl_sf_cfg_t* sf, srsr
/* Get channel estimates for each port */
srsran_chest_dl_estimate_cfg(&q->chest, sf, &cfg->chest_cfg, q->sf_symbols, &q->chest_res);

/* First decode PCFICH and obtain CFI */
if (srsran_pcfich_decode(&q->pcfich, sf, &q->chest_res, q->sf_symbols, &cfi_corr) < 0) {
ERROR("Error decoding PCFICH");
return SRSRAN_ERROR;
if (!sf->cfi) {
/* First decode PCFICH and obtain CFI */
if (srsran_pcfich_decode(&q->pcfich, sf, &q->chest_res, q->sf_symbols, &cfi_corr) < 0) {
ERROR("Error decoding PCFICH");
return SRSRAN_ERROR;
}
INFO("Decoded CFI=%d with correlation %.2f, sf_idx=%d", sf->cfi, cfi_corr, sf->tti % 10);
} else {
INFO("Using semi-static CFI=%d, sf_idx=%d", sf->cfi, sf->tti % 10);
}

if (q->cell.frame_type == SRSRAN_TDD && ((sf->tti % 10) == 1 || (sf->tti % 10) == 6) && sf->cfi == 3) {
Expand All @@ -367,7 +372,6 @@ static int estimate_pdcch_pcfich(srsran_ue_dl_t* q, srsran_dl_sf_cfg_t* sf, srsr
return false;
}

INFO("Decoded CFI=%d with correlation %.2f, sf_idx=%d", sf->cfi, cfi_corr, sf->tti % 10);

return SRSRAN_SUCCESS;
} else {
Expand Down

0 comments on commit 212260f

Please sign in to comment.