srsLTE/lib/include/srslte/phy/phch/pmch.h

98 lines
3.0 KiB
C
Raw Normal View History

/**
2017-09-21 03:48:09 -07:00
*
* \section COPYRIGHT
2017-09-21 03:48:09 -07:00
*
* Copyright 2013-2020 Software Radio Systems Limited
2017-09-21 03:48:09 -07:00
*
* By using this file, you agree to the terms and conditions set
* forth in the LICENSE file which can be found at the top level of
* the distribution.
2017-09-21 03:48:09 -07:00
*
*/
/******************************************************************************
* File: pmch.h
*
* Description: Physical multicast channel
*
* Reference: 3GPP TS 36.211 version 10.0.0 Release 10 Sec. 6.5
*****************************************************************************/
2018-03-31 10:04:04 -07:00
#ifndef SRSLTE_PMCH_H
#define SRSLTE_PMCH_H
2017-09-21 03:48:09 -07:00
#include "srslte/config.h"
#include "srslte/phy/common/phy_common.h"
2019-04-23 01:53:11 -07:00
#include "srslte/phy/common/sequence.h"
2017-09-21 03:48:09 -07:00
#include "srslte/phy/mimo/layermap.h"
2019-04-23 01:53:11 -07:00
#include "srslte/phy/mimo/precoding.h"
2017-09-21 03:48:09 -07:00
#include "srslte/phy/modem/demod_soft.h"
2019-04-23 01:53:11 -07:00
#include "srslte/phy/modem/mod.h"
2017-09-21 03:48:09 -07:00
#include "srslte/phy/phch/dci.h"
2019-04-23 01:53:11 -07:00
#include "srslte/phy/phch/pdsch.h"
#include "srslte/phy/phch/ra_dl.h"
2017-09-21 03:48:09 -07:00
#include "srslte/phy/phch/regs.h"
#include "srslte/phy/phch/sch.h"
2019-04-23 01:53:11 -07:00
#include "srslte/phy/scrambling/scrambling.h"
2017-09-21 03:48:09 -07:00
typedef struct {
2019-04-23 01:53:11 -07:00
srslte_sequence_t seq[SRSLTE_NOF_SF_X_FRAME];
2017-09-21 03:48:09 -07:00
} srslte_pmch_seq_t;
typedef struct SRSLTE_API {
2019-04-23 01:53:11 -07:00
srslte_pdsch_cfg_t pdsch_cfg;
uint16_t area_id;
2017-09-21 03:48:09 -07:00
} srslte_pmch_cfg_t;
/* PMCH object */
typedef struct SRSLTE_API {
srslte_cell_t cell;
2017-09-21 03:48:09 -07:00
uint32_t nof_rx_antennas;
2017-09-21 03:48:09 -07:00
uint32_t max_re;
2017-09-21 03:48:09 -07:00
/* buffers */
// void buffers are shared for tx and rx
cf_t* ce[SRSLTE_MAX_PORTS][SRSLTE_MAX_PORTS];
cf_t* symbols[SRSLTE_MAX_PORTS];
cf_t* x[SRSLTE_MAX_PORTS];
cf_t* d;
void* e;
2017-09-21 03:48:09 -07:00
/* tx & rx objects */
srslte_modem_table_t mod[4];
2017-09-21 03:48:09 -07:00
// This is to generate the scrambling seq for multiple MBSFN Area IDs
srslte_pmch_seq_t** seqs;
2017-09-21 03:48:09 -07:00
srslte_sch_t dl_sch;
2017-09-21 03:48:09 -07:00
} srslte_pmch_t;
2019-04-23 01:53:11 -07:00
SRSLTE_API int srslte_pmch_init(srslte_pmch_t* q, uint32_t max_prb, uint32_t nof_rx_antennas);
2017-09-21 03:48:09 -07:00
2019-04-23 01:53:11 -07:00
SRSLTE_API void srslte_pmch_free(srslte_pmch_t* q);
2017-09-21 03:48:09 -07:00
2019-04-23 01:53:11 -07:00
SRSLTE_API int srslte_pmch_set_cell(srslte_pmch_t* q, srslte_cell_t cell);
2017-09-21 03:48:09 -07:00
2019-04-23 01:53:11 -07:00
SRSLTE_API int srslte_pmch_set_area_id(srslte_pmch_t* q, uint16_t area_id);
2017-09-21 03:48:09 -07:00
2019-04-23 01:53:11 -07:00
SRSLTE_API void srslte_pmch_free_area_id(srslte_pmch_t* q, uint16_t area_id);
2017-09-21 03:48:09 -07:00
2019-04-23 01:53:11 -07:00
SRSLTE_API void srslte_configure_pmch(srslte_pmch_cfg_t* pmch_cfg, srslte_cell_t* cell, srslte_mbsfn_cfg_t* mbsfn_cfg);
2017-09-21 03:48:09 -07:00
2019-04-23 01:53:11 -07:00
SRSLTE_API int srslte_pmch_encode(srslte_pmch_t* q,
srslte_dl_sf_cfg_t* sf,
srslte_pmch_cfg_t* cfg,
uint8_t* data,
cf_t* sf_symbols[SRSLTE_MAX_PORTS]);
2017-09-21 03:48:09 -07:00
2019-04-23 01:53:11 -07:00
SRSLTE_API int srslte_pmch_decode(srslte_pmch_t* q,
srslte_dl_sf_cfg_t* sf,
srslte_pmch_cfg_t* cfg,
srslte_chest_dl_res_t* channel,
cf_t* sf_symbols[SRSLTE_MAX_PORTS],
srslte_pdsch_res_t* data);
2017-09-21 03:48:09 -07:00
2018-03-31 10:04:04 -07:00
#endif // SRSLTE_PMCH_H