mirror of https://github.com/pvnis/srsRAN_4G.git
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
67 lines
1.8 KiB
C
67 lines
1.8 KiB
C
4 years ago
|
/**
|
||
11 years ago
|
*
|
||
4 years ago
|
* \section COPYRIGHT
|
||
11 years ago
|
*
|
||
4 years ago
|
* Copyright 2013-2021 Software Radio Systems Limited
|
||
11 years ago
|
*
|
||
4 years ago
|
* 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.
|
||
11 years ago
|
*
|
||
11 years ago
|
*/
|
||
|
|
||
10 years ago
|
/******************************************************************************
|
||
|
* 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
|
||
|
*****************************************************************************/
|
||
11 years ago
|
|
||
4 years ago
|
#ifndef SRSRAN_MODEM_TABLE_H
|
||
|
#define SRSRAN_MODEM_TABLE_H
|
||
11 years ago
|
|
||
|
#include <stdbool.h>
|
||
|
#include <stdint.h>
|
||
|
|
||
4 years ago
|
#include "srsran/config.h"
|
||
|
#include "srsran/phy/common/phy_common.h"
|
||
11 years ago
|
|
||
9 years ago
|
typedef struct {
|
||
|
cf_t symbol[8];
|
||
|
} bpsk_packed_t;
|
||
|
|
||
9 years ago
|
typedef struct {
|
||
|
cf_t symbol[4];
|
||
|
} qpsk_packed_t;
|
||
|
|
||
|
typedef struct {
|
||
|
cf_t symbol[2];
|
||
|
} qam16_packed_t;
|
||
|
|
||
4 years ago
|
typedef struct SRSRAN_API {
|
||
5 years ago
|
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
|
||
|
|
||
5 years ago
|
bool byte_tables_init;
|
||
|
bpsk_packed_t* symbol_table_bpsk;
|
||
|
qpsk_packed_t* symbol_table_qpsk;
|
||
|
qam16_packed_t* symbol_table_16qam;
|
||
4 years ago
|
} srsran_modem_table_t;
|
||
11 years ago
|
|
||
4 years ago
|
SRSRAN_API void srsran_modem_table_init(srsran_modem_table_t* q);
|
||
11 years ago
|
|
||
4 years ago
|
SRSRAN_API void srsran_modem_table_free(srsran_modem_table_t* q);
|
||
11 years ago
|
|
||
4 years ago
|
SRSRAN_API void srsran_modem_table_reset(srsran_modem_table_t* q);
|
||
11 years ago
|
|
||
4 years ago
|
SRSRAN_API int srsran_modem_table_set(srsran_modem_table_t* q, cf_t* table, uint32_t nsymbols, uint32_t nbits_x_symbol);
|
||
11 years ago
|
|
||
4 years ago
|
SRSRAN_API int srsran_modem_table_lte(srsran_modem_table_t* q, srsran_mod_t modulation);
|
||
11 years ago
|
|
||
4 years ago
|
SRSRAN_API void srsran_modem_table_bytes(srsran_modem_table_t* q);
|
||
9 years ago
|
|
||
4 years ago
|
#endif // SRSRAN_MODEM_TABLE_H
|