fixed cqi max bits

master
Ismael Gomez 8 years ago
parent e957bc8dc8
commit b8a2ea8f3c

@ -88,6 +88,7 @@ typedef struct SRSLTE_API {
float sss_signal5[SRSLTE_SSS_LEN];
uint32_t nof_rnti;
float tx_amp;
} srslte_enb_dl_t;
@ -114,6 +115,9 @@ SRSLTE_API void srslte_enb_dl_free(srslte_enb_dl_t *q);
SRSLTE_API void srslte_enb_dl_set_cfi(srslte_enb_dl_t *q,
uint32_t cfi);
SRSLTE_API void srslte_enb_dl_set_amp(srslte_enb_dl_t *q,
float amp);
SRSLTE_API void srslte_enb_dl_clear_sf(srslte_enb_dl_t *q);
SRSLTE_API void srslte_enb_dl_put_sync(srslte_enb_dl_t *q,

@ -40,7 +40,7 @@
#include "srslte/config.h"
#include "srslte/common/phy_common.h"
#define SRSLTE_CQI_MAX_BITS 20
#define SRSLTE_CQI_MAX_BITS 64
typedef struct {
bool configured;

@ -37,7 +37,7 @@
#define CURRENT_SLOTLEN_RE SRSLTE_SLOT_LEN_RE(q->cell.nof_prb, q->cell.cp)
#define CURRENT_SFLEN_RE SRSLTE_SF_LEN_RE(q->cell.nof_prb, q->cell.cp)
#define SRSLTE_ENB_RF_AMP 0.5
#define SRSLTE_ENB_RF_AMP 0.1
int srslte_enb_dl_init(srslte_enb_dl_t *q, srslte_cell_t cell, uint32_t nof_rnti)
{
@ -53,6 +53,7 @@ int srslte_enb_dl_init(srslte_enb_dl_t *q, srslte_cell_t cell, uint32_t nof_rnti
q->cell = cell;
q->cfi = 3;
q->nof_rnti = nof_rnti;
q->tx_amp = SRSLTE_ENB_RF_AMP;
if (srslte_ofdm_tx_init(&q->ifft, q->cell.cp, q->cell.nof_prb)) {
fprintf(stderr, "Error initiating FFT\n");
@ -146,6 +147,11 @@ void srslte_enb_dl_free(srslte_enb_dl_t *q)
}
}
void srslte_enb_dl_set_amp(srslte_enb_dl_t *q, float amp)
{
q->tx_amp = amp;
}
void srslte_enb_dl_set_cfi(srslte_enb_dl_t *q, uint32_t cfi)
{
q->cfi = cfi;
@ -214,7 +220,7 @@ void srslte_enb_dl_gen_signal(srslte_enb_dl_t *q, cf_t *signal_buffer)
// TODO: PAPR control
float norm_factor = (float) sqrt(q->cell.nof_prb)/15;
srslte_vec_sc_prod_cfc(signal_buffer, SRSLTE_ENB_RF_AMP*norm_factor, signal_buffer, SRSLTE_SF_LEN_PRB(q->cell.nof_prb));
srslte_vec_sc_prod_cfc(signal_buffer, q->tx_amp*norm_factor, signal_buffer, SRSLTE_SF_LEN_PRB(q->cell.nof_prb));
}
int srslte_enb_dl_cfg_rnti(srslte_enb_dl_t *q, uint32_t idx, uint16_t rnti)

Loading…
Cancel
Save