|
|
|
@ -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)
|
|
|
|
|