Commit 40f55fa9 authored by frtabu's avatar frtabu

add kissfft as a possible fft implementation

parent 3a7ac982
...@@ -1415,7 +1415,14 @@ add_library(ldpc MODULE ${PHY_LDPC_OPTIM8SEGMULTI_SRC} ) ...@@ -1415,7 +1415,14 @@ add_library(ldpc MODULE ${PHY_LDPC_OPTIM8SEGMULTI_SRC} )
add_library(coding MODULE ${PHY_TURBOSRC} ) add_library(coding MODULE ${PHY_TURBOSRC} )
add_library(dfts MODULE ${OPENAIR1_DIR}/PHY/TOOLS/oai_dfts.c ) add_library(dfts MODULE ${OPENAIR1_DIR}/PHY/TOOLS/oai_dfts.c )
set(KISSFFT_DIR ${OPENAIR_DIR}/kiss_fft130)
add_library(dfts_fpkiss MODULE ${OPENAIR1_DIR}/PHY/TOOLS/oai_kissdfts.c ${KISSFFT_DIR}/kiss_fft.c)
target_compile_definitions(dfts_fpkiss PUBLIC -DFIXED_POINT=16 )
target_compile_options(dfts_fpkiss PUBLIC -O3 -mtune=native -ffast-math -fomit-frame-pointer -dA -fverbose-asm )
add_library(dfts_flkiss MODULE ${OPENAIR1_DIR}/PHY/TOOLS/oai_kissdfts.c ${KISSFFT_DIR}/kiss_fft.c)
target_compile_definitions(dfts_fpkiss PUBLIC )
target_compile_options(dfts_fpkiss PUBLIC -O3 -mtune=native -ffast-math -fomit-frame-pointer -dA -fverbose-asm )
set(PHY_SRC_COMMON set(PHY_SRC_COMMON
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/dci_tools_common.c ${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/dci_tools_common.c
......
...@@ -67,7 +67,7 @@ UE_TIMING_TRACE="False" ...@@ -67,7 +67,7 @@ UE_TIMING_TRACE="False"
USRP_REC_PLAY="False" USRP_REC_PLAY="False"
BUILD_ECLIPSE=0 BUILD_ECLIPSE=0
NR="False" NR="False"
OPTIONAL_LIBRARIES="telnetsrv enbscope uescope nrscope msc" OPTIONAL_LIBRARIES="telnetsrv enbscope uescope nrscope msc dfts_fpkiss dfts_flkiss"
trap handle_ctrl_c INT trap handle_ctrl_c INT
function print_help() { function print_help() {
......
...@@ -32,6 +32,7 @@ ...@@ -32,6 +32,7 @@
#define M_PI 3.14159265358979323846 #define M_PI 3.14159265358979323846
#endif #endif
#define OAIDFTS_MAIN #define OAIDFTS_MAIN
#define OAIDFTS_LIB
#ifndef MR_MAIN #ifndef MR_MAIN
#include "PHY/defs_common.h" #include "PHY/defs_common.h"
#include "PHY/impl_defs_top.h" #include "PHY/impl_defs_top.h"
......
...@@ -261,23 +261,26 @@ void idft36864(int16_t *sigF,int16_t *sig,uint8_t scale_flag); ...@@ -261,23 +261,26 @@ void idft36864(int16_t *sigF,int16_t *sig,uint8_t scale_flag);
void idft49152(int16_t *sigF,int16_t *sig,uint8_t scale_flag); void idft49152(int16_t *sigF,int16_t *sig,uint8_t scale_flag);
void idft73728(int16_t *sigF,int16_t *sig,uint8_t scale_flag); void idft73728(int16_t *sigF,int16_t *sig,uint8_t scale_flag);
void idft98304(int16_t *sigF,int16_t *sig,uint8_t scale_flag); void idft98304(int16_t *sigF,int16_t *sig,uint8_t scale_flag);
#endif
#else typedef void(*dftfunc_t)(uint8_t sizeidx,int16_t *sigF,int16_t *sig,unsigned char scale_flag);
typedef void(*dftfunc_t)(uint8_t sizeidx,int16_t *sigF,int16_t *sig,unsigned char scale_flag); typedef void(*idftfunc_t)(uint8_t sizeidx,int16_t *sigF,int16_t *sig,unsigned char scale_flag);
typedef void(*idftfunc_t)(uint8_t sizeidx,int16_t *sigF,int16_t *sig,unsigned char scale_flag);
# ifdef OAIDFTS_LOADER #ifdef OAIDFTS_LOADER
dftfunc_t dft; dftfunc_t dft;
idftfunc_t idft; idftfunc_t idft;
# else #else
# ifndef OAIDFTS_LIB
extern dftfunc_t dft; extern dftfunc_t dft;
extern idftfunc_t idft; extern idftfunc_t idft;
extern int load_dftslib(void); extern int load_dftslib(void);
# endif # endif
#endif #endif
typedef enum DFT_size_idx { typedef enum DFT_size_idx {
DFT_12, DFT_24, DFT_36, DFT_48, DFT_60, DFT_72, DFT_96, DFT_12, DFT_24, DFT_36, DFT_48, DFT_60, DFT_72, DFT_96,
DFT_108, DFT_120, DFT_128, DFT_144, DFT_180, DFT_192, DFT_216, DFT_240, DFT_108, DFT_120, DFT_128, DFT_144, DFT_180, DFT_192, DFT_216, DFT_240,
...@@ -289,6 +292,16 @@ typedef enum DFT_size_idx { ...@@ -289,6 +292,16 @@ typedef enum DFT_size_idx {
DFT_SIZE_IDXTABLESIZE DFT_SIZE_IDXTABLESIZE
} dft_size_idx_t; } dft_size_idx_t;
#define DFT_SIZES {\
12, 24, 36, 48, 60, 72, 96,\
108, 120, 128, 144, 180, 192, 216, 240,\
256, 288, 300, 324, 360, 384, 432, 480,\
512, 540, 576, 600, 648, 720, 768, 864,\
900, 960, 972, 1024, 1080, 1152, 1200, 1536,\
2048, 3072, 4096, 6144, 8192 ,9216, 12288, 18432,\
24576, 36864, 49152,73728, 98304}
#ifdef OAIDFTS_MAIN #ifdef OAIDFTS_MAIN
adftfunc_t dft_ftab[]={ adftfunc_t dft_ftab[]={
dft12, dft24, dft36, dft48, dft60, dft72, dft96, dft12, dft24, dft36, dft48, dft60, dft72, dft96,
...@@ -307,6 +320,12 @@ typedef enum idft_size_idx { ...@@ -307,6 +320,12 @@ typedef enum idft_size_idx {
IDFT_73728, IDFT_98304, IDFT_73728, IDFT_98304,
IDFT_SIZE_IDXTABLESIZE IDFT_SIZE_IDXTABLESIZE
} idft_size_idx_t; } idft_size_idx_t;
#define IDFT_SIZES {\
128, 256, 512, 1024, 1536, 2048, 3072, 4096,\
6144, 8192, 9216, 12288, 18432, 24576, 36864, 49152,\
73728, 98304}
#ifdef OAIDFTS_MAIN #ifdef OAIDFTS_MAIN
aidftfunc_t idft_ftab[]={ aidftfunc_t idft_ftab[]={
idft128, idft256, idft512, idft1024, idft1536, idft2048, idft3072, idft4096, idft128, idft256, idft512, idft1024, idft1536, idft2048, idft3072, idft4096,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment