fix Scell sync for large cells

the PSS detection needs more temporary buffer than a full subframe.
we therefore need to allocate and initialize the sync object with
larger maximum size to support Scell search of large cells, e.g.
20 MHz

this fixes issue #1538
master
Andre Puschmann 4 years ago committed by Xavier Arteaga
parent f380f46a10
commit 1199a79851

@ -53,7 +53,6 @@ int srslte_sync_init(srslte_sync_t* q, uint32_t frame_size, uint32_t max_offset,
} }
int srslte_sync_init_decim(srslte_sync_t* q, uint32_t frame_size, uint32_t max_offset, uint32_t fft_size, int decimate) int srslte_sync_init_decim(srslte_sync_t* q, uint32_t frame_size, uint32_t max_offset, uint32_t fft_size, int decimate)
{ {
int ret = SRSLTE_ERROR_INVALID_INPUTS; int ret = SRSLTE_ERROR_INVALID_INPUTS;
if (q != NULL && fft_size_isvalid(fft_size)) { if (q != NULL && fft_size_isvalid(fft_size)) {

@ -59,7 +59,7 @@ private:
uint32_t channel = 0; uint32_t channel = 0;
srslte_sync_t find_pss = {}; srslte_sync_t find_pss = {};
int32_t sf_len = 0; int32_t sf_len = 0;
std::array<cf_t, SRSLTE_SF_LEN_MAX> temp; std::array<cf_t, 2 * SRSLTE_SF_LEN_MAX> temp;
/** /**
* Executes the PSS search state * Executes the PSS search state
@ -110,14 +110,18 @@ private:
public: public:
/** /**
* Constructor * Constructor
*
* Init PSS search object with twice the max subframe length to support max cell bandwidth.
*
* @param _callback provides the class for giving feedback * @param _callback provides the class for giving feedback
* @param _channel provides the channel index where the feedback needs to be applied * @param _channel provides the channel index where the feedback needs to be applied
*/ */
sync(sync_callback* _callback, uint32_t _channel) : callback(_callback), channel(_channel) sync(sync_callback* _callback, uint32_t _channel) : callback(_callback), channel(_channel)
{ {
// Initialise Find PSS object // Initialise Find PSS object
if (srslte_sync_init(&find_pss, SRSLTE_SF_LEN_MAX, SRSLTE_SF_LEN_MAX, SRSLTE_SYMBOL_SZ_MAX) != SRSLTE_SUCCESS) { if (srslte_sync_init(&find_pss, 2 * SRSLTE_SF_LEN_MAX, 2 * SRSLTE_SF_LEN_MAX, SRSLTE_SYMBOL_SZ_MAX) !=
ERROR("Initiating Synchroniser\n"); SRSLTE_SUCCESS) {
ERROR("Initiating Synchronizer\n");
} }
} }

Loading…
Cancel
Save