mirror of https://github.com/PentHertz/srsLTE.git
dft_precoding: add helper to get largest valid PRB
This commit is contained in:
parent
04051a5cd0
commit
a82b2da2dd
|
@ -53,6 +53,8 @@ SRSLTE_API void srslte_dft_precoding_free(srslte_dft_precoding_t* q);
|
|||
|
||||
SRSLTE_API bool srslte_dft_precoding_valid_prb(uint32_t nof_prb);
|
||||
|
||||
SRSLTE_API uint32_t srslte_dft_precoding_get_valid_prb(uint32_t nof_prb);
|
||||
|
||||
SRSLTE_API int
|
||||
srslte_dft_precoding(srslte_dft_precoding_t* q, cf_t* input, cf_t* output, uint32_t nof_prb, uint32_t nof_symbols);
|
||||
|
||||
|
|
|
@ -102,6 +102,15 @@ bool srslte_dft_precoding_valid_prb(uint32_t nof_prb)
|
|||
return false;
|
||||
}
|
||||
|
||||
/* Return largest integer that fulfills the DFT precoding PRB criterion (TS 36.213 Section 14.1.1.4C) */
|
||||
uint32_t srslte_dft_precoding_get_valid_prb(uint32_t nof_prb)
|
||||
{
|
||||
while (srslte_dft_precoding_valid_prb(nof_prb) == false) {
|
||||
nof_prb--;
|
||||
}
|
||||
return nof_prb;
|
||||
}
|
||||
|
||||
int srslte_dft_precoding(srslte_dft_precoding_t* q, cf_t* input, cf_t* output, uint32_t nof_prb, uint32_t nof_symbols)
|
||||
{
|
||||
|
||||
|
|
Loading…
Reference in New Issue