1 /******************************************************************************
3 * Copyright (c) 2020 Intel.
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
9 * http://www.apache.org/licenses/LICENSE-2.0
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
17 *******************************************************************************/
23 \struct bblib_llr_demapping_5gnr_mod_compression_request
24 \brief Structure defining modulation compression lib.
27 enum xran_modulation_order {
28 XRAN_BPSK = 1, /*!< BPSK */
29 XRAN_QPSK = 2, /*!< QPSK */
30 XRAN_PAM4 = 3, /*!< PAM4 */
31 XRAN_QAM16 = 4, /*!< QAM16 */
32 XRAN_PAM8 = 5, /*!< PAM8 */
33 XRAN_QAM64 = 6, /*!< QAM64 */
34 XRAN_PAM16 = 7, /*!< PAM16 */
35 XRAN_QAM256 = 8 /*!< QAM256 */
38 struct xranlib_5gnr_mod_compression_request
40 /*! Pointer to buffer of the input symbols - buffer must be 64 byte aligned. Format 16Sx. */
42 /*! 16bit shift value used to scale the input samples. */
44 /*! Supported modulation values are: 2 (QPSK), 4 (16QAM), 6 (64QAM), 8 (256QAM). */
45 enum xran_modulation_order modulation;
46 int32_t num_symbols; /*!< Number of complex input symbols. */
47 int16_t re_mask; /*!< RE mask in one RB. */
51 \struct bblib_llr_demapping_5gnr_mod_compression_response
52 \brief Structure defining the modualtion compression output.
54 struct xranlib_5gnr_mod_compression_response
56 /*! Pointer to output buffer - buffer should be 64 byte aligned.bit sequence*/
57 int8_t * data_out; /*!< Pointer to data after compression. */
58 int32_t len_out; /*!< Length of output data in bytes. */
61 struct xranlib_5gnr_mod_decompression_request
63 /*! Pointer to buffer of the input symbols - buffer must be 64 byte aligned. Format 16Sx. */
65 /*! 16bit shift value used to scale the input samples. */
67 /*! Supported modulation values are: 2 (QPSK), 4 (16QAM), 6 (64QAM), 8 (256QAM). */
68 enum xran_modulation_order modulation;
69 int32_t num_symbols; /*!< Number of complex input symbols. */
70 int16_t re_mask; /*!< RE mask in one RB. */
74 \struct bblib_llr_demapping_5gnr_mod_compression_response
75 \brief Structure defining the modualtion compression output.
77 struct xranlib_5gnr_mod_decompression_response
79 /*! Pointer to output buffer - buffer should be 64 byte aligned.bit sequence*/
80 int16_t * data_out; /*!< Pointer to data after compression. */
81 int32_t len_out; /*!< Length of output data in bytes. */
85 /*! \brief modulation compression procedures.
87 int xranlib_5gnr_mod_compression(const struct xranlib_5gnr_mod_compression_request* request,
88 struct xranlib_5gnr_mod_compression_response* response);
89 int xranlib_5gnr_mod_compression_avx512(const struct xranlib_5gnr_mod_compression_request* request,
90 struct xranlib_5gnr_mod_compression_response* response);
91 int xranlib_5gnr_mod_compression_snc(const struct xranlib_5gnr_mod_compression_request* request,
92 struct xranlib_5gnr_mod_compression_response* response);
93 int xranlib_5gnr_mod_compression_c(const struct xranlib_5gnr_mod_compression_request* request,
94 struct xranlib_5gnr_mod_compression_response* response);
95 int xranlib_5gnr_mod_decompression(const struct xranlib_5gnr_mod_decompression_request* request,
96 struct xranlib_5gnr_mod_decompression_response* response);