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
wangjie
OpenXG-RAN
Commits
296494ea
Commit
296494ea
authored
Mar 30, 2020
by
frtabu
Committed by
oai
Mar 30, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
create dft shared lib
parent
82e97fce
Changes
11
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
494 additions
and
316 deletions
+494
-316
cmake_targets/CMakeLists.txt
cmake_targets/CMakeLists.txt
+5
-1
openair1/PHY/LTE_ESTIMATION/lte_adjust_sync_eNB.c
openair1/PHY/LTE_ESTIMATION/lte_adjust_sync_eNB.c
+4
-4
openair1/PHY/LTE_ESTIMATION/lte_sync_time.c
openair1/PHY/LTE_ESTIMATION/lte_sync_time.c
+20
-20
openair1/PHY/LTE_ESTIMATION/lte_ul_channel_estimation.c
openair1/PHY/LTE_ESTIMATION/lte_ul_channel_estimation.c
+8
-8
openair1/PHY/LTE_TRANSPORT/prach.c
openair1/PHY/LTE_TRANSPORT/prach.c
+23
-23
openair1/PHY/LTE_TRANSPORT/ulsch_demodulation.c
openair1/PHY/LTE_TRANSPORT/ulsch_demodulation.c
+102
-102
openair1/PHY/MODULATION/ofdm_mod.c
openair1/PHY/MODULATION/ofdm_mod.c
+12
-12
openair1/PHY/MODULATION/slot_fep_nr.c
openair1/PHY/MODULATION/slot_fep_nr.c
+25
-25
openair1/PHY/MODULATION/slot_fep_ul.c
openair1/PHY/MODULATION/slot_fep_ul.c
+11
-11
openair1/PHY/TOOLS/oai_dfts.c
openair1/PHY/TOOLS/oai_dfts.c
+67
-48
openair1/PHY/TOOLS/tools_defs.h
openair1/PHY/TOOLS/tools_defs.h
+217
-62
No files found.
cmake_targets/CMakeLists.txt
View file @
296494ea
...
@@ -1327,6 +1327,9 @@ add_library(ldpc MODULE ${PHY_LDPC_OPTIM8SEGMULTI_SRC} )
...
@@ -1327,6 +1327,9 @@ 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
)
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
${
OPENAIR1_DIR
}
/PHY/LTE_TRANSPORT/lte_mcs.c
${
OPENAIR1_DIR
}
/PHY/LTE_TRANSPORT/lte_mcs.c
...
@@ -1368,7 +1371,7 @@ set(PHY_SRC_COMMON
...
@@ -1368,7 +1371,7 @@ set(PHY_SRC_COMMON
${
OPENAIR1_DIR
}
/PHY/INIT/lte_parms.c
${
OPENAIR1_DIR
}
/PHY/INIT/lte_parms.c
${
OPENAIR1_DIR
}
/PHY/INIT/lte_param_init.c
${
OPENAIR1_DIR
}
/PHY/INIT/lte_param_init.c
${
OPENAIR1_DIR
}
/PHY/TOOLS/cadd_vv.c
${
OPENAIR1_DIR
}
/PHY/TOOLS/cadd_vv.c
${
OPENAIR1_DIR
}
/PHY/TOOLS/lte_dfts.c
#
${OPENAIR1_DIR}/PHY/TOOLS/lte_dfts.c
${
OPENAIR1_DIR
}
/PHY/TOOLS/log2_approx.c
${
OPENAIR1_DIR
}
/PHY/TOOLS/log2_approx.c
${
OPENAIR1_DIR
}
/PHY/TOOLS/cmult_sv.c
${
OPENAIR1_DIR
}
/PHY/TOOLS/cmult_sv.c
${
OPENAIR1_DIR
}
/PHY/TOOLS/cmult_vv.c
${
OPENAIR1_DIR
}
/PHY/TOOLS/cmult_vv.c
...
@@ -1576,6 +1579,7 @@ endif ()
...
@@ -1576,6 +1579,7 @@ endif ()
add_library
(
PHY_COMMON
${
PHY_SRC_COMMON
}
)
add_library
(
PHY_COMMON
${
PHY_SRC_COMMON
}
)
add_dependencies
(
PHY_COMMON rrc_flag
)
add_dependencies
(
PHY_COMMON rrc_flag
)
add_dependencies
(
PHY_COMMON dfts
)
add_library
(
PHY
${
PHY_SRC
}
)
add_library
(
PHY
${
PHY_SRC
}
)
add_dependencies
(
PHY rrc_flag
)
add_dependencies
(
PHY rrc_flag
)
add_library
(
PHY_UE
${
PHY_SRC_UE
}
)
add_library
(
PHY_UE
${
PHY_SRC_UE
}
)
...
...
openair1/PHY/LTE_ESTIMATION/lte_adjust_sync_eNB.c
View file @
296494ea
...
@@ -56,22 +56,22 @@ int lte_est_timing_advance(LTE_DL_FRAME_PARMS *frame_parms,
...
@@ -56,22 +56,22 @@ int lte_est_timing_advance(LTE_DL_FRAME_PARMS *frame_parms,
// do ifft of channel estimate
// do ifft of channel estimate
switch
(
frame_parms
->
N_RB_DL
)
{
switch
(
frame_parms
->
N_RB_DL
)
{
case
6
:
case
6
:
dft
128
(
(
int16_t
*
)
&
lte_eNB_srs
->
srs_ch_estimates
[
aa
][
0
],
dft
(
DFT_128
,
(
int16_t
*
)
&
lte_eNB_srs
->
srs_ch_estimates
[
aa
][
0
],
(
int16_t
*
)
lte_eNB_srs
->
srs_ch_estimates_time
[
aa
],
(
int16_t
*
)
lte_eNB_srs
->
srs_ch_estimates_time
[
aa
],
1
);
1
);
break
;
break
;
case
25
:
case
25
:
dft
512
(
(
int16_t
*
)
&
lte_eNB_srs
->
srs_ch_estimates
[
aa
][
0
],
dft
(
DFT_512
,
(
int16_t
*
)
&
lte_eNB_srs
->
srs_ch_estimates
[
aa
][
0
],
(
int16_t
*
)
lte_eNB_srs
->
srs_ch_estimates_time
[
aa
],
(
int16_t
*
)
lte_eNB_srs
->
srs_ch_estimates_time
[
aa
],
1
);
1
);
break
;
break
;
case
50
:
case
50
:
dft
1024
(
(
int16_t
*
)
&
lte_eNB_srs
->
srs_ch_estimates
[
aa
][
0
],
dft
(
DFT_1024
,
(
int16_t
*
)
&
lte_eNB_srs
->
srs_ch_estimates
[
aa
][
0
],
(
int16_t
*
)
lte_eNB_srs
->
srs_ch_estimates_time
[
aa
],
(
int16_t
*
)
lte_eNB_srs
->
srs_ch_estimates_time
[
aa
],
1
);
1
);
break
;
break
;
case
100
:
case
100
:
dft
2048
(
(
int16_t
*
)
&
lte_eNB_srs
->
srs_ch_estimates
[
aa
][
0
],
dft
(
DFT_2048
,
(
int16_t
*
)
&
lte_eNB_srs
->
srs_ch_estimates
[
aa
][
0
],
(
int16_t
*
)
lte_eNB_srs
->
srs_ch_estimates_time
[
aa
],
(
int16_t
*
)
lte_eNB_srs
->
srs_ch_estimates_time
[
aa
],
1
);
1
);
break
;
break
;
...
...
openair1/PHY/LTE_ESTIMATION/lte_sync_time.c
View file @
296494ea
...
@@ -141,28 +141,28 @@ int lte_sync_time_init(LTE_DL_FRAME_PARMS *frame_parms ) // LTE_UE_COMMON *com
...
@@ -141,28 +141,28 @@ int lte_sync_time_init(LTE_DL_FRAME_PARMS *frame_parms ) // LTE_UE_COMMON *com
switch
(
frame_parms
->
N_RB_DL
)
{
switch
(
frame_parms
->
N_RB_DL
)
{
case
6
:
case
6
:
idft
128
(
(
short
*
)
syncF_tmp
,
/// complex input
idft
(
IDFT_128
,
(
short
*
)
syncF_tmp
,
/// complex input
(
short
*
)
sync_tmp
,
/// complex output
(
short
*
)
sync_tmp
,
/// complex output
1
);
1
);
break
;
break
;
case
25
:
case
25
:
idft
512
(
(
short
*
)
syncF_tmp
,
/// complex input
idft
(
IDFT_512
,
(
short
*
)
syncF_tmp
,
/// complex input
(
short
*
)
sync_tmp
,
/// complex output
(
short
*
)
sync_tmp
,
/// complex output
1
);
1
);
break
;
break
;
case
50
:
case
50
:
idft
1024
(
(
short
*
)
syncF_tmp
,
/// complex input
idft
(
IDFT_1024
,
(
short
*
)
syncF_tmp
,
/// complex input
(
short
*
)
sync_tmp
,
/// complex output
(
short
*
)
sync_tmp
,
/// complex output
1
);
1
);
break
;
break
;
case
75
:
case
75
:
idft
1536
(
(
short
*
)
syncF_tmp
,
/// complex input
idft
(
IDFT_1536
,
(
short
*
)
syncF_tmp
,
/// complex input
(
short
*
)
sync_tmp
,
(
short
*
)
sync_tmp
,
1
);
/// complex output
1
);
/// complex output
break
;
break
;
case
100
:
case
100
:
idft
2048
(
(
short
*
)
syncF_tmp
,
/// complex input
idft
(
IDFT_2048
,
(
short
*
)
syncF_tmp
,
/// complex input
(
short
*
)
sync_tmp
,
/// complex output
(
short
*
)
sync_tmp
,
/// complex output
1
);
1
);
break
;
break
;
...
@@ -189,28 +189,28 @@ int lte_sync_time_init(LTE_DL_FRAME_PARMS *frame_parms ) // LTE_UE_COMMON *com
...
@@ -189,28 +189,28 @@ int lte_sync_time_init(LTE_DL_FRAME_PARMS *frame_parms ) // LTE_UE_COMMON *com
switch
(
frame_parms
->
N_RB_DL
)
{
switch
(
frame_parms
->
N_RB_DL
)
{
case
6
:
case
6
:
idft
128
(
(
short
*
)
syncF_tmp
,
/// complex input
idft
(
IDFT_128
,
(
short
*
)
syncF_tmp
,
/// complex input
(
short
*
)
sync_tmp
,
/// complex output
(
short
*
)
sync_tmp
,
/// complex output
1
);
1
);
break
;
break
;
case
25
:
case
25
:
idft
512
(
(
short
*
)
syncF_tmp
,
/// complex input
idft
(
IDFT_512
,
(
short
*
)
syncF_tmp
,
/// complex input
(
short
*
)
sync_tmp
,
/// complex output
(
short
*
)
sync_tmp
,
/// complex output
1
);
1
);
break
;
break
;
case
50
:
case
50
:
idft
1024
(
(
short
*
)
syncF_tmp
,
/// complex input
idft
(
IDFT_1024
,
(
short
*
)
syncF_tmp
,
/// complex input
(
short
*
)
sync_tmp
,
/// complex output
(
short
*
)
sync_tmp
,
/// complex output
1
);
1
);
break
;
break
;
case
75
:
case
75
:
idft
1536
(
(
short
*
)
syncF_tmp
,
/// complex input
idft
(
IDFT_1536
,
(
short
*
)
syncF_tmp
,
/// complex input
(
short
*
)
sync_tmp
,
/// complex output
(
short
*
)
sync_tmp
,
/// complex output
1
);
1
);
break
;
break
;
case
100
:
case
100
:
idft
2048
(
(
short
*
)
syncF_tmp
,
/// complex input
idft
(
IDFT_2048
,
(
short
*
)
syncF_tmp
,
/// complex input
(
short
*
)
sync_tmp
,
/// complex output
(
short
*
)
sync_tmp
,
/// complex output
1
);
1
);
break
;
break
;
...
@@ -237,28 +237,28 @@ int lte_sync_time_init(LTE_DL_FRAME_PARMS *frame_parms ) // LTE_UE_COMMON *com
...
@@ -237,28 +237,28 @@ int lte_sync_time_init(LTE_DL_FRAME_PARMS *frame_parms ) // LTE_UE_COMMON *com
switch
(
frame_parms
->
N_RB_DL
)
{
switch
(
frame_parms
->
N_RB_DL
)
{
case
6
:
case
6
:
idft
128
(
(
short
*
)
syncF_tmp
,
/// complex input
idft
(
IDFT_128
,
(
short
*
)
syncF_tmp
,
/// complex input
(
short
*
)
sync_tmp
,
/// complex output
(
short
*
)
sync_tmp
,
/// complex output
1
);
1
);
break
;
break
;
case
25
:
case
25
:
idft
512
(
(
short
*
)
syncF_tmp
,
/// complex input
idft
(
IDFT_512
,
(
short
*
)
syncF_tmp
,
/// complex input
(
short
*
)
sync_tmp
,
/// complex output
(
short
*
)
sync_tmp
,
/// complex output
1
);
1
);
break
;
break
;
case
50
:
case
50
:
idft
1024
(
(
short
*
)
syncF_tmp
,
/// complex input
idft
(
IDFT_1024
,
(
short
*
)
syncF_tmp
,
/// complex input
(
short
*
)
sync_tmp
,
/// complex output
(
short
*
)
sync_tmp
,
/// complex output
1
);
1
);
break
;
break
;
case
75
:
case
75
:
idft
1536
(
(
short
*
)
syncF_tmp
,
/// complex input
idft
(
IDFT_1536
,
(
short
*
)
syncF_tmp
,
/// complex input
(
short
*
)
sync_tmp
,
/// complex output
(
short
*
)
sync_tmp
,
/// complex output
1
);
1
);
break
;
break
;
case
100
:
case
100
:
idft
2048
(
(
short
*
)
syncF_tmp
,
/// complex input
idft
(
IDFT_2048
,
(
short
*
)
syncF_tmp
,
/// complex input
(
short
*
)
sync_tmp
,
/// complex output
(
short
*
)
sync_tmp
,
/// complex output
1
);
1
);
break
;
break
;
...
@@ -492,28 +492,28 @@ int ru_sync_time_init(RU_t *ru) // LTE_UE_COMMON *common_vars
...
@@ -492,28 +492,28 @@ int ru_sync_time_init(RU_t *ru) // LTE_UE_COMMON *common_vars
switch
(
ru
->
frame_parms
->
N_RB_DL
)
{
switch
(
ru
->
frame_parms
->
N_RB_DL
)
{
case
6
:
case
6
:
idft
128
(
(
int16_t
*
)(
&
dmrsp
[
0
][
3
*
ru
->
frame_parms
->
ofdm_symbol_size
]),
idft
(
IDFT_128
,
(
int16_t
*
)(
&
dmrsp
[
0
][
3
*
ru
->
frame_parms
->
ofdm_symbol_size
]),
ru
->
dmrssync
,
/// complex output
ru
->
dmrssync
,
/// complex output
1
);
1
);
break
;
break
;
case
25
:
case
25
:
idft
512
(
(
int16_t
*
)(
&
dmrsp
[
0
][
3
*
ru
->
frame_parms
->
ofdm_symbol_size
]),
idft
(
IDFT_512
,
(
int16_t
*
)(
&
dmrsp
[
0
][
3
*
ru
->
frame_parms
->
ofdm_symbol_size
]),
ru
->
dmrssync
,
/// complex output
ru
->
dmrssync
,
/// complex output
1
);
1
);
break
;
break
;
case
50
:
case
50
:
idft
1024
(
(
int16_t
*
)(
&
dmrsp
[
0
][
3
*
ru
->
frame_parms
->
ofdm_symbol_size
]),
idft
(
IDFT_1024
,
(
int16_t
*
)(
&
dmrsp
[
0
][
3
*
ru
->
frame_parms
->
ofdm_symbol_size
]),
ru
->
dmrssync
,
/// complex output
ru
->
dmrssync
,
/// complex output
1
);
1
);
break
;
break
;
case
75
:
case
75
:
idft
1536
(
(
int16_t
*
)(
&
dmrsp
[
0
][
3
*
ru
->
frame_parms
->
ofdm_symbol_size
]),
idft
(
IDFT_1536
,
(
int16_t
*
)(
&
dmrsp
[
0
][
3
*
ru
->
frame_parms
->
ofdm_symbol_size
]),
ru
->
dmrssync
,
ru
->
dmrssync
,
1
);
/// complex output
1
);
/// complex output
break
;
break
;
case
100
:
case
100
:
idft
2048
(
(
int16_t
*
)(
&
dmrsp
[
0
][
3
*
ru
->
frame_parms
->
ofdm_symbol_size
]),
idft
(
IDFT_2048
,
(
int16_t
*
)(
&
dmrsp
[
0
][
3
*
ru
->
frame_parms
->
ofdm_symbol_size
]),
ru
->
dmrssync
,
/// complex output
ru
->
dmrssync
,
/// complex output
1
);
1
);
break
;
break
;
...
...
openair1/PHY/LTE_ESTIMATION/lte_ul_channel_estimation.c
View file @
296494ea
...
@@ -246,25 +246,25 @@ int32_t lte_ul_channel_estimation(PHY_VARS_eNB *eNB,
...
@@ -246,25 +246,25 @@ int32_t lte_ul_channel_estimation(PHY_VARS_eNB *eNB,
switch
(
frame_parms
->
N_RB_DL
)
{
switch
(
frame_parms
->
N_RB_DL
)
{
case
6
:
case
6
:
idft
128
(
(
int16_t
*
)
temp_in_ifft_0
,
idft
(
IDFT_128
,
(
int16_t
*
)
temp_in_ifft_0
,
(
int16_t
*
)
ul_ch_estimates_time
[
aa
],
(
int16_t
*
)
ul_ch_estimates_time
[
aa
],
1
);
1
);
break
;
break
;
case
25
:
case
25
:
idft
512
(
(
int16_t
*
)
temp_in_ifft_0
,
idft
(
IDFT_512
,
(
int16_t
*
)
temp_in_ifft_0
,
(
int16_t
*
)
ul_ch_estimates_time
[
aa
],
(
int16_t
*
)
ul_ch_estimates_time
[
aa
],
1
);
1
);
break
;
break
;
case
50
:
case
50
:
idft
1024
(
(
int16_t
*
)
temp_in_ifft_0
,
idft
(
IDFT_1024
,
(
int16_t
*
)
temp_in_ifft_0
,
(
int16_t
*
)
ul_ch_estimates_time
[
aa
],
(
int16_t
*
)
ul_ch_estimates_time
[
aa
],
1
);
1
);
break
;
break
;
case
100
:
case
100
:
idft
2048
(
(
int16_t
*
)
temp_in_ifft_0
,
idft
(
IDFT_2048
,
(
int16_t
*
)
temp_in_ifft_0
,
(
int16_t
*
)
ul_ch_estimates_time
[
aa
],
(
int16_t
*
)
ul_ch_estimates_time
[
aa
],
1
);
1
);
break
;
break
;
...
@@ -575,25 +575,25 @@ int32_t lte_ul_channel_estimation_RRU(LTE_DL_FRAME_PARMS *frame_parms,
...
@@ -575,25 +575,25 @@ int32_t lte_ul_channel_estimation_RRU(LTE_DL_FRAME_PARMS *frame_parms,
switch
(
frame_parms
->
N_RB_DL
)
{
switch
(
frame_parms
->
N_RB_DL
)
{
case
6
:
case
6
:
idft
128
(
(
int16_t
*
)
temp_in_ifft_0
,
idft
(
IDFT_128
,
(
int16_t
*
)
temp_in_ifft_0
,
(
int16_t
*
)
ul_ch_estimates_time
[
aa
],
(
int16_t
*
)
ul_ch_estimates_time
[
aa
],
1
);
1
);
break
;
break
;
case
25
:
case
25
:
idft
512
(
(
int16_t
*
)
temp_in_ifft_0
,
idft
(
IDFT_512
,
(
int16_t
*
)
temp_in_ifft_0
,
(
int16_t
*
)
ul_ch_estimates_time
[
aa
],
(
int16_t
*
)
ul_ch_estimates_time
[
aa
],
1
);
1
);
break
;
break
;
case
50
:
case
50
:
idft
1024
(
(
int16_t
*
)
temp_in_ifft_0
,
idft
(
IDFT_1024
,
(
int16_t
*
)
temp_in_ifft_0
,
(
int16_t
*
)
ul_ch_estimates_time
[
aa
],
(
int16_t
*
)
ul_ch_estimates_time
[
aa
],
1
);
1
);
break
;
break
;
case
100
:
case
100
:
idft
2048
(
(
int16_t
*
)
temp_in_ifft_0
,
idft
(
IDFT_2048
,
(
int16_t
*
)
temp_in_ifft_0
,
(
int16_t
*
)
ul_ch_estimates_time
[
aa
],
(
int16_t
*
)
ul_ch_estimates_time
[
aa
],
1
);
1
);
break
;
break
;
...
...
openair1/PHY/LTE_TRANSPORT/prach.c
View file @
296494ea
...
@@ -298,24 +298,24 @@ void rx_prach0(PHY_VARS_eNB *eNB,
...
@@ -298,24 +298,24 @@ void rx_prach0(PHY_VARS_eNB *eNB,
switch
(
fp
->
N_RB_UL
)
{
switch
(
fp
->
N_RB_UL
)
{
case
6
:
case
6
:
if
(
prach_fmt
==
4
)
{
if
(
prach_fmt
==
4
)
{
dft
256
(
prach2
,
rxsigF
[
aa
],
1
);
dft
(
DFT_256
,
prach2
,
rxsigF
[
aa
],
1
);
}
else
{
}
else
{
dft
1536
(
prach2
,
rxsigF
[
aa
],
1
);
dft
(
DFT_1536
,
prach2
,
rxsigF
[
aa
],
1
);
if
(
prach_fmt
>
1
)
if
(
prach_fmt
>
1
)
dft
1536
(
prach2
+
3072
,
rxsigF
[
aa
]
+
3072
,
1
);
dft
(
DFT_1536
,
prach2
+
3072
,
rxsigF
[
aa
]
+
3072
,
1
);
}
}
break
;
break
;
case
15
:
case
15
:
if
(
prach_fmt
==
4
)
{
if
(
prach_fmt
==
4
)
{
dft
256
(
prach2
,
rxsigF
[
aa
],
1
);
dft
(
DFT_256
,
prach2
,
rxsigF
[
aa
],
1
);
}
else
{
}
else
{
dft
3072
(
prach2
,
rxsigF
[
aa
],
1
);
dft
(
DFT_3072
,
prach2
,
rxsigF
[
aa
],
1
);
if
(
prach_fmt
>
1
)
if
(
prach_fmt
>
1
)
dft
3072
(
prach2
+
6144
,
rxsigF
[
aa
]
+
6144
,
1
);
dft
(
DFT_3072
,
prach2
+
6144
,
rxsigF
[
aa
]
+
6144
,
1
);
}
}
break
;
break
;
...
@@ -323,13 +323,13 @@ void rx_prach0(PHY_VARS_eNB *eNB,
...
@@ -323,13 +323,13 @@ void rx_prach0(PHY_VARS_eNB *eNB,
case
25
:
case
25
:
default:
default:
if
(
prach_fmt
==
4
)
{
if
(
prach_fmt
==
4
)
{
dft
1024
(
prach2
,
rxsigF
[
aa
],
1
);
dft
(
DFT_1024
,
prach2
,
rxsigF
[
aa
],
1
);
fft_size
=
1024
;
fft_size
=
1024
;
}
else
{
}
else
{
dft
6144
(
prach2
,
rxsigF
[
aa
],
1
);
dft
(
DFT_6144
,
prach2
,
rxsigF
[
aa
],
1
);
if
(
prach_fmt
>
1
)
if
(
prach_fmt
>
1
)
dft
6144
(
prach2
+
12288
,
rxsigF
[
aa
]
+
12288
,
1
);
dft
(
DFT_6144
,
prach2
+
12288
,
rxsigF
[
aa
]
+
12288
,
1
);
fft_size
=
6144
;
fft_size
=
6144
;
}
}
...
@@ -338,24 +338,24 @@ void rx_prach0(PHY_VARS_eNB *eNB,
...
@@ -338,24 +338,24 @@ void rx_prach0(PHY_VARS_eNB *eNB,
case
50
:
case
50
:
if
(
prach_fmt
==
4
)
{
if
(
prach_fmt
==
4
)
{
dft
2048
(
prach2
,
rxsigF
[
aa
],
1
);
dft
(
DFT_2048
,
prach2
,
rxsigF
[
aa
],
1
);
}
else
{
}
else
{
dft
12288
(
prach2
,
rxsigF
[
aa
],
1
);
dft
(
DFT_12288
,
prach2
,
rxsigF
[
aa
],
1
);
if
(
prach_fmt
>
1
)
if
(
prach_fmt
>
1
)
dft
12288
(
prach2
+
24576
,
rxsigF
[
aa
]
+
24576
,
1
);
dft
(
DFT_12288
,
prach2
+
24576
,
rxsigF
[
aa
]
+
24576
,
1
);
}
}
break
;
break
;
case
75
:
case
75
:
if
(
prach_fmt
==
4
)
{
if
(
prach_fmt
==
4
)
{
dft
3072
(
prach2
,
rxsigF
[
aa
],
1
);
dft
(
DFT_3072
,
prach2
,
rxsigF
[
aa
],
1
);
}
else
{
}
else
{
dft
18432
(
prach2
,
rxsigF
[
aa
],
1
);
dft
(
DFT_18432
,
prach2
,
rxsigF
[
aa
],
1
);
if
(
prach_fmt
>
1
)
if
(
prach_fmt
>
1
)
dft
18432
(
prach2
+
36864
,
rxsigF
[
aa
]
+
36864
,
1
);
dft
(
DFT_18432
,
prach2
+
36864
,
rxsigF
[
aa
]
+
36864
,
1
);
}
}
break
;
break
;
...
@@ -363,21 +363,21 @@ void rx_prach0(PHY_VARS_eNB *eNB,
...
@@ -363,21 +363,21 @@ void rx_prach0(PHY_VARS_eNB *eNB,
case
100
:
case
100
:
if
(
fp
->
threequarter_fs
==
0
)
{
if
(
fp
->
threequarter_fs
==
0
)
{
if
(
prach_fmt
==
4
)
{
if
(
prach_fmt
==
4
)
{
dft
4096
(
prach2
,
rxsigF
[
aa
],
1
);
dft
(
DFT_4096
,
prach2
,
rxsigF
[
aa
],
1
);
}
else
{
}
else
{
dft
24576
(
prach2
,
rxsigF
[
aa
],
1
);
dft
(
DFT_24576
,
prach2
,
rxsigF
[
aa
],
1
);
if
(
prach_fmt
>
1
)
if
(
prach_fmt
>
1
)
dft
24576
(
prach2
+
49152
,
rxsigF
[
aa
]
+
49152
,
1
);
dft
(
DFT_24576
,
prach2
+
49152
,
rxsigF
[
aa
]
+
49152
,
1
);
}
}
}
else
{
}
else
{
if
(
prach_fmt
==
4
)
{
if
(
prach_fmt
==
4
)
{
dft
3072
(
prach2
,
rxsigF
[
aa
],
1
);
dft
(
DFT_3072
,
prach2
,
rxsigF
[
aa
],
1
);
}
else
{
}
else
{
dft
18432
(
prach2
,
rxsigF
[
aa
],
1
);
dft
(
DFT_18432
,
prach2
,
rxsigF
[
aa
],
1
);
if
(
prach_fmt
>
1
)
if
(
prach_fmt
>
1
)
dft
18432
(
prach2
+
36864
,
rxsigF
[
aa
]
+
36864
,
1
);
dft
(
DFT_18432
,
prach2
+
36864
,
rxsigF
[
aa
]
+
36864
,
1
);
}
}
}
}
...
@@ -589,13 +589,13 @@ void rx_prach0(PHY_VARS_eNB *eNB,
...
@@ -589,13 +589,13 @@ void rx_prach0(PHY_VARS_eNB *eNB,
// Now do IFFT of size 1024 (N_ZC=839) or 256 (N_ZC=139)
// Now do IFFT of size 1024 (N_ZC=839) or 256 (N_ZC=139)
if
(
N_ZC
==
839
)
{
if
(
N_ZC
==
839
)
{
log2_ifft_size
=
10
;
log2_ifft_size
=
10
;
idft
1024
(
prachF
,
prach_ifft_tmp
,
1
);
idft
(
IDFT_1024
,
prachF
,
prach_ifft_tmp
,
1
);
// compute energy and accumulate over receive antennas and repetitions for BR
// compute energy and accumulate over receive antennas and repetitions for BR
for
(
i
=
0
;
i
<
2048
;
i
++
)
for
(
i
=
0
;
i
<
2048
;
i
++
)
prach_ifft
[
i
]
+=
(
prach_ifft_tmp
[
i
<<
1
]
*
prach_ifft_tmp
[
i
<<
1
]
+
prach_ifft_tmp
[
1
+
(
i
<<
1
)]
*
prach_ifft_tmp
[
1
+
(
i
<<
1
)])
>>
9
;
prach_ifft
[
i
]
+=
(
prach_ifft_tmp
[
i
<<
1
]
*
prach_ifft_tmp
[
i
<<
1
]
+
prach_ifft_tmp
[
1
+
(
i
<<
1
)]
*
prach_ifft_tmp
[
1
+
(
i
<<
1
)])
>>
9
;
}
else
{
}
else
{
idft
256
(
prachF
,
prach_ifft_tmp
,
1
);
idft
(
IDFT_256
,
prachF
,
prach_ifft_tmp
,
1
);
log2_ifft_size
=
8
;
log2_ifft_size
=
8
;
// compute energy and accumulate over receive antennas and repetitions for BR
// compute energy and accumulate over receive antennas and repetitions for BR
...
...
openair1/PHY/LTE_TRANSPORT/ulsch_demodulation.c
View file @
296494ea
This diff is collapsed.
Click to expand it.
openair1/PHY/MODULATION/ofdm_mod.c
View file @
296494ea
...
@@ -95,41 +95,41 @@ void PHY_ofdm_mod(int *input, /// pointer to complex input
...
@@ -95,41 +95,41 @@ void PHY_ofdm_mod(int *input, /// pointer to complex input
volatile
int
*
output_ptr
=
(
int
*
)
0
;
volatile
int
*
output_ptr
=
(
int
*
)
0
;
int
*
temp_ptr
=
(
int
*
)
0
;
int
*
temp_ptr
=
(
int
*
)
0
;
void
(
*
idft
)(
int16_t
*
,
int16_t
*
,
int
)
;
idft_size_idx_t
idftsize
;
switch
(
fftsize
)
{
switch
(
fftsize
)
{
case
128
:
case
128
:
idft
=
idft
128
;
idft
size
=
IDFT_
128
;
break
;
break
;
case
256
:
case
256
:
idft
=
idft
256
;
idft
size
=
IDFT_
256
;
break
;
break
;
case
512
:
case
512
:
idft
=
idft
512
;
idft
size
=
IDFT_
512
;
break
;
break
;
case
1024
:
case
1024
:
idft
=
idft
1024
;
idft
size
=
IDFT_
1024
;
break
;
break
;
case
1536
:
case
1536
:
idft
=
idft
1536
;
idft
size
=
IDFT_
1536
;
break
;
break
;
case
2048
:
case
2048
:
idft
=
idft
2048
;
idft
size
=
IDFT_
2048
;
break
;
break
;
case
3072
:
case
3072
:
idft
=
idft
3072
;
idft
size
=
IDFT_
3072
;
break
;
break
;
case
4096
:
case
4096
:
idft
=
idft
4096
;
idft
size
=
IDFT_
4096
;
break
;
break
;
default:
default:
idft
=
idft
512
;
idft
size
=
IDFT_
512
;
break
;
break
;
}
}
...
@@ -148,12 +148,12 @@ void PHY_ofdm_mod(int *input, /// pointer to complex input
...
@@ -148,12 +148,12 @@ void PHY_ofdm_mod(int *input, /// pointer to complex input
#ifndef __AVX2__
#ifndef __AVX2__
// handle 128-bit alignment for 128-bit SIMD (SSE4,NEON,AltiVEC)
// handle 128-bit alignment for 128-bit SIMD (SSE4,NEON,AltiVEC)
idft
((
int16_t
*
)
&
input
[
i
*
fftsize
],
idft
(
idftsize
,
(
int16_t
*
)
&
input
[
i
*
fftsize
],
(
fftsize
==
128
)
?
(
int16_t
*
)
temp
:
(
int16_t
*
)
&
output
[(
i
*
fftsize
)
+
((
1
+
i
)
*
nb_prefix_samples
)],
(
fftsize
==
128
)
?
(
int16_t
*
)
temp
:
(
int16_t
*
)
&
output
[(
i
*
fftsize
)
+
((
1
+
i
)
*
nb_prefix_samples
)],
1
);
1
);
#else
#else
// on AVX2 need 256-bit alignment
// on AVX2 need 256-bit alignment
idft
((
int16_t
*
)
&
input
[
i
*
fftsize
],
idft
(
idftsize
,
(
int16_t
*
)
&
input
[
i
*
fftsize
],
(
int16_t
*
)
temp
,
(
int16_t
*
)
temp
,
1
);
1
);
...
...
openair1/PHY/MODULATION/slot_fep_nr.c
View file @
296494ea
...
@@ -61,44 +61,44 @@ int nr_slot_fep(PHY_VARS_NR_UE *ue,
...
@@ -61,44 +61,44 @@ int nr_slot_fep(PHY_VARS_NR_UE *ue,
unsigned
int
rx_offset
;
unsigned
int
rx_offset
;
void
(
*
dft
)(
int16_t
*
,
int16_t
*
,
int
)
;
dft_size_idx_t
dftsize
;
int
tmp_dft_in
[
8192
]
__attribute__
((
aligned
(
32
)));
// This is for misalignment issues for 6 and 15 PRBs
int
tmp_dft_in
[
8192
]
__attribute__
((
aligned
(
32
)));
// This is for misalignment issues for 6 and 15 PRBs
switch
(
frame_parms
->
ofdm_symbol_size
)
{
switch
(
frame_parms
->
ofdm_symbol_size
)
{
case
128
:
case
128
:
dft
=
dft
128
;
dft
size
=
DFT_
128
;
break
;
break
;
case
256
:
case
256
:
dft
=
dft
256
;
dft
size
=
DFT_
256
;
break
;
break
;
case
512
:
case
512
:
dft
=
dft
512
;
dft
size
=
DFT_
512
;
break
;
break
;
case
1024
:
case
1024
:
dft
=
dft
1024
;
dft
size
=
DFT_
1024
;
break
;
break
;
case
1536
:
case
1536
:
dft
=
dft
1536
;
dft
size
=
DFT_
1536
;
break
;
break
;
case
2048
:
case
2048
:
dft
=
dft
2048
;
dft
size
=
DFT_
2048
;
break
;
break
;
case
3072
:
case
3072
:
dft
=
dft
3072
;
dft
size
=
DFT_
3072
;
break
;
break
;
case
4096
:
case
4096
:
dft
=
dft
4096
;
dft
size
=
DFT_
4096
;
break
;
break
;
case
8192
:
case
8192
:
dft
=
dft
8192
;
dft
size
=
DFT_
8192
;
break
;
break
;
default:
default:
...
@@ -146,14 +146,14 @@ int nr_slot_fep(PHY_VARS_NR_UE *ue,
...
@@ -146,14 +146,14 @@ int nr_slot_fep(PHY_VARS_NR_UE *ue,
memcpy
((
void
*
)
tmp_dft_in
,
memcpy
((
void
*
)
tmp_dft_in
,
(
void
*
)
&
common_vars
->
rxdata
[
aa
][
rx_offset
%
frame_length_samples
],
(
void
*
)
&
common_vars
->
rxdata
[
aa
][
rx_offset
%
frame_length_samples
],
frame_parms
->
ofdm_symbol_size
*
sizeof
(
int
));
frame_parms
->
ofdm_symbol_size
*
sizeof
(
int
));
dft
((
int16_t
*
)
tmp_dft_in
,
dft
(
dftsize
,
(
int16_t
*
)
tmp_dft_in
,
(
int16_t
*
)
&
common_vars
->
common_vars_rx_data_per_thread
[
ue
->
current_thread_id
[
Ns
]].
rxdataF
[
aa
][
frame_parms
->
ofdm_symbol_size
*
symbol
],
1
);
(
int16_t
*
)
&
common_vars
->
common_vars_rx_data_per_thread
[
ue
->
current_thread_id
[
Ns
]].
rxdataF
[
aa
][
frame_parms
->
ofdm_symbol_size
*
symbol
],
1
);
}
else
{
// use dft input from RX buffer directly
}
else
{
// use dft input from RX buffer directly
#if UE_TIMING_TRACE
#if UE_TIMING_TRACE
start_meas
(
&
ue
->
rx_dft_stats
);
start_meas
(
&
ue
->
rx_dft_stats
);
#endif
#endif
dft
((
int16_t
*
)
&
common_vars
->
rxdata
[
aa
][(
rx_offset
)
%
frame_length_samples
],
dft
(
dftsize
,
(
int16_t
*
)
&
common_vars
->
rxdata
[
aa
][(
rx_offset
)
%
frame_length_samples
],
(
int16_t
*
)
&
common_vars
->
common_vars_rx_data_per_thread
[
ue
->
current_thread_id
[
Ns
]].
rxdataF
[
aa
][
frame_parms
->
ofdm_symbol_size
*
symbol
],
1
);
(
int16_t
*
)
&
common_vars
->
common_vars_rx_data_per_thread
[
ue
->
current_thread_id
[
Ns
]].
rxdataF
[
aa
][
frame_parms
->
ofdm_symbol_size
*
symbol
],
1
);
#if UE_TIMING_TRACE
#if UE_TIMING_TRACE
stop_meas
(
&
ue
->
rx_dft_stats
);
stop_meas
(
&
ue
->
rx_dft_stats
);
...
@@ -176,11 +176,11 @@ int nr_slot_fep(PHY_VARS_NR_UE *ue,
...
@@ -176,11 +176,11 @@ int nr_slot_fep(PHY_VARS_NR_UE *ue,
memcpy
((
void
*
)
tmp_dft_in
,
memcpy
((
void
*
)
tmp_dft_in
,
(
void
*
)
&
common_vars
->
rxdata
[
aa
][(
rx_offset
)
%
frame_length_samples
],
(
void
*
)
&
common_vars
->
rxdata
[
aa
][(
rx_offset
)
%
frame_length_samples
],
frame_parms
->
ofdm_symbol_size
*
sizeof
(
int
));
frame_parms
->
ofdm_symbol_size
*
sizeof
(
int
));
dft
((
int16_t
*
)
tmp_dft_in
,
dft
(
dftsize
,
(
int16_t
*
)
tmp_dft_in
,
(
int16_t
*
)
&
common_vars
->
common_vars_rx_data_per_thread
[
ue
->
current_thread_id
[
Ns
]].
rxdataF
[
aa
][
frame_parms
->
ofdm_symbol_size
*
symbol
],
1
);
(
int16_t
*
)
&
common_vars
->
common_vars_rx_data_per_thread
[
ue
->
current_thread_id
[
Ns
]].
rxdataF
[
aa
][
frame_parms
->
ofdm_symbol_size
*
symbol
],
1
);
}
else
{
// use dft input from RX buffer directly
}
else
{
// use dft input from RX buffer directly
dft
((
int16_t
*
)
&
common_vars
->
rxdata
[
aa
][(
rx_offset
)
%
frame_length_samples
],
dft
(
dftsize
,
(
int16_t
*
)
&
common_vars
->
rxdata
[
aa
][(
rx_offset
)
%
frame_length_samples
],
(
int16_t
*
)
&
common_vars
->
common_vars_rx_data_per_thread
[
ue
->
current_thread_id
[
Ns
]].
rxdataF
[
aa
][
frame_parms
->
ofdm_symbol_size
*
symbol
],
1
);
(
int16_t
*
)
&
common_vars
->
common_vars_rx_data_per_thread
[
ue
->
current_thread_id
[
Ns
]].
rxdataF
[
aa
][
frame_parms
->
ofdm_symbol_size
*
symbol
],
1
);
}
}
#if UE_TIMING_TRACE
#if UE_TIMING_TRACE
...
@@ -218,43 +218,43 @@ int nr_slot_fep_ul(NR_DL_FRAME_PARMS *frame_parms,
...
@@ -218,43 +218,43 @@ int nr_slot_fep_ul(NR_DL_FRAME_PARMS *frame_parms,
unsigned
int
nb_prefix_samples
=
(
no_prefix
?
0
:
frame_parms
->
nb_prefix_samples
);
unsigned
int
nb_prefix_samples
=
(
no_prefix
?
0
:
frame_parms
->
nb_prefix_samples
);
unsigned
int
nb_prefix_samples0
=
(
no_prefix
?
0
:
frame_parms
->
nb_prefix_samples0
);
unsigned
int
nb_prefix_samples0
=
(
no_prefix
?
0
:
frame_parms
->
nb_prefix_samples0
);
void
(
*
dft
)(
int16_t
*
,
int16_t
*
,
int
)
;
dft_size_idx_t
dftsize
;
switch
(
frame_parms
->
ofdm_symbol_size
)
{
switch
(
frame_parms
->
ofdm_symbol_size
)
{
case
128
:
case
128
:
dft
=
dft
128
;
dft
size
=
DFT_
128
;
break
;
break
;
case
256
:
case
256
:
dft
=
dft
256
;
dft
size
=
DFT_
256
;
break
;
break
;
case
512
:
case
512
:
dft
=
dft
512
;
dft
size
=
DFT_
512
;
break
;
break
;
case
1024
:
case
1024
:
dft
=
dft
1024
;
dft
size
=
DFT_
1024
;
break
;
break
;
case
1536
:
case
1536
:
dft
=
dft
1536
;
dft
size
=
DFT_
1536
;
break
;
break
;
case
2048
:
case
2048
:
dft
=
dft
2048
;
dft
size
=
DFT_
2048
;
break
;
break
;
case
4096
:
case
4096
:
dft
=
dft
4096
;
dft
size
=
DFT_
4096
;
break
;
break
;
case
8192
:
case
8192
:
dft
=
dft
8192
;
dft
size
=
DFT_
8192
;
break
;
break
;
default:
default:
dft
=
dft
512
;
dft
size
=
DFT_
512
;
break
;
break
;
}
}
...
@@ -266,7 +266,7 @@ int nr_slot_fep_ul(NR_DL_FRAME_PARMS *frame_parms,
...
@@ -266,7 +266,7 @@ int nr_slot_fep_ul(NR_DL_FRAME_PARMS *frame_parms,
else
else
rxdata_offset
=
slot_offset
+
nb_prefix_samples0
+
(
symbol
*
(
frame_parms
->
ofdm_symbol_size
+
nb_prefix_samples
))
-
SOFFSET
;
rxdata_offset
=
slot_offset
+
nb_prefix_samples0
+
(
symbol
*
(
frame_parms
->
ofdm_symbol_size
+
nb_prefix_samples
))
-
SOFFSET
;
dft
((
int16_t
*
)
&
rxdata
[
rxdata_offset
],
dft
(
dftsize
,
(
int16_t
*
)
&
rxdata
[
rxdata_offset
],
(
int16_t
*
)
&
rxdataF
[
symbol
*
frame_parms
->
ofdm_symbol_size
],
1
);
(
int16_t
*
)
&
rxdataF
[
symbol
*
frame_parms
->
ofdm_symbol_size
],
1
);
return
(
0
);
return
(
0
);
...
...
openair1/PHY/MODULATION/slot_fep_ul.c
View file @
296494ea
...
@@ -44,7 +44,7 @@ int slot_fep_ul(RU_t *ru,
...
@@ -44,7 +44,7 @@ int slot_fep_ul(RU_t *ru,
unsigned
int
slot_offset
;
unsigned
int
slot_offset
;
void
(
*
dft
)(
int16_t
*
,
int16_t
*
,
int
)
;
dft_size_idx_t
dftsize
;
int
tmp_dft_in
[
2048
]
__attribute__
((
aligned
(
32
)));
// This is for misalignment issues for 6 and 15 PRBs
int
tmp_dft_in
[
2048
]
__attribute__
((
aligned
(
32
)));
// This is for misalignment issues for 6 and 15 PRBs
unsigned
int
frame_length_samples
=
fp
->
samples_per_tti
*
10
;
unsigned
int
frame_length_samples
=
fp
->
samples_per_tti
*
10
;
...
@@ -52,31 +52,31 @@ int slot_fep_ul(RU_t *ru,
...
@@ -52,31 +52,31 @@ int slot_fep_ul(RU_t *ru,
switch
(
fp
->
ofdm_symbol_size
)
{
switch
(
fp
->
ofdm_symbol_size
)
{
case
128
:
case
128
:
dft
=
dft
128
;
dft
size
=
DFT_
128
;
break
;
break
;
case
256
:
case
256
:
dft
=
dft
256
;
dft
size
=
DFT_
256
;
break
;
break
;
case
512
:
case
512
:
dft
=
dft
512
;
dft
size
=
DFT_
512
;
break
;
break
;
case
1024
:
case
1024
:
dft
=
dft
1024
;
dft
size
=
DFT_
1024
;
break
;
break
;
case
1536
:
case
1536
:
dft
=
dft
1536
;
dft
size
=
DFT_
1536
;
break
;
break
;
case
2048
:
case
2048
:
dft
=
dft
2048
;
dft
size
=
DFT_
2048
;
break
;
break
;
default:
default:
dft
=
dft
512
;
dft
size
=
DFT_
512
;
break
;
break
;
}
}
...
@@ -109,7 +109,7 @@ int slot_fep_ul(RU_t *ru,
...
@@ -109,7 +109,7 @@ int slot_fep_ul(RU_t *ru,
LOG_D
(
PHY
,
"slot_fep: symbol 0 %d dB
\n
"
,
LOG_D
(
PHY
,
"slot_fep: symbol 0 %d dB
\n
"
,
dB_fixed
(
signal_energy
(
&
common
->
rxdata_7_5kHz
[
aa
][
rx_offset
],
fp
->
ofdm_symbol_size
)));
dB_fixed
(
signal_energy
(
&
common
->
rxdata_7_5kHz
[
aa
][
rx_offset
],
fp
->
ofdm_symbol_size
)));
#endif
#endif
dft
(
(
int16_t
*
)
&
common
->
rxdata_7_5kHz
[
aa
][
rx_offset
],
dft
(
dftsize
,
(
int16_t
*
)
&
common
->
rxdata_7_5kHz
[
aa
][
rx_offset
],
(
int16_t
*
)
&
common
->
rxdataF
[
aa
][
fp
->
ofdm_symbol_size
*
symbol
],
(
int16_t
*
)
&
common
->
rxdataF
[
aa
][
fp
->
ofdm_symbol_size
*
symbol
],
1
1
);
);
...
@@ -121,13 +121,13 @@ int slot_fep_ul(RU_t *ru,
...
@@ -121,13 +121,13 @@ int slot_fep_ul(RU_t *ru,
memcpy
((
void
*
)
&
tmp_dft_in
,
memcpy
((
void
*
)
&
tmp_dft_in
,
(
void
*
)
&
common
->
rxdata_7_5kHz
[
aa
][(
rx_offset
%
frame_length_samples
)],
(
void
*
)
&
common
->
rxdata_7_5kHz
[
aa
][(
rx_offset
%
frame_length_samples
)],
fp
->
ofdm_symbol_size
*
sizeof
(
int
));
fp
->
ofdm_symbol_size
*
sizeof
(
int
));
dft
(
(
short
*
)
tmp_dft_in
,
dft
(
dftsize
,
(
short
*
)
tmp_dft_in
,
(
short
*
)
&
common
->
rxdataF
[
aa
][
fp
->
ofdm_symbol_size
*
symbol
],
(
short
*
)
&
common
->
rxdataF
[
aa
][
fp
->
ofdm_symbol_size
*
symbol
],
1
1
);
);
}
}
else
{
else
{
dft
(
(
short
*
)
&
common
->
rxdata_7_5kHz
[
aa
][
rx_offset
],
dft
(
dftsize
,
(
short
*
)
&
common
->
rxdata_7_5kHz
[
aa
][
rx_offset
],
(
short
*
)
&
common
->
rxdataF
[
aa
][
fp
->
ofdm_symbol_size
*
symbol
],
(
short
*
)
&
common
->
rxdataF
[
aa
][
fp
->
ofdm_symbol_size
*
symbol
],
1
1
);
);
...
...
openair1/PHY/TOOLS/
lte
_dfts.c
→
openair1/PHY/TOOLS/
oai
_dfts.c
View file @
296494ea
This diff is collapsed.
Click to expand it.
openair1/PHY/TOOLS/tools_defs.h
View file @
296494ea
...
@@ -181,29 +181,234 @@ This function performs optimized fixed-point radix-2 FFT/IFFT.
...
@@ -181,29 +181,234 @@ This function performs optimized fixed-point radix-2 FFT/IFFT.
);
);
*/
*/
void
idft1536
(
int16_t
*
sigF
,
int16_t
*
sig
,
int
scale
);
void
idft6144
(
int16_t
*
sigF
,
int16_t
*
sig
,
int
scale
);
void
idft12288
(
int16_t
*
sigF
,
int16_t
*
sig
,
int
scale
);
void
idft18432
(
int16_t
*
sigF
,
int16_t
*
sig
,
int
scale
);
void
idft3072
(
int16_t
*
sigF
,
int16_t
*
sig
,
int
scale
);
void
idft24576
(
int16_t
*
sigF
,
int16_t
*
sig
,
int
scale
);
void
dft1536
(
int16_t
*
sigF
,
int16_t
*
sig
,
int
scale
);
void
dft3072
(
int16_t
*
sigF
,
int16_t
*
sig
,
int
scale
);
#ifdef OAIDFTS
typedef
void
(
*
adftfunc_t
)(
int16_t
*
sigF
,
int16_t
*
sig
,
unsigned
char
scale_flag
);
typedef
void
(
*
aidftfunc_t
)(
int16_t
*
sigF
,
int16_t
*
sig
,
unsigned
char
scale_flag
);
void
dft6144
(
int16_t
*
sigF
,
int16_t
*
sig
,
int
scale
);
void
dft12
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
dft24
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
dft36
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
dft48
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
dft60
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
dft72
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
dft96
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
dft108
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
dft120
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
dft144
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
dft180
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
dft192
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
dft216
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
dft240
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
dft288
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
dft300
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
dft324
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
dft360
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
dft384
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
dft432
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
dft480
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
dft540
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
dft576
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
dft600
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
dft648
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
dft720
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
dft768
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
dft864
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
dft900
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
dft960
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
dft972
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
dft1080
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
dft1152
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
dft1200
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
dft64
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
dft128
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
dft256
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
dft512
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
dft1024
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
dft2048
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
dft4096
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
dft8192
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
idft64
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
idft128
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
idft256
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
idft512
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
idft1024
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
idft2048
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
idft4096
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
idft8192
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
idft1536
(
int16_t
*
sigF
,
int16_t
*
sig
,
uint8_t
scale_flag
);
void
idft6144
(
int16_t
*
sigF
,
int16_t
*
sig
,
uint8_t
scale_flag
);
void
idft12288
(
int16_t
*
sigF
,
int16_t
*
sig
,
uint8_t
scale_flag
);
void
idft18432
(
int16_t
*
sigF
,
int16_t
*
sig
,
uint8_t
scale_flag
);
void
idft3072
(
int16_t
*
sigF
,
int16_t
*
sig
,
uint8_t
scale_flag
);
void
idft24576
(
int16_t
*
sigF
,
int16_t
*
sig
,
uint8_t
scale_flag
);
void
dft1536
(
int16_t
*
sigF
,
int16_t
*
sig
,
uint8_t
scale_flag
);
void
dft3072
(
int16_t
*
sigF
,
int16_t
*
sig
,
uint8_t
scale_flag
);
void
dft6144
(
int16_t
*
sigF
,
int16_t
*
sig
,
uint8_t
scale_flag
);
void
dft12288
(
int16_t
*
sigF
,
int16_t
*
sig
,
uint8_t
scale_flag
);
void
dft18432
(
int16_t
*
sigF
,
int16_t
*
sig
,
uint8_t
scale_flag
);
void
dft24576
(
int16_t
*
sigF
,
int16_t
*
sig
,
uint8_t
scale_flag
);
#else
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
);
extern
dftfunc_t
dft
;
extern
idftfunc_t
idft
;
#endif
void
dft12288
(
int16_t
*
sigF
,
int16_t
*
sig
,
int
scale
);
typedef
enum
DFT_size_idx
{
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_256
,
DFT_288
,
DFT_300
,
DFT_324
,
DFT_360
,
DFT_384
,
DFT_432
,
DFT_480
,
DFT_512
,
DFT_540
,
DFT_576
,
DFT_600
,
DFT_648
,
DFT_720
,
DFT_768
,
DFT_864
,
DFT_900
,
DFT_960
,
DFT_972
,
DFT_1024
,
DFT_1080
,
DFT_1152
,
DFT_1200
,
DFT_1536
,
DFT_2048
,
DFT_3072
,
DFT_4096
,
DFT_6144
,
DFT_8192
,
DFT_12288
,
DFT_18432
,
DFT_24576
,
DFT_SIZE_IDXTABLESIZE
,
}
dft_size_idx_t
;
#ifdef OAIDFTS
adftfunc_t
dft_ftab
[]
=
{
dft12
,
dft24
,
dft36
,
dft48
,
dft60
,
dft72
,
dft96
,
dft108
,
dft120
,
dft128
,
dft144
,
dft180
,
dft192
,
dft216
,
dft240
,
dft256
,
dft288
,
dft300
,
dft324
,
dft360
,
dft384
,
dft432
,
dft480
,
dft512
,
dft540
,
dft576
,
dft600
,
dft648
,
dft720
,
dft768
,
dft864
,
dft900
,
dft960
,
dft972
,
dft1024
,
dft1080
,
dft1152
,
dft1200
,
dft1536
,
dft2048
,
dft3072
,
dft4096
,
dft6144
,
dft8192
,
dft12288
,
dft18432
,
dft24576
,
};
#endif
void
dft18432
(
int16_t
*
sigF
,
int16_t
*
sig
,
int
scale
);
typedef
enum
idft_size_idx
{
IDFT_128
,
IDFT_256
,
IDFT_288
,
IDFT_300
,
IDFT_324
,
IDFT_360
,
IDFT_384
,
IDFT_432
,
IDFT_480
,
IDFT_512
,
IDFT_1024
,
IDFT_1536
,
IDFT_2048
,
IDFT_3072
,
IDFT_4096
,
IDFT_6144
,
IDFT_8192
,
IDFT_12288
,
IDFT_18432
,
IDFT_24576
,
IDFT_SIZE_IDXTABLESIZE
,
}
idft_size_idx_t
;
#ifdef OAIDFTS
aidftfunc_t
idft_ftab
[]
=
{
idft128
,
idft256
,
idft512
,
idft1024
,
idft1536
,
idft2048
,
idft3072
,
idft4096
,
idft6144
,
idft8192
,
idft12288
,
idft18432
,
idft24576
,
};
#endif
void
dft24576
(
int16_t
*
sigF
,
int16_t
*
sig
,
int
scale
);
/*!\fn int32_t rotate_cpx_vector(int16_t *x,int16_t *alpha,int16_t *y,uint32_t N,uint16_t output_shift)
/*!\fn int32_t rotate_cpx_vector(int16_t *x,int16_t *alpha,int16_t *y,uint32_t N,uint16_t output_shift)
...
@@ -374,57 +579,7 @@ int64_t dot_product64(int16_t *x,
...
@@ -374,57 +579,7 @@ int64_t dot_product64(int16_t *x,
uint32_t
N
,
//must be a multiple of 8
uint32_t
N
,
//must be a multiple of 8
uint8_t
output_shift
);
uint8_t
output_shift
);
void
dft12
(
int16_t
*
x
,
int16_t
*
y
);
void
dft24
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
dft36
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
dft48
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
dft60
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
dft72
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
dft96
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
dft108
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
dft120
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
dft144
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
dft180
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
dft192
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
dft216
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
dft240
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
dft288
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
dft300
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
dft324
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
dft360
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
dft384
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
dft432
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
dft480
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
dft540
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
dft576
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
dft600
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
dft648
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
dft720
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
dft768
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
dft864
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
dft900
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
dft960
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
dft972
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
dft1080
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
dft1152
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
dft1200
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
dft64
(
int16_t
*
x
,
int16_t
*
y
,
int
scale
);
void
dft128
(
int16_t
*
x
,
int16_t
*
y
,
int
scale
);
void
dft256
(
int16_t
*
x
,
int16_t
*
y
,
int
scale
);
void
dft512
(
int16_t
*
x
,
int16_t
*
y
,
int
scale
);
void
dft1024
(
int16_t
*
x
,
int16_t
*
y
,
int
scale
);
void
dft2048
(
int16_t
*
x
,
int16_t
*
y
,
int
scale
);
void
dft4096
(
int16_t
*
x
,
int16_t
*
y
,
int
scale
);
void
dft8192
(
int16_t
*
x
,
int16_t
*
y
,
int
scale
);
void
idft64
(
int16_t
*
x
,
int16_t
*
y
,
int
scale
);
void
idft128
(
int16_t
*
x
,
int16_t
*
y
,
int
scale
);
void
idft256
(
int16_t
*
x
,
int16_t
*
y
,
int
scale
);
void
idft512
(
int16_t
*
x
,
int16_t
*
y
,
int
scale
);
void
idft1024
(
int16_t
*
x
,
int16_t
*
y
,
int
scale
);
void
idft2048
(
int16_t
*
x
,
int16_t
*
y
,
int
scale
);
void
idft4096
(
int16_t
*
x
,
int16_t
*
y
,
int
scale
);
void
idft8192
(
int16_t
*
x
,
int16_t
*
y
,
int
scale
);
/** @} */
/** @} */
...
...
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