Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-RAN
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
常顺宇
OpenXG-RAN
Commits
e0c85c4b
Commit
e0c85c4b
authored
May 13, 2021
by
cucengineer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cuFFT main ok
parent
a07b5eb7
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
63 additions
and
1 deletion
+63
-1
executables/nr-softmodem.c
executables/nr-softmodem.c
+10
-0
executables/nr-uesoftmodem.c
executables/nr-uesoftmodem.c
+9
-0
openair1/PHY/CODING/nrLDPC_defs.h
openair1/PHY/CODING/nrLDPC_defs.h
+1
-0
openair1/PHY/CODING/nrLDPC_extern.h
openair1/PHY/CODING/nrLDPC_extern.h
+5
-0
openair1/PHY/CODING/nrLDPC_load.c
openair1/PHY/CODING/nrLDPC_load.c
+25
-0
openair1/PHY/TOOLS/oai_dfts.c
openair1/PHY/TOOLS/oai_dfts.c
+11
-0
openair1/PHY/TOOLS/tools_defs.h
openair1/PHY/TOOLS/tools_defs.h
+2
-1
targets/PROJECTS/GENERIC-NR-5GC/CONF/cuFFT.so
targets/PROJECTS/GENERIC-NR-5GC/CONF/cuFFT.so
+0
-0
No files found.
executables/nr-softmodem.c
View file @
e0c85c4b
...
...
@@ -724,6 +724,16 @@ int main( int argc, char **argv )
init_opt
();
load_cuFFT
();
int32_t
a
[
2048
]
=
{
1
};
int32_t
*
b
=
(
int32_t
*
)
malloc
(
2048
*
sizeof
(
int32_t
));
int
i
;
for
(
i
=
0
;
i
<
2048
;
i
++
)
{
a
[
i
]
=
2048
-
i
;
}
cudft204
((
int16_t
*
)
a
,(
int16_t
*
)
b
,
1
);
cudft2048
((
int16_t
*
)
a
,(
int16_t
*
)
b
,
1
);
#ifdef PDCP_USE_NETLINK
...
...
executables/nr-uesoftmodem.c
View file @
e0c85c4b
...
...
@@ -441,6 +441,15 @@ int main( int argc, char **argv ) {
init_opt
()
;
load_nrLDPClib
();
load_cuFFT
();
// int16_t a[2048] = {1};
// int16_t *b = (int16_t *)malloc(2048 * sizeof(int16_t));
// int i;
// for (i = 0; i < 2048; i++)
// {
// a[i]= 2048-i;
// }
// cudft2048(a,b,1);
if
(
ouput_vcd
)
{
vcd_signal_dumper_init
(
"/tmp/openair_dump_nrUE.vcd"
);
...
...
openair1/PHY/CODING/nrLDPC_defs.h
View file @
e0c85c4b
...
...
@@ -56,4 +56,5 @@ typedef int(*nrLDPC_encoderfunc_t)(unsigned char **,unsigned char **,int,int,sho
\param p_profiler LDPC profiler statistics
*/
typedef
int32_t
(
*
nrLDPC_decoderfunc_t
)(
t_nrLDPC_dec_params
*
,
int8_t
*
,
int8_t
*
,
t_nrLDPC_procBuf
*
,
t_nrLDPC_time_stats
*
);
typedef
void
(
*
cudft_EnTx
)(
int16_t
*
,
int16_t
*
,
unsigned
char
);
#endif
\ No newline at end of file
openair1/PHY/CODING/nrLDPC_extern.h
View file @
e0c85c4b
...
...
@@ -23,13 +23,18 @@
#ifdef LDPC_LOADER
nrLDPC_decoderfunc_t
nrLDPC_decoder
;
nrLDPC_encoderfunc_t
nrLDPC_encoder
;
cudft_EnTx
cudft2048
;
cudft_EnTx
cudft204
;
#else
/* functions to load the LDPC shared lib, implemented in openair1/PHY/CODING/nrLDPC_load.c */
extern
int
load_nrLDPClib
(
void
)
;
extern
int
load_nrLDPClib_ref
(
char
*
libversion
,
nrLDPC_encoderfunc_t
*
nrLDPC_encoder_ptr
);
// for ldpctest
/* ldpc coder/decoder functions, as loaded by load_nrLDPClib(). */
extern
int
load_cuFFT
(
void
)
;
extern
nrLDPC_decoderfunc_t
nrLDPC_decoder
;
extern
nrLDPC_encoderfunc_t
nrLDPC_encoder
;
extern
cudft_EnTx
cudft2048
;
extern
cudft_EnTx
cudft204
;
// inline functions:
#include "openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_init_mem.h"
#endif
\ No newline at end of file
openair1/PHY/CODING/nrLDPC_load.c
View file @
e0c85c4b
...
...
@@ -39,6 +39,8 @@
#include "PHY/CODING/nrLDPC_extern.h"
#include "common/config/config_userapi.h"
#include "common/utils/load_module_shlib.h"
#include <dlfcn.h>
/* function description array, to be used when loading the encoding/decoding shared lib */
...
...
@@ -73,4 +75,27 @@ int load_nrLDPClib_ref(char *libversion, nrLDPC_encoderfunc_t * nrLDPC_encoder_p
return
0
;
}
int
load_cuFFT
(
void
)
{
//手动加载指定位置的so动态库
void
*
handle
=
dlopen
(
"../../../targets/PROJECTS/GENERIC-NR-5GC/CONF/cuFFT.so"
,
RTLD_LAZY
|
RTLD_NODELETE
|
RTLD_GLOBAL
);
if
(
!
handle
){
printf
(
"open cuFFT.so error!
\n
"
);
return
-
1
;
}
//根据动态链接库操作句柄与符号,返回符号对应的地址
cudft2048
=
(
cudft_EnTx
)
dlsym
(
handle
,
"_Z9cudft2048PsS_h"
);
if
(
!
cudft2048
){
printf
(
"cuFFT.so error!
\n
"
);
dlclose
(
handle
);
return
-
1
;
}
cudft204
=
(
cudft_EnTx
)
dlsym
(
handle
,
"_Z8testtestPsS_h"
);
if
(
!
cudft204
){
printf
(
"cutest.so error!
\n
"
);
dlclose
(
handle
);
return
-
1
;
}
return
0
;
}
openair1/PHY/TOOLS/oai_dfts.c
View file @
e0c85c4b
...
...
@@ -10627,6 +10627,17 @@ int dfts_autoinit(void)
void
dft
(
uint8_t
sizeidx
,
int16_t
*
sigF
,
int16_t
*
sig
,
unsigned
char
scale_flag
){
AssertFatal
((
sizeidx
>=
0
&&
sizeidx
<
(
int
)
DFT_SIZE_IDXTABLESIZE
),
"Invalid dft size index %i
\n
"
,
sizeidx
);
dft_ftab
[
sizeidx
](
sigF
,
sig
,
scale_flag
);
static
int
cu_2048
=
1
;
if
(
sizeidx
==
DFT_2048
&&
cu_2048
<
5
)
{
cu_2048
++
;
int
i
;
printf
(
"hs111111111111111111111111111111111111111111111:
\n
"
);
for
(
i
=
0
;
i
<
1024
;
i
++
)
{
printf
(
"a=%d + %dj
\t
b=%d + %dj
\n
"
,
sigF
[
i
*
2
],
sigF
[
i
*
2
+
1
],
sig
[
i
*
2
],
sig
[
i
*
2
+
1
]);
}
}
};
void
idft
(
uint8_t
sizeidx
,
int16_t
*
sigF
,
int16_t
*
sig
,
unsigned
char
scale_flag
){
...
...
openair1/PHY/TOOLS/tools_defs.h
View file @
e0c85c4b
...
...
@@ -262,6 +262,7 @@ void dft36864(int16_t *x,int16_t *y,uint8_t scale_flag);
void
dft49152
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
dft73728
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
dft98304
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
extern
void
cudft2048
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
idft64
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
...
...
@@ -321,7 +322,7 @@ adftfunc_t dft_ftab[]={
dft512
,
dft540
,
dft576
,
dft600
,
dft648
,
dft720
,
dft768
,
dft864
,
dft900
,
dft960
,
dft972
,
dft1024
,
dft1080
,
dft1152
,
dft1200
,
dft1296
,
dft1440
,
dft1500
,
dft1536
,
dft1620
,
dft1728
,
dft1800
,
dft1920
,
dft1944
,
dft2048
,
dft2160
,
dft2304
,
dft2400
,
dft2592
,
dft2700
,
dft2880
,
dft2916
,
cu
dft2048
,
dft2160
,
dft2304
,
dft2400
,
dft2592
,
dft2700
,
dft2880
,
dft2916
,
dft3000
,
dft3072
,
dft3240
,
dft4096
,
dft6144
,
dft8192
,
dft9216
,
dft12288
,
dft18432
,
dft24576
,
dft36864
,
dft49152
,
dft73728
,
dft98304
};
...
...
targets/PROJECTS/GENERIC-NR-5GC/CONF/cuFFT.so
0 → 100755
View file @
e0c85c4b
File added
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment