2019-04-26 12:27:38 -07:00
|
|
|
/*
|
2020-03-13 04:12:52 -07:00
|
|
|
* Copyright 2013-2020 Software Radio Systems Limited
|
2015-01-29 16:15:09 -08:00
|
|
|
*
|
2019-04-26 12:27:38 -07:00
|
|
|
* This file is part of srsLTE.
|
2015-01-29 16:15:09 -08:00
|
|
|
*
|
2015-03-20 05:01:08 -07:00
|
|
|
* srsLTE is free software: you can redistribute it and/or modify
|
2015-05-08 08:05:40 -07:00
|
|
|
* it under the terms of the GNU Affero General Public License as
|
2015-01-29 16:15:09 -08:00
|
|
|
* published by the Free Software Foundation, either version 3 of
|
|
|
|
* the License, or (at your option) any later version.
|
|
|
|
*
|
2015-03-20 05:01:08 -07:00
|
|
|
* srsLTE is distributed in the hope that it will be useful,
|
2015-01-29 16:15:09 -08:00
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
2015-05-08 08:05:40 -07:00
|
|
|
* GNU Affero General Public License for more details.
|
2015-01-29 16:15:09 -08:00
|
|
|
*
|
2015-05-08 08:05:40 -07:00
|
|
|
* A copy of the GNU Affero General Public License can be found in
|
2015-01-29 16:15:09 -08:00
|
|
|
* the LICENSE file in the top-level directory of this distribution
|
|
|
|
* and at http://www.gnu.org/licenses/.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2019-04-23 01:53:11 -07:00
|
|
|
#include "srslte/srslte.h"
|
|
|
|
#include <assert.h>
|
|
|
|
#include <math.h>
|
|
|
|
#include <stdbool.h>
|
2015-01-29 16:15:09 -08:00
|
|
|
#include <stdint.h>
|
|
|
|
#include <stdio.h>
|
2019-04-23 01:53:11 -07:00
|
|
|
#include <stdlib.h>
|
2015-01-29 16:15:09 -08:00
|
|
|
#include <string.h>
|
|
|
|
#include <strings.h>
|
|
|
|
|
2017-05-18 00:48:24 -07:00
|
|
|
#include "srslte/phy/ch_estimation/refsignal_ul.h"
|
2019-12-16 07:04:22 -08:00
|
|
|
#include "srslte/phy/common/phy_common.h"
|
|
|
|
#include "srslte/phy/dft/dft_precoding.h"
|
2017-05-18 00:48:24 -07:00
|
|
|
#include "srslte/phy/phch/pusch.h"
|
|
|
|
#include "srslte/phy/phch/pusch_cfg.h"
|
|
|
|
#include "srslte/phy/phch/uci.h"
|
|
|
|
#include "srslte/phy/utils/bit.h"
|
|
|
|
#include "srslte/phy/utils/debug.h"
|
|
|
|
#include "srslte/phy/utils/vector.h"
|
2015-01-29 16:15:09 -08:00
|
|
|
|
2015-03-18 05:59:29 -07:00
|
|
|
#define MAX_PUSCH_RE(cp) (2 * SRSLTE_CP_NSYMB(cp) * 12)
|
2015-01-29 16:15:09 -08:00
|
|
|
|
2019-04-23 01:53:11 -07:00
|
|
|
#define ACK_SNR_TH -1.0
|
2015-01-29 16:15:09 -08:00
|
|
|
|
2015-06-12 08:49:11 -07:00
|
|
|
/* Allocate/deallocate PUSCH RBs to the resource grid
|
|
|
|
*/
|
2019-12-16 07:04:22 -08:00
|
|
|
static int pusch_cp(srslte_pusch_t* q,
|
|
|
|
srslte_pusch_grant_t* grant,
|
|
|
|
cf_t* input,
|
|
|
|
cf_t* output,
|
|
|
|
bool is_shortened,
|
|
|
|
bool advance_input)
|
2015-06-12 08:49:11 -07:00
|
|
|
{
|
2019-04-23 01:53:11 -07:00
|
|
|
cf_t* in_ptr = input;
|
|
|
|
cf_t* out_ptr = output;
|
|
|
|
|
2015-06-12 08:49:11 -07:00
|
|
|
uint32_t L_ref = 3;
|
|
|
|
if (SRSLTE_CP_ISEXT(q->cell.cp)) {
|
2019-12-16 07:04:22 -08:00
|
|
|
L_ref = 2;
|
2015-06-12 08:49:11 -07:00
|
|
|
}
|
2019-04-23 01:53:11 -07:00
|
|
|
for (uint32_t slot = 0; slot < 2; slot++) {
|
|
|
|
uint32_t N_srs = 0;
|
|
|
|
if (is_shortened && slot == 1) {
|
2019-12-16 07:04:22 -08:00
|
|
|
N_srs = 1;
|
2015-06-14 13:11:49 -07:00
|
|
|
}
|
2019-12-16 07:04:22 -08:00
|
|
|
INFO("%s PUSCH %d PRB to index %d at slot %d\n",
|
|
|
|
advance_input ? "Allocating" : "Getting",
|
|
|
|
grant->L_prb,
|
|
|
|
grant->n_prb_tilde[slot],
|
|
|
|
slot);
|
|
|
|
for (uint32_t l = 0; l < SRSLTE_CP_NSYMB(q->cell.cp) - N_srs; l++) {
|
2015-02-14 05:20:16 -08:00
|
|
|
if (l != L_ref) {
|
2019-12-16 07:04:22 -08:00
|
|
|
uint32_t idx = SRSLTE_RE_IDX(
|
|
|
|
q->cell.nof_prb, l + slot * SRSLTE_CP_NSYMB(q->cell.cp), grant->n_prb_tilde[slot] * SRSLTE_NRE);
|
2015-02-15 23:55:17 -08:00
|
|
|
if (advance_input) {
|
2019-12-16 07:04:22 -08:00
|
|
|
out_ptr = &output[idx];
|
2015-02-15 23:55:17 -08:00
|
|
|
} else {
|
|
|
|
in_ptr = &input[idx];
|
2019-12-16 07:04:22 -08:00
|
|
|
}
|
|
|
|
memcpy(out_ptr, in_ptr, grant->L_prb * SRSLTE_NRE * sizeof(cf_t));
|
2015-02-15 23:55:17 -08:00
|
|
|
if (advance_input) {
|
2019-12-16 07:04:22 -08:00
|
|
|
in_ptr += grant->L_prb * SRSLTE_NRE;
|
2015-02-15 23:55:17 -08:00
|
|
|
} else {
|
2019-12-16 07:04:22 -08:00
|
|
|
out_ptr += grant->L_prb * SRSLTE_NRE;
|
2015-02-14 05:20:16 -08:00
|
|
|
}
|
|
|
|
}
|
2019-12-16 07:04:22 -08:00
|
|
|
}
|
2015-02-14 05:20:16 -08:00
|
|
|
}
|
2016-04-21 10:06:48 -07:00
|
|
|
if (advance_input) {
|
|
|
|
return in_ptr - input;
|
|
|
|
} else {
|
2019-12-16 07:04:22 -08:00
|
|
|
return out_ptr - output;
|
2016-04-21 10:06:48 -07:00
|
|
|
}
|
2015-01-29 16:15:09 -08:00
|
|
|
}
|
|
|
|
|
2019-04-23 01:53:11 -07:00
|
|
|
static int pusch_put(srslte_pusch_t* q, srslte_pusch_grant_t* grant, cf_t* input, cf_t* output, bool is_shortened)
|
|
|
|
{
|
|
|
|
return pusch_cp(q, grant, input, output, is_shortened, true);
|
2015-01-29 16:15:09 -08:00
|
|
|
}
|
|
|
|
|
2019-04-23 01:53:11 -07:00
|
|
|
static int pusch_get(srslte_pusch_t* q, srslte_pusch_grant_t* grant, cf_t* input, cf_t* output, bool is_shortened)
|
|
|
|
{
|
|
|
|
return pusch_cp(q, grant, input, output, is_shortened, false);
|
2015-01-29 16:15:09 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
/** Initializes the PDCCH transmitter and receiver */
|
2019-04-23 01:53:11 -07:00
|
|
|
static int pusch_init(srslte_pusch_t* q, uint32_t max_prb, bool is_ue)
|
|
|
|
{
|
2015-03-18 05:31:13 -07:00
|
|
|
int ret = SRSLTE_ERROR_INVALID_INPUTS;
|
2015-01-29 16:15:09 -08:00
|
|
|
|
2019-12-16 07:04:22 -08:00
|
|
|
if (q != NULL) {
|
|
|
|
|
2015-03-18 11:14:24 -07:00
|
|
|
bzero(q, sizeof(srslte_pusch_t));
|
2019-12-16 07:04:22 -08:00
|
|
|
ret = SRSLTE_ERROR;
|
2017-09-01 04:29:11 -07:00
|
|
|
q->max_re = max_prb * MAX_PUSCH_RE(SRSLTE_CP_NORM);
|
2015-01-29 16:15:09 -08:00
|
|
|
|
2017-09-01 04:29:11 -07:00
|
|
|
INFO("Init PUSCH: %d PRBs\n", max_prb);
|
2015-01-29 16:15:09 -08:00
|
|
|
|
2020-03-03 02:30:37 -08:00
|
|
|
for (srslte_mod_t i = 0; i < SRSLTE_MOD_NITEMS; i++) {
|
|
|
|
if (srslte_modem_table_lte(&q->mod[i], i)) {
|
2015-01-29 16:15:09 -08:00
|
|
|
goto clean;
|
|
|
|
}
|
2015-09-18 13:47:37 -07:00
|
|
|
srslte_modem_table_bytes(&q->mod[i]);
|
2015-01-29 16:15:09 -08:00
|
|
|
}
|
2017-09-01 04:29:11 -07:00
|
|
|
|
|
|
|
q->is_ue = is_ue;
|
|
|
|
|
2019-12-16 07:04:22 -08:00
|
|
|
q->users = calloc(sizeof(srslte_pusch_user_t*), q->is_ue ? 1 : (1 + SRSLTE_SIRNTI));
|
2016-11-20 08:36:21 -08:00
|
|
|
if (!q->users) {
|
|
|
|
perror("malloc");
|
|
|
|
goto clean;
|
|
|
|
}
|
|
|
|
|
2017-09-01 04:29:11 -07:00
|
|
|
if (srslte_sequence_init(&q->tmp_seq, q->max_re * srslte_mod_bits_x_symbol(SRSLTE_MOD_64QAM))) {
|
|
|
|
goto clean;
|
2015-02-15 23:55:17 -08:00
|
|
|
}
|
2015-01-29 16:15:09 -08:00
|
|
|
|
2016-05-09 03:38:39 -07:00
|
|
|
srslte_sch_init(&q->ul_sch);
|
2017-09-01 04:29:11 -07:00
|
|
|
|
|
|
|
if (srslte_dft_precoding_init(&q->dft_precoding, max_prb, is_ue)) {
|
2019-04-23 01:53:11 -07:00
|
|
|
ERROR("Error initiating DFT transform precoding\n");
|
2019-12-16 07:04:22 -08:00
|
|
|
goto clean;
|
2015-02-14 05:20:16 -08:00
|
|
|
}
|
2017-09-01 04:29:11 -07:00
|
|
|
|
2016-04-27 08:23:36 -07:00
|
|
|
// Allocate int16 for reception (LLRs). Buffer casted to uint8_t for transmission
|
2020-04-01 10:02:56 -07:00
|
|
|
q->q = srslte_vec_i16_malloc(q->max_re * srslte_mod_bits_x_symbol(SRSLTE_MOD_64QAM));
|
2015-03-18 11:14:24 -07:00
|
|
|
if (!q->q) {
|
2015-02-11 23:57:37 -08:00
|
|
|
goto clean;
|
|
|
|
}
|
|
|
|
|
2016-04-27 08:23:36 -07:00
|
|
|
// Allocate int16 for reception (LLRs). Buffer casted to uint8_t for transmission
|
2020-04-01 10:02:56 -07:00
|
|
|
q->g = srslte_vec_i16_malloc(q->max_re * srslte_mod_bits_x_symbol(SRSLTE_MOD_64QAM));
|
2015-03-18 11:14:24 -07:00
|
|
|
if (!q->g) {
|
2015-01-29 16:15:09 -08:00
|
|
|
goto clean;
|
|
|
|
}
|
2020-04-01 10:02:56 -07:00
|
|
|
q->d = srslte_vec_cf_malloc(q->max_re);
|
2015-03-18 11:14:24 -07:00
|
|
|
if (!q->d) {
|
2019-12-16 07:04:22 -08:00
|
|
|
goto clean;
|
2015-01-29 16:15:09 -08:00
|
|
|
}
|
|
|
|
|
2020-03-02 08:51:00 -08:00
|
|
|
// Allocate eNb specific buffers
|
2017-09-01 04:29:11 -07:00
|
|
|
if (!q->is_ue) {
|
2020-04-01 10:02:56 -07:00
|
|
|
q->ce = srslte_vec_cf_malloc(q->max_re);
|
2017-09-01 04:29:11 -07:00
|
|
|
if (!q->ce) {
|
|
|
|
goto clean;
|
|
|
|
}
|
2020-03-02 08:51:00 -08:00
|
|
|
|
2020-11-11 07:08:04 -08:00
|
|
|
q->evm_buffer = srslte_evm_buffer_alloc(srslte_ra_tbs_from_idx(SRSLTE_RA_NOF_TBS_IDX - 1, 6));
|
2020-03-02 08:51:00 -08:00
|
|
|
if (!q->evm_buffer) {
|
|
|
|
ERROR("Allocating EVM buffer\n");
|
|
|
|
goto clean;
|
|
|
|
}
|
2015-02-13 01:02:10 -08:00
|
|
|
}
|
2020-04-01 10:02:56 -07:00
|
|
|
q->z = srslte_vec_cf_malloc(q->max_re);
|
2015-03-18 11:14:24 -07:00
|
|
|
if (!q->z) {
|
2015-02-13 01:02:10 -08:00
|
|
|
goto clean;
|
2015-01-29 16:15:09 -08:00
|
|
|
}
|
|
|
|
|
2015-03-18 05:31:13 -07:00
|
|
|
ret = SRSLTE_SUCCESS;
|
2015-01-29 16:15:09 -08:00
|
|
|
}
|
2019-12-16 07:04:22 -08:00
|
|
|
clean:
|
2015-03-18 05:31:13 -07:00
|
|
|
if (ret == SRSLTE_ERROR) {
|
2015-03-18 11:14:24 -07:00
|
|
|
srslte_pusch_free(q);
|
2015-01-29 16:15:09 -08:00
|
|
|
}
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
2019-12-16 07:04:22 -08:00
|
|
|
int srslte_pusch_init_ue(srslte_pusch_t* q, uint32_t max_prb)
|
|
|
|
{
|
2017-09-01 04:29:11 -07:00
|
|
|
return pusch_init(q, max_prb, true);
|
|
|
|
}
|
|
|
|
|
2019-12-16 07:04:22 -08:00
|
|
|
int srslte_pusch_init_enb(srslte_pusch_t* q, uint32_t max_prb)
|
|
|
|
{
|
2017-09-01 04:29:11 -07:00
|
|
|
return pusch_init(q, max_prb, false);
|
|
|
|
}
|
|
|
|
|
2019-12-16 07:04:22 -08:00
|
|
|
void srslte_pusch_free(srslte_pusch_t* q)
|
|
|
|
{
|
2015-01-29 16:15:09 -08:00
|
|
|
int i;
|
|
|
|
|
2015-03-18 11:14:24 -07:00
|
|
|
if (q->q) {
|
|
|
|
free(q->q);
|
2015-01-29 16:15:09 -08:00
|
|
|
}
|
2015-03-18 11:14:24 -07:00
|
|
|
if (q->d) {
|
|
|
|
free(q->d);
|
2015-01-29 16:15:09 -08:00
|
|
|
}
|
2015-03-18 11:14:24 -07:00
|
|
|
if (q->g) {
|
|
|
|
free(q->g);
|
2015-02-12 01:38:53 -08:00
|
|
|
}
|
2015-02-13 01:02:10 -08:00
|
|
|
if (q->ce) {
|
|
|
|
free(q->ce);
|
2015-01-29 16:15:09 -08:00
|
|
|
}
|
2015-03-18 11:14:24 -07:00
|
|
|
if (q->z) {
|
|
|
|
free(q->z);
|
2015-02-13 01:02:10 -08:00
|
|
|
}
|
2020-03-02 08:51:00 -08:00
|
|
|
if (q->evm_buffer) {
|
|
|
|
srslte_evm_free(q->evm_buffer);
|
|
|
|
}
|
2015-03-18 11:14:24 -07:00
|
|
|
srslte_dft_precoding_free(&q->dft_precoding);
|
2015-01-29 16:15:09 -08:00
|
|
|
|
2016-11-20 08:36:21 -08:00
|
|
|
if (q->users) {
|
2017-09-01 04:29:11 -07:00
|
|
|
if (q->is_ue) {
|
2017-09-04 03:26:58 -07:00
|
|
|
srslte_pusch_free_rnti(q, 0);
|
2017-09-01 04:29:11 -07:00
|
|
|
} else {
|
2019-12-16 07:04:22 -08:00
|
|
|
for (int rnti = 0; rnti <= SRSLTE_SIRNTI; rnti++) {
|
2017-09-04 03:26:58 -07:00
|
|
|
srslte_pusch_free_rnti(q, rnti);
|
2017-09-01 04:29:11 -07:00
|
|
|
}
|
2016-11-20 08:36:21 -08:00
|
|
|
}
|
|
|
|
free(q->users);
|
2015-01-29 16:15:09 -08:00
|
|
|
}
|
2017-09-01 04:29:11 -07:00
|
|
|
|
|
|
|
srslte_sequence_free(&q->tmp_seq);
|
2019-12-16 07:04:22 -08:00
|
|
|
|
2020-03-02 08:51:00 -08:00
|
|
|
for (i = 0; i < SRSLTE_MOD_NITEMS; i++) {
|
2015-03-18 11:14:24 -07:00
|
|
|
srslte_modem_table_free(&q->mod[i]);
|
2015-01-29 16:15:09 -08:00
|
|
|
}
|
2016-05-09 03:38:39 -07:00
|
|
|
srslte_sch_free(&q->ul_sch);
|
2015-01-29 16:15:09 -08:00
|
|
|
|
2015-03-18 11:14:24 -07:00
|
|
|
bzero(q, sizeof(srslte_pusch_t));
|
2015-01-29 16:15:09 -08:00
|
|
|
}
|
|
|
|
|
2019-12-16 07:04:22 -08:00
|
|
|
int srslte_pusch_set_cell(srslte_pusch_t* q, srslte_cell_t cell)
|
|
|
|
{
|
2017-09-01 04:29:11 -07:00
|
|
|
int ret = SRSLTE_ERROR_INVALID_INPUTS;
|
|
|
|
|
2019-04-23 01:53:11 -07:00
|
|
|
if (q != NULL && srslte_cell_isvalid(&cell)) {
|
2017-09-01 04:29:11 -07:00
|
|
|
|
2020-03-02 08:51:00 -08:00
|
|
|
// Resize EVM buffer, only for eNb
|
|
|
|
if (!q->is_ue && q->evm_buffer) {
|
|
|
|
srslte_evm_buffer_resize(q->evm_buffer, cell.nof_prb);
|
|
|
|
}
|
|
|
|
|
2019-04-23 01:53:11 -07:00
|
|
|
q->cell = cell;
|
|
|
|
q->max_re = cell.nof_prb * MAX_PUSCH_RE(cell.cp);
|
2019-12-16 07:04:22 -08:00
|
|
|
ret = SRSLTE_SUCCESS;
|
2017-09-01 04:29:11 -07:00
|
|
|
}
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
2019-12-16 07:04:22 -08:00
|
|
|
/* Precalculate the PUSCH scramble sequences for a given RNTI. This function takes a while
|
2015-03-02 02:11:44 -08:00
|
|
|
* to execute, so shall be called once the final C-RNTI has been allocated for the session.
|
2016-11-20 08:36:21 -08:00
|
|
|
* For the connection procedure, use srslte_pusch_encode() functions */
|
2019-12-16 07:04:22 -08:00
|
|
|
int srslte_pusch_set_rnti(srslte_pusch_t* q, uint16_t rnti)
|
|
|
|
{
|
|
|
|
uint32_t rnti_idx = q->is_ue ? 0 : rnti;
|
2017-09-04 03:26:58 -07:00
|
|
|
|
2020-05-15 03:54:53 -07:00
|
|
|
// Decide whether re-generating the sequence
|
|
|
|
if (!q->users[rnti_idx]) {
|
|
|
|
// If the sequence is not allocated generate
|
|
|
|
q->users[rnti_idx] = calloc(1, sizeof(srslte_pdsch_user_t));
|
2017-09-04 03:26:58 -07:00
|
|
|
if (!q->users[rnti_idx]) {
|
2020-05-15 03:54:53 -07:00
|
|
|
ERROR("Alocating PDSCH user\n");
|
|
|
|
return SRSLTE_ERROR;
|
2016-05-09 03:38:39 -07:00
|
|
|
}
|
2020-05-15 03:54:53 -07:00
|
|
|
} else if (q->users[rnti_idx]->sequence_generated && q->users[rnti_idx]->cell_id == q->cell.id && !q->is_ue) {
|
|
|
|
// The sequence was generated, cell has not changed and it is eNb, save any efforts
|
|
|
|
return SRSLTE_SUCCESS;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Set sequence as not generated
|
|
|
|
q->users[rnti_idx]->sequence_generated = false;
|
|
|
|
|
|
|
|
// For each subframe
|
|
|
|
for (int sf_idx = 0; sf_idx < SRSLTE_NOF_SF_X_FRAME; sf_idx++) {
|
|
|
|
if (srslte_sequence_pusch(&q->users[rnti_idx]->seq[sf_idx],
|
|
|
|
rnti,
|
|
|
|
SRSLTE_NOF_SLOTS_PER_SF * sf_idx,
|
|
|
|
q->cell.id,
|
|
|
|
q->max_re * srslte_mod_bits_x_symbol(SRSLTE_MOD_64QAM))) {
|
|
|
|
ERROR("Error initializing PUSCH scrambling sequence\n");
|
|
|
|
srslte_pusch_free_rnti(q, rnti);
|
|
|
|
return SRSLTE_ERROR;
|
2017-09-04 03:26:58 -07:00
|
|
|
}
|
2015-03-02 02:11:44 -08:00
|
|
|
}
|
2020-05-15 03:54:53 -07:00
|
|
|
|
|
|
|
// Save generation states
|
|
|
|
q->ue_rnti = rnti;
|
|
|
|
q->users[rnti_idx]->cell_id = q->cell.id;
|
|
|
|
q->users[rnti_idx]->sequence_generated = true;
|
|
|
|
|
2016-11-20 08:36:21 -08:00
|
|
|
return SRSLTE_SUCCESS;
|
2015-03-02 02:11:44 -08:00
|
|
|
}
|
|
|
|
|
2019-12-16 07:04:22 -08:00
|
|
|
void srslte_pusch_free_rnti(srslte_pusch_t* q, uint16_t rnti)
|
|
|
|
{
|
2017-09-01 04:29:11 -07:00
|
|
|
|
2019-12-16 07:04:22 -08:00
|
|
|
uint32_t rnti_idx = q->is_ue ? 0 : rnti;
|
2017-09-01 04:29:11 -07:00
|
|
|
|
|
|
|
if (q->users[rnti_idx]) {
|
2019-04-23 01:53:11 -07:00
|
|
|
for (int i = 0; i < SRSLTE_NOF_SF_X_FRAME; i++) {
|
2017-09-01 04:29:11 -07:00
|
|
|
srslte_sequence_free(&q->users[rnti_idx]->seq[i]);
|
2019-12-16 07:04:22 -08:00
|
|
|
}
|
2017-09-01 04:29:11 -07:00
|
|
|
free(q->users[rnti_idx]);
|
|
|
|
q->users[rnti_idx] = NULL;
|
2019-12-16 07:04:22 -08:00
|
|
|
q->ue_rnti = 0;
|
2017-09-01 04:29:11 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-04-23 01:53:11 -07:00
|
|
|
static srslte_sequence_t* get_user_sequence(srslte_pusch_t* q, uint16_t rnti, uint32_t sf_idx, uint32_t len)
|
2017-09-01 04:29:11 -07:00
|
|
|
{
|
2019-12-16 07:04:22 -08:00
|
|
|
uint32_t rnti_idx = q->is_ue ? 0 : rnti;
|
2017-09-04 03:26:58 -07:00
|
|
|
|
2019-04-23 01:53:11 -07:00
|
|
|
if (SRSLTE_RNTI_ISUSER(rnti)) {
|
2018-09-19 07:41:59 -07:00
|
|
|
// The scrambling sequence is pregenerated for all RNTIs in the eNodeB but only for C-RNTI in the UE
|
2019-04-23 01:53:11 -07:00
|
|
|
if (q->users[rnti_idx] && q->users[rnti_idx]->sequence_generated && q->users[rnti_idx]->cell_id == q->cell.id &&
|
|
|
|
(!q->is_ue || q->ue_rnti == rnti)) {
|
2018-09-19 07:41:59 -07:00
|
|
|
return &q->users[rnti_idx]->seq[sf_idx];
|
|
|
|
} else {
|
|
|
|
if (srslte_sequence_pusch(&q->tmp_seq, rnti, 2 * sf_idx, q->cell.id, len)) {
|
2019-04-23 01:53:11 -07:00
|
|
|
ERROR("Error generating temporal scrambling sequence\n");
|
2018-09-19 07:41:59 -07:00
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
return &q->tmp_seq;
|
|
|
|
}
|
2017-09-01 04:29:11 -07:00
|
|
|
} else {
|
2019-04-23 01:53:11 -07:00
|
|
|
ERROR("Invalid RNTI=0x%x\n", rnti);
|
2018-09-19 07:41:59 -07:00
|
|
|
return NULL;
|
2015-03-02 02:11:44 -08:00
|
|
|
}
|
2015-01-29 16:15:09 -08:00
|
|
|
}
|
|
|
|
|
2020-08-25 06:09:30 -07:00
|
|
|
int srslte_pusch_assert_grant(const srslte_pusch_grant_t* grant)
|
|
|
|
{
|
2020-09-04 05:13:57 -07:00
|
|
|
// Check for valid number of PRB
|
2020-08-25 06:09:30 -07:00
|
|
|
if (!srslte_dft_precoding_valid_prb(grant->L_prb)) {
|
|
|
|
return SRSLTE_ERROR_INVALID_INPUTS;
|
|
|
|
}
|
|
|
|
|
2020-09-04 05:13:57 -07:00
|
|
|
// Check RV limits, -1 is for RAR, 0-3 normal HARQ
|
|
|
|
if (grant->tb.rv < -1 || grant->tb.rv > 3) {
|
2020-08-25 06:09:30 -07:00
|
|
|
return SRSLTE_ERROR_OUT_OF_BOUNDS;
|
|
|
|
}
|
|
|
|
|
2020-09-04 05:13:57 -07:00
|
|
|
// Check for positive TBS
|
2020-08-25 06:09:30 -07:00
|
|
|
if (grant->tb.tbs < 0) {
|
|
|
|
return SRSLTE_ERROR_OUT_OF_BOUNDS;
|
|
|
|
}
|
|
|
|
|
|
|
|
return SRSLTE_SUCCESS;
|
|
|
|
}
|
|
|
|
|
2015-01-29 16:15:09 -08:00
|
|
|
/** Converts the PUSCH data bits to symbols mapped to the slot ready for transmission
|
|
|
|
*/
|
2019-12-16 07:04:22 -08:00
|
|
|
int srslte_pusch_encode(srslte_pusch_t* q,
|
|
|
|
srslte_ul_sf_cfg_t* sf,
|
|
|
|
srslte_pusch_cfg_t* cfg,
|
|
|
|
srslte_pusch_data_t* data,
|
|
|
|
cf_t* sf_symbols)
|
2015-01-29 16:15:09 -08:00
|
|
|
{
|
2019-12-16 07:04:22 -08:00
|
|
|
int ret = SRSLTE_ERROR_INVALID_INPUTS;
|
|
|
|
|
|
|
|
if (q != NULL && cfg != NULL) {
|
2015-01-29 16:15:09 -08:00
|
|
|
|
2019-04-23 01:53:11 -07:00
|
|
|
/* Limit UL modulation if not supported by the UE or disabled by higher layers */
|
|
|
|
if (!cfg->enable_64qam) {
|
|
|
|
if (cfg->grant.tb.mod >= SRSLTE_MOD_64QAM) {
|
|
|
|
cfg->grant.tb.mod = SRSLTE_MOD_16QAM;
|
|
|
|
cfg->grant.tb.nof_bits = cfg->grant.nof_re * srslte_mod_bits_x_symbol(SRSLTE_MOD_16QAM);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (cfg->grant.nof_re > q->max_re) {
|
|
|
|
ERROR("Error too many RE per subframe (%d). PUSCH configured for %d RE (%d PRB)\n",
|
|
|
|
cfg->grant.nof_re,
|
|
|
|
q->max_re,
|
|
|
|
q->cell.nof_prb);
|
2015-03-18 05:31:13 -07:00
|
|
|
return SRSLTE_ERROR_INVALID_INPUTS;
|
2015-03-02 02:11:44 -08:00
|
|
|
}
|
2015-01-29 16:15:09 -08:00
|
|
|
|
2020-08-25 06:09:30 -07:00
|
|
|
int err = srslte_pusch_assert_grant(&cfg->grant);
|
|
|
|
if (err != SRSLTE_SUCCESS) {
|
|
|
|
return err;
|
2019-04-23 01:53:11 -07:00
|
|
|
}
|
|
|
|
|
2015-06-04 02:48:13 -07:00
|
|
|
INFO("Encoding PUSCH SF: %d, Mod %s, RNTI: %d, TBS: %d, NofRE: %d, NofSymbols=%d, NofBitsE: %d, rv_idx: %d\n",
|
2019-04-23 01:53:11 -07:00
|
|
|
sf->tti % 10,
|
|
|
|
srslte_mod_string(cfg->grant.tb.mod),
|
|
|
|
cfg->rnti,
|
|
|
|
cfg->grant.tb.tbs,
|
|
|
|
cfg->grant.nof_re,
|
|
|
|
cfg->grant.nof_symb,
|
|
|
|
cfg->grant.tb.nof_bits,
|
|
|
|
cfg->grant.tb.rv);
|
|
|
|
|
|
|
|
bzero(q->q, cfg->grant.tb.nof_bits);
|
|
|
|
if ((ret = srslte_ulsch_encode(&q->ul_sch, cfg, data->ptr, &data->uci, q->g, q->q)) < 0) {
|
|
|
|
ERROR("Error encoding TB\n");
|
2015-03-18 05:31:13 -07:00
|
|
|
return SRSLTE_ERROR;
|
2015-03-02 02:11:44 -08:00
|
|
|
}
|
2015-06-19 04:10:37 -07:00
|
|
|
|
2019-04-23 01:53:11 -07:00
|
|
|
uint32_t nof_ri_ack_bits = (uint32_t)ret;
|
2017-09-01 04:29:11 -07:00
|
|
|
|
2019-04-23 01:53:11 -07:00
|
|
|
// Generate scrambling sequence if not pre-generated
|
|
|
|
srslte_sequence_t* seq = get_user_sequence(q, cfg->rnti, sf->tti % 10, cfg->grant.tb.nof_bits);
|
2018-10-04 01:37:59 -07:00
|
|
|
if (!seq) {
|
2019-04-23 01:53:11 -07:00
|
|
|
ERROR("Error getting user sequence for rnti=0x%x\n", cfg->rnti);
|
|
|
|
return -1;
|
2018-10-04 01:37:59 -07:00
|
|
|
}
|
2019-04-23 01:53:11 -07:00
|
|
|
|
|
|
|
// Run scrambling
|
|
|
|
srslte_scrambling_bytes(seq, (uint8_t*)q->q, cfg->grant.tb.nof_bits);
|
2017-09-01 04:29:11 -07:00
|
|
|
|
2017-09-01 10:32:57 -07:00
|
|
|
// Correct UCI placeholder/repetition bits
|
2019-04-23 01:53:11 -07:00
|
|
|
uint8_t* d = q->q;
|
|
|
|
for (int i = 0; i < nof_ri_ack_bits; i++) {
|
2016-05-09 03:38:39 -07:00
|
|
|
if (q->ul_sch.ack_ri_bits[i].type == UCI_BIT_PLACEHOLDER) {
|
2019-12-16 07:04:22 -08:00
|
|
|
d[q->ul_sch.ack_ri_bits[i].position / 8] |= (1 << (7 - q->ul_sch.ack_ri_bits[i].position % 8));
|
2016-05-09 03:38:39 -07:00
|
|
|
} else if (q->ul_sch.ack_ri_bits[i].type == UCI_BIT_REPETITION) {
|
|
|
|
if (q->ul_sch.ack_ri_bits[i].position > 1) {
|
2019-12-16 07:04:22 -08:00
|
|
|
uint32_t p = q->ul_sch.ack_ri_bits[i].position;
|
2019-04-23 01:53:11 -07:00
|
|
|
uint8_t bit = d[(p - 1) / 8] & (1 << (7 - (p - 1) % 8));
|
2015-09-18 06:46:27 -07:00
|
|
|
if (bit) {
|
2019-04-23 01:53:11 -07:00
|
|
|
d[p / 8] |= 1 << (7 - p % 8);
|
2015-09-18 06:46:27 -07:00
|
|
|
} else {
|
2019-12-16 07:04:22 -08:00
|
|
|
d[p / 8] &= ~(1 << (7 - p % 8));
|
2015-09-18 06:46:27 -07:00
|
|
|
}
|
2019-12-16 07:04:22 -08:00
|
|
|
}
|
2015-09-05 02:51:19 -07:00
|
|
|
}
|
2015-01-29 16:15:09 -08:00
|
|
|
}
|
2019-04-23 01:53:11 -07:00
|
|
|
|
2016-04-21 10:06:48 -07:00
|
|
|
// Bit mapping
|
2019-04-23 01:53:11 -07:00
|
|
|
srslte_mod_modulate_bytes(&q->mod[cfg->grant.tb.mod], (uint8_t*)q->q, q->d, cfg->grant.tb.nof_bits);
|
2016-04-21 10:06:48 -07:00
|
|
|
|
|
|
|
// DFT precoding
|
2019-04-23 01:53:11 -07:00
|
|
|
srslte_dft_precoding(&q->dft_precoding, q->d, q->z, cfg->grant.L_prb, cfg->grant.nof_symb);
|
|
|
|
|
2016-04-21 10:06:48 -07:00
|
|
|
// Mapping to resource elements
|
2019-04-23 01:53:11 -07:00
|
|
|
uint32_t n = pusch_put(q, &cfg->grant, q->z, sf_symbols, sf->shortened);
|
|
|
|
if (n != cfg->grant.nof_re) {
|
|
|
|
ERROR("Error trying to allocate %d symbols but %d were allocated (tti=%d, short=%d, L=%d)\n",
|
|
|
|
cfg->grant.nof_re,
|
|
|
|
n,
|
|
|
|
sf->tti,
|
|
|
|
sf->shortened,
|
|
|
|
cfg->grant.L_prb);
|
|
|
|
return SRSLTE_ERROR;
|
|
|
|
}
|
|
|
|
|
2015-03-18 05:31:13 -07:00
|
|
|
ret = SRSLTE_SUCCESS;
|
2019-12-16 07:04:22 -08:00
|
|
|
}
|
|
|
|
return ret;
|
2015-01-29 16:15:09 -08:00
|
|
|
}
|
2016-04-21 10:06:48 -07:00
|
|
|
|
2016-11-20 08:36:21 -08:00
|
|
|
/** Decodes the PUSCH from the received symbols
|
|
|
|
*/
|
2019-04-23 01:53:11 -07:00
|
|
|
int srslte_pusch_decode(srslte_pusch_t* q,
|
|
|
|
srslte_ul_sf_cfg_t* sf,
|
|
|
|
srslte_pusch_cfg_t* cfg,
|
|
|
|
srslte_chest_ul_res_t* channel,
|
|
|
|
cf_t* sf_symbols,
|
|
|
|
srslte_pusch_res_t* out)
|
2016-04-27 08:23:36 -07:00
|
|
|
{
|
2019-04-23 01:53:11 -07:00
|
|
|
int ret = SRSLTE_ERROR_INVALID_INPUTS;
|
2016-04-21 10:06:48 -07:00
|
|
|
uint32_t n;
|
2019-04-23 01:53:11 -07:00
|
|
|
|
|
|
|
if (q != NULL && sf_symbols != NULL && out != NULL && cfg != NULL) {
|
|
|
|
|
|
|
|
struct timeval t[3];
|
|
|
|
if (cfg->meas_time_en) {
|
|
|
|
gettimeofday(&t[1], NULL);
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Limit UL modulation if not supported by the UE or disabled by higher layers */
|
|
|
|
if (!cfg->enable_64qam) {
|
|
|
|
if (cfg->grant.tb.mod >= SRSLTE_MOD_64QAM) {
|
|
|
|
cfg->grant.tb.mod = SRSLTE_MOD_16QAM;
|
|
|
|
cfg->grant.tb.nof_bits = cfg->grant.nof_re * srslte_mod_bits_x_symbol(SRSLTE_MOD_16QAM);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-11-20 08:36:21 -08:00
|
|
|
INFO("Decoding PUSCH SF: %d, Mod %s, NofBits: %d, NofRE: %d, NofSymbols=%d, NofBitsE: %d, rv_idx: %d\n",
|
2019-04-23 01:53:11 -07:00
|
|
|
sf->tti % 10,
|
|
|
|
srslte_mod_string(cfg->grant.tb.mod),
|
|
|
|
cfg->grant.tb.tbs,
|
|
|
|
cfg->grant.nof_re,
|
|
|
|
cfg->grant.nof_symb,
|
|
|
|
cfg->grant.tb.nof_bits,
|
|
|
|
cfg->grant.tb.rv);
|
2016-11-20 08:36:21 -08:00
|
|
|
|
|
|
|
/* extract symbols */
|
2019-04-23 01:53:11 -07:00
|
|
|
n = pusch_get(q, &cfg->grant, sf_symbols, q->d, sf->shortened);
|
|
|
|
if (n != cfg->grant.nof_re) {
|
|
|
|
ERROR("Error expecting %d symbols but got %d\n", cfg->grant.nof_re, n);
|
2016-11-20 08:36:21 -08:00
|
|
|
return SRSLTE_ERROR;
|
|
|
|
}
|
2019-04-23 01:53:11 -07:00
|
|
|
|
2020-03-12 08:49:24 -07:00
|
|
|
// Measure Energy per Resource Element
|
|
|
|
if (cfg->meas_epre_en) {
|
|
|
|
out->epre_dbfs = srslte_convert_power_to_dB(srslte_vec_avg_power_cf(q->d, n));
|
|
|
|
} else {
|
|
|
|
out->epre_dbfs = NAN;
|
|
|
|
}
|
|
|
|
|
2016-11-20 08:36:21 -08:00
|
|
|
/* extract channel estimates */
|
2019-04-23 01:53:11 -07:00
|
|
|
n = pusch_get(q, &cfg->grant, channel->ce, q->ce, sf->shortened);
|
|
|
|
if (n != cfg->grant.nof_re) {
|
|
|
|
ERROR("Error expecting %d symbols but got %d\n", cfg->grant.nof_re, n);
|
2016-11-20 08:36:21 -08:00
|
|
|
return SRSLTE_ERROR;
|
|
|
|
}
|
2016-07-11 01:40:28 -07:00
|
|
|
|
2016-11-20 08:36:21 -08:00
|
|
|
// Equalization
|
2019-04-23 01:53:11 -07:00
|
|
|
srslte_predecoding_single(q->d, q->ce, q->z, NULL, cfg->grant.nof_re, 1.0f, channel->noise_estimate);
|
|
|
|
|
2016-11-20 08:36:21 -08:00
|
|
|
// DFT predecoding
|
2019-04-23 01:53:11 -07:00
|
|
|
srslte_dft_precoding(&q->dft_precoding, q->z, q->d, cfg->grant.L_prb, cfg->grant.nof_symb);
|
|
|
|
|
2016-11-20 08:36:21 -08:00
|
|
|
// Soft demodulation
|
2018-09-04 08:51:35 -07:00
|
|
|
if (q->llr_is_8bit) {
|
2019-04-23 01:53:11 -07:00
|
|
|
srslte_demod_soft_demodulate_b(cfg->grant.tb.mod, q->d, q->q, cfg->grant.nof_re);
|
2018-09-04 08:51:35 -07:00
|
|
|
} else {
|
2019-04-23 01:53:11 -07:00
|
|
|
srslte_demod_soft_demodulate_s(cfg->grant.tb.mod, q->d, q->q, cfg->grant.nof_re);
|
2018-09-04 08:51:35 -07:00
|
|
|
}
|
2016-04-21 10:06:48 -07:00
|
|
|
|
2020-03-02 08:51:00 -08:00
|
|
|
if (cfg->meas_evm_en && q->evm_buffer) {
|
|
|
|
if (q->llr_is_8bit) {
|
|
|
|
out->evm = srslte_evm_run_b(q->evm_buffer, &q->mod[cfg->grant.tb.mod], q->d, q->q, cfg->grant.tb.nof_bits);
|
|
|
|
} else {
|
|
|
|
out->evm = srslte_evm_run_s(q->evm_buffer, &q->mod[cfg->grant.tb.mod], q->d, q->q, cfg->grant.tb.nof_bits);
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
out->evm = NAN;
|
|
|
|
}
|
|
|
|
|
2017-09-01 04:29:11 -07:00
|
|
|
// Generate scrambling sequence if not pre-generated
|
2019-04-23 01:53:11 -07:00
|
|
|
srslte_sequence_t* seq = get_user_sequence(q, cfg->rnti, sf->tti % 10, cfg->grant.tb.nof_bits);
|
|
|
|
if (!seq) {
|
|
|
|
ERROR("Error getting user sequence for rnti=0x%x\n", cfg->rnti);
|
|
|
|
return -1;
|
2016-05-09 03:38:39 -07:00
|
|
|
}
|
2017-11-16 05:48:03 -08:00
|
|
|
|
2016-11-20 08:36:21 -08:00
|
|
|
// Descrambling
|
2018-09-04 08:51:35 -07:00
|
|
|
if (q->llr_is_8bit) {
|
2019-04-23 01:53:11 -07:00
|
|
|
srslte_scrambling_sb_offset(seq, q->q, 0, cfg->grant.tb.nof_bits);
|
2018-09-04 08:51:35 -07:00
|
|
|
} else {
|
2019-04-23 01:53:11 -07:00
|
|
|
srslte_scrambling_s_offset(seq, q->q, 0, cfg->grant.tb.nof_bits);
|
2018-09-04 08:51:35 -07:00
|
|
|
}
|
2017-11-16 05:48:03 -08:00
|
|
|
|
2020-10-21 08:13:31 -07:00
|
|
|
// Set max number of iterations
|
|
|
|
srslte_sch_set_max_noi(&q->ul_sch, cfg->max_nof_iterations);
|
|
|
|
|
2017-11-16 05:48:03 -08:00
|
|
|
// Decode
|
2019-04-23 01:53:11 -07:00
|
|
|
ret = srslte_ulsch_decode(&q->ul_sch, cfg, q->q, q->g, seq->c, out->data, &out->uci);
|
|
|
|
out->crc = (ret == 0);
|
2017-11-16 05:48:03 -08:00
|
|
|
|
2020-07-27 06:44:57 -07:00
|
|
|
// Save number of iterations
|
2019-04-23 01:53:11 -07:00
|
|
|
out->avg_iterations_block = q->ul_sch.avg_iterations;
|
|
|
|
|
|
|
|
// Save O_cqi for power control
|
|
|
|
cfg->last_O_cqi = srslte_cqi_size(&cfg->uci_cfg.cqi);
|
|
|
|
ret = SRSLTE_SUCCESS;
|
|
|
|
|
|
|
|
if (cfg->meas_time_en) {
|
|
|
|
gettimeofday(&t[2], NULL);
|
|
|
|
get_time_interval(t);
|
|
|
|
cfg->meas_time_value = t[0].tv_usec;
|
2017-11-16 05:48:03 -08:00
|
|
|
}
|
2016-05-09 03:38:39 -07:00
|
|
|
}
|
2017-11-16 05:48:03 -08:00
|
|
|
|
|
|
|
return ret;
|
2016-05-09 03:38:39 -07:00
|
|
|
}
|
|
|
|
|
2019-12-16 07:04:22 -08:00
|
|
|
uint32_t srslte_pusch_grant_tx_info(srslte_pusch_grant_t* grant,
|
|
|
|
srslte_uci_cfg_t* uci_cfg,
|
|
|
|
srslte_uci_value_t* uci_data,
|
|
|
|
char* str,
|
|
|
|
uint32_t str_len)
|
2019-04-23 01:53:11 -07:00
|
|
|
{
|
|
|
|
|
|
|
|
uint32_t len = srslte_ra_ul_info(grant, str, str_len);
|
|
|
|
|
|
|
|
if (uci_data) {
|
|
|
|
len += srslte_uci_data_info(uci_cfg, uci_data, &str[len], str_len - len);
|
|
|
|
}
|
|
|
|
|
|
|
|
return len;
|
|
|
|
}
|
|
|
|
|
|
|
|
uint32_t srslte_pusch_tx_info(srslte_pusch_cfg_t* cfg, srslte_uci_value_t* uci_data, char* str, uint32_t str_len)
|
|
|
|
{
|
|
|
|
|
|
|
|
uint32_t len = srslte_print_check(str, str_len, 0, "rnti=0x%x", cfg->rnti);
|
|
|
|
|
|
|
|
len += srslte_pusch_grant_tx_info(&cfg->grant, &cfg->uci_cfg, uci_data, &str[len], str_len - len);
|
|
|
|
|
|
|
|
if (cfg->meas_time_en) {
|
|
|
|
len = srslte_print_check(str, str_len, len, ", t=%d us", cfg->meas_time_value);
|
|
|
|
}
|
|
|
|
return len;
|
2016-07-06 12:03:25 -07:00
|
|
|
}
|
|
|
|
|
2020-03-02 08:51:00 -08:00
|
|
|
uint32_t srslte_pusch_rx_info(srslte_pusch_cfg_t* cfg,
|
|
|
|
srslte_pusch_res_t* res,
|
|
|
|
srslte_chest_ul_res_t* chest_res,
|
|
|
|
char* str,
|
|
|
|
uint32_t str_len)
|
2019-04-23 01:53:11 -07:00
|
|
|
{
|
2016-07-06 12:03:25 -07:00
|
|
|
|
2019-04-23 01:53:11 -07:00
|
|
|
uint32_t len = srslte_print_check(str, str_len, 0, "rnti=0x%x", cfg->rnti);
|
|
|
|
|
|
|
|
len += srslte_ra_ul_info(&cfg->grant, &str[len], str_len);
|
|
|
|
|
|
|
|
len = srslte_print_check(
|
|
|
|
str, str_len, len, ", crc=%s, avg_iter=%.1f", res->crc ? "OK" : "KO", res->avg_iterations_block);
|
|
|
|
|
|
|
|
len += srslte_uci_data_info(&cfg->uci_cfg, &res->uci, &str[len], str_len - len);
|
|
|
|
|
2020-03-02 08:51:00 -08:00
|
|
|
len = srslte_print_check(str, str_len, len, ", snr=%.1f dB", chest_res->snr_db);
|
|
|
|
|
2020-03-12 08:49:24 -07:00
|
|
|
// Append Energy Per Resource Element
|
|
|
|
if (cfg->meas_epre_en) {
|
|
|
|
len = srslte_print_check(str, str_len, len, ", epre=%.1f dBfs", res->epre_dbfs);
|
|
|
|
}
|
|
|
|
|
2020-03-02 08:51:00 -08:00
|
|
|
// Append Time Aligment information if available
|
|
|
|
if (cfg->meas_ta_en) {
|
|
|
|
len = srslte_print_check(str, str_len, len, ", ta=%.1f us", chest_res->ta_us);
|
|
|
|
}
|
|
|
|
|
|
|
|
// Append EVM measurement if available
|
|
|
|
if (cfg->meas_evm_en) {
|
|
|
|
len = srslte_print_check(str, str_len, len, ", evm=%.1f %%", res->evm * 100);
|
|
|
|
}
|
|
|
|
|
2019-04-23 01:53:11 -07:00
|
|
|
if (cfg->meas_time_en) {
|
|
|
|
len = srslte_print_check(str, str_len, len, ", t=%d us", cfg->meas_time_value);
|
|
|
|
}
|
|
|
|
return len;
|
|
|
|
}
|