2020-11-26 01:25:22 -08:00
|
|
|
/**
|
2014-03-03 11:09:26 -08:00
|
|
|
*
|
2020-11-26 01:25:22 -08:00
|
|
|
* \section COPYRIGHT
|
2014-03-03 11:09:26 -08:00
|
|
|
*
|
2020-11-26 01:25:22 -08:00
|
|
|
* Copyright 2013-2020 Software Radio Systems Limited
|
2014-01-28 03:41:17 -08:00
|
|
|
*
|
2020-11-26 01:25:22 -08: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.
|
2014-03-03 11:09:26 -08:00
|
|
|
*
|
2014-01-28 03:41:17 -08:00
|
|
|
*/
|
|
|
|
|
2015-04-03 05:49:12 -07:00
|
|
|
/******************************************************************************
|
|
|
|
* File: modem_table.h
|
|
|
|
*
|
|
|
|
* Description: Modem tables used for modulation/demodulation.
|
|
|
|
* Supports BPSK, QPSK, 16QAM and 64QAM.
|
|
|
|
*
|
|
|
|
* Reference: 3GPP TS 36.211 version 10.0.0 Release 10 Sec. 7.1
|
|
|
|
*****************************************************************************/
|
2014-03-03 11:09:26 -08:00
|
|
|
|
2018-03-31 10:04:04 -07:00
|
|
|
#ifndef SRSLTE_MODEM_TABLE_H
|
|
|
|
#define SRSLTE_MODEM_TABLE_H
|
2014-01-28 03:41:17 -08:00
|
|
|
|
|
|
|
#include <stdbool.h>
|
|
|
|
#include <stdint.h>
|
|
|
|
|
2015-03-18 05:16:28 -07:00
|
|
|
#include "srslte/config.h"
|
2019-12-16 07:04:22 -08:00
|
|
|
#include "srslte/phy/common/phy_common.h"
|
2014-06-13 04:42:29 -07:00
|
|
|
|
2015-09-18 15:17:19 -07:00
|
|
|
typedef struct {
|
|
|
|
cf_t symbol[8];
|
|
|
|
} bpsk_packed_t;
|
|
|
|
|
2015-09-18 13:47:37 -07:00
|
|
|
typedef struct {
|
|
|
|
cf_t symbol[4];
|
|
|
|
} qpsk_packed_t;
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
cf_t symbol[2];
|
|
|
|
} qam16_packed_t;
|
|
|
|
|
2015-03-18 05:31:13 -07:00
|
|
|
typedef struct SRSLTE_API {
|
2019-12-16 07:04:22 -08:00
|
|
|
cf_t* symbol_table; // bit-to-symbol mapping
|
|
|
|
uint32_t nsymbols; // number of modulation symbols
|
|
|
|
uint32_t nbits_x_symbol; // number of bits per symbol
|
|
|
|
|
2020-03-02 08:51:00 -08:00
|
|
|
bool byte_tables_init;
|
|
|
|
bpsk_packed_t* symbol_table_bpsk;
|
|
|
|
qpsk_packed_t* symbol_table_qpsk;
|
|
|
|
qam16_packed_t* symbol_table_16qam;
|
2019-12-16 07:04:22 -08:00
|
|
|
} srslte_modem_table_t;
|
2014-01-28 03:41:17 -08:00
|
|
|
|
2015-04-03 05:49:12 -07:00
|
|
|
SRSLTE_API void srslte_modem_table_init(srslte_modem_table_t* q);
|
2014-07-10 05:43:18 -07:00
|
|
|
|
2015-04-03 05:49:12 -07:00
|
|
|
SRSLTE_API void srslte_modem_table_free(srslte_modem_table_t* q);
|
2014-07-10 05:43:18 -07:00
|
|
|
|
2015-04-03 05:49:12 -07:00
|
|
|
SRSLTE_API void srslte_modem_table_reset(srslte_modem_table_t* q);
|
2014-07-10 05:43:18 -07:00
|
|
|
|
2019-12-16 07:04:22 -08:00
|
|
|
SRSLTE_API int srslte_modem_table_set(srslte_modem_table_t* q, cf_t* table, uint32_t nsymbols, uint32_t nbits_x_symbol);
|
2014-07-10 05:43:18 -07:00
|
|
|
|
2019-12-16 07:04:22 -08:00
|
|
|
SRSLTE_API int srslte_modem_table_lte(srslte_modem_table_t* q, srslte_mod_t modulation);
|
2014-01-28 03:41:17 -08:00
|
|
|
|
2019-12-16 07:04:22 -08:00
|
|
|
SRSLTE_API void srslte_modem_table_bytes(srslte_modem_table_t* q);
|
2015-09-18 13:47:37 -07:00
|
|
|
|
2018-03-31 10:04:04 -07:00
|
|
|
#endif // SRSLTE_MODEM_TABLE_H
|