provide follow features implementation:
[o-du/phy.git] / fhi_lib / test / common / common_typedef_xran.h
diff --git a/fhi_lib/test/common/common_typedef_xran.h b/fhi_lib/test/common/common_typedef_xran.h
new file mode 100644 (file)
index 0000000..27202d3
--- /dev/null
@@ -0,0 +1,136 @@
+/******************************************************************************\r
+*\r
+*   Copyright (c) 2019 Intel.\r
+*\r
+*   Licensed under the Apache License, Version 2.0 (the "License");\r
+*   you may not use this file except in compliance with the License.\r
+*   You may obtain a copy of the License at\r
+*\r
+*       http://www.apache.org/licenses/LICENSE-2.0\r
+*\r
+*   Unless required by applicable law or agreed to in writing, software\r
+*   distributed under the License is distributed on an "AS IS" BASIS,\r
+*   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+*   See the License for the specific language governing permissions and\r
+*   limitations under the License.\r
+*\r
+*******************************************************************************/\r
+\r
+/*! \file common_typedef_xran.h\r
+    \brief  This header file defines those data type both used by eNB and UE.\r
+*/\r
+\r
+#ifndef _COMMON_TYPEDEF_XRAN_H_\r
+#define _COMMON_TYPEDEF_XRAN_H_\r
+\r
+#include <stdint.h>\r
+\r
+#include <stdio.h>\r
+#include <stdbool.h>\r
+\r
+/*!\r
+    \struct COMPLEX32\r
+    \brief Defines 64-bit complex structure; both real part and image part have 32 bit width.\r
+*/\r
+typedef struct {\r
+    float re; /*!< 32-bit real part */\r
+    float im; /*!< 32-bit image part */\r
+} COMPLEX32;\r
+\r
+//! @{\r
+/*!\r
+    \struct complex_int16_t\r
+    \brief Defines 32-bit complex structure; both real part and image part have 16 bit width.\r
+    \brief Same defines as COMPLEX16\r
+*/\r
+typedef struct {\r
+    int16_t re; /*!< 16-bit real part */\r
+    int16_t im; /*!< 16-bit image part */\r
+}complex_int16_t,COMPLEX16;\r
+//! @}\r
+\r
+/*!\r
+    \struct complex_int32_t\r
+    \brief Defines 64-bit complex structure; both real part and image part have 32 bit width.\r
+*/\r
+typedef struct {\r
+    int32_t re; /*!< 32-bit real part */\r
+    int32_t im; /*!< 32-bit image part */\r
+}complex_int32_t;\r
+\r
+/*!\r
+    \struct complex_float\r
+    \brief Defines 64-bit complex structure; both real part and image part have 32 bit width.\r
+*/\r
+typedef struct {\r
+    float re; /*!< 32-bit real part */\r
+    float im; /*!< 32-bit image part */\r
+}complex_float;\r
+\r
+/*!\r
+    \struct complex_double\r
+    \brief Defines 128-bit complex structure; both real part and image part have 64 bit width.\r
+*/\r
+typedef struct {\r
+    double re; /*!< 64-bit real part */\r
+    double im; /*!< 64-bit image part */\r
+}complex_double;\r
+\r
+/*!\r
+    \typedef half\r
+    \brief half is a 16-bit IEEE floating-point standard number format.\r
+    \note In future this will be known as `short float' or `__fp16'.\r
+    \note Older compilers must provide proxy support for it as a plain 16-bit integer\r
+*/\r
+typedef int16_t half;\r
+\r
+/*!\r
+    \struct complex_half\r
+    \brief Defines 32-bit complex structure; both real part and image part have 16 bit width.\r
+*/\r
+typedef struct {\r
+    half re; /*!< 16-bit real part */\r
+    half im; /*!< 16-bit image part */\r
+}complex_half;\r
+\r
+/*!\r
+    \enum instruction_cpu_support\r
+    \brief Define instruction the CPU can support.\r
+*/\r
+typedef enum{\r
+    CPU_GENERIC, /*!< C */\r
+    SSE4_2,      /*!< SSE4_2 */\r
+    AVX,         /*!< AVX */\r
+    AVX2,        /*!< AVX2 */\r
+    AVX_512,     /*!< AVX512 */\r
+}instruction_cpu_support;\r
+\r
+/*!\r
+    \enum bblib_modulation_order\r
+    \brief Common enums for modulation order.\r
+*/\r
+enum bblib_modulation_order {\r
+    BBLIB_BPSK   = 1, /*!< BPSK */\r
+    BBLIB_QPSK   = 2, /*!< QPSK */\r
+    BBLIB_PAM4   = 3, /*!< PAM4 */\r
+    BBLIB_QAM16  = 4, /*!< QAM16 */\r
+    BBLIB_PAM8   = 5, /*!< PAM8 */\r
+    BBLIB_QAM64  = 6, /*!< QAM64 */\r
+    BBLIB_PAM16  = 7, /*!< PAM16 */\r
+    BBLIB_QAM256 = 8  /*!< QAM256 */\r
+};\r
+\r
+\r
+#ifdef _WIN64\r
+#define __align(x) __declspec(align(x))\r
+#else\r
+#define __align(x) __attribute__((aligned(x)))\r
+#define _aligned_malloc(x,y) memalign(y,x)\r
+#endif\r
+\r
+/* Test time and loops for unit test */\r
+#define TIME 40\r
+#define LOOP 30\r
+\r
+#endif /* #ifndef _COMMON_TYPEDEF_H_ */\r
+\r