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
0518ced8
Commit
0518ced8
authored
5 years ago
by
frtabu
Browse files
Options
Browse Files
Download
Plain Diff
dft/idft in shared lib
parents
4649034b
296494ea
Changes
30
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
30 changed files
with
632 additions
and
667 deletions
+632
-667
cmake_targets/CMakeLists.txt
cmake_targets/CMakeLists.txt
+1
-1
openair1/PHY/INIT/lte_init_ru.c
openair1/PHY/INIT/lte_init_ru.c
+2
-2
openair1/PHY/INIT/lte_init_ue.c
openair1/PHY/INIT/lte_init_ue.c
+1
-1
openair1/PHY/INIT/nr_init.c
openair1/PHY/INIT/nr_init.c
+1
-2
openair1/PHY/INIT/nr_init_ue.c
openair1/PHY/INIT/nr_init_ue.c
+1
-1
openair1/PHY/LTE_ESTIMATION/lte_dl_channel_estimation.c
openair1/PHY/LTE_ESTIMATION/lte_dl_channel_estimation.c
+27
-27
openair1/PHY/LTE_ESTIMATION/lte_dl_mbsfn_channel_estimation.c
...air1/PHY/LTE_ESTIMATION/lte_dl_mbsfn_channel_estimation.c
+5
-5
openair1/PHY/LTE_ESTIMATION/lte_sync_timefreq.c
openair1/PHY/LTE_ESTIMATION/lte_sync_timefreq.c
+4
-4
openair1/PHY/LTE_UE_TRANSPORT/prach_ue.c
openair1/PHY/LTE_UE_TRANSPORT/prach_ue.c
+14
-14
openair1/PHY/LTE_UE_TRANSPORT/ulsch_modulation.c
openair1/PHY/LTE_UE_TRANSPORT/ulsch_modulation.c
+102
-102
openair1/PHY/MODULATION/nr_modulation.c
openair1/PHY/MODULATION/nr_modulation.c
+34
-34
openair1/PHY/MODULATION/slot_fep.c
openair1/PHY/MODULATION/slot_fep.c
+57
-57
openair1/PHY/MODULATION/slot_fep_mbsfn.c
openair1/PHY/MODULATION/slot_fep_mbsfn.c
+36
-36
openair1/PHY/MODULATION/slot_fep_nr.c
openair1/PHY/MODULATION/slot_fep_nr.c
+15
-15
openair1/PHY/NR_ESTIMATION/nr_ul_channel_estimation.c
openair1/PHY/NR_ESTIMATION/nr_ul_channel_estimation.c
+9
-9
openair1/PHY/NR_REFSIG/pss_nr.h
openair1/PHY/NR_REFSIG/pss_nr.h
+2
-2
openair1/PHY/NR_TRANSPORT/nr_prach.c
openair1/PHY/NR_TRANSPORT/nr_prach.c
+48
-48
openair1/PHY/NR_TRANSPORT/nr_ulsch_demodulation.c
openair1/PHY/NR_TRANSPORT/nr_ulsch_demodulation.c
+34
-34
openair1/PHY/NR_UE_ESTIMATION/nr_dl_channel_estimation.c
openair1/PHY/NR_UE_ESTIMATION/nr_dl_channel_estimation.c
+11
-10
openair1/PHY/NR_UE_TRANSPORT/nr_prach.c
openair1/PHY/NR_UE_TRANSPORT/nr_prach.c
+32
-32
openair1/PHY/NR_UE_TRANSPORT/pss_nr.c
openair1/PHY/NR_UE_TRANSPORT/pss_nr.c
+34
-31
openair1/PHY/NR_UE_TRANSPORT/sss_nr.c
openair1/PHY/NR_UE_TRANSPORT/sss_nr.c
+1
-1
openair1/PHY/TOOLS/dfts_load.c
openair1/PHY/TOOLS/dfts_load.c
+65
-0
openair1/PHY/TOOLS/oai_dfts.c
openair1/PHY/TOOLS/oai_dfts.c
+18
-19
openair1/PHY/TOOLS/tools_defs.h
openair1/PHY/TOOLS/tools_defs.h
+65
-167
openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c
openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c
+1
-0
openair2/RRC/NR/MESSAGES/asn1_msg.c
openair2/RRC/NR/MESSAGES/asn1_msg.c
+2
-2
openair2/X2AP/x2ap_eNB_generate_messages.c
openair2/X2AP/x2ap_eNB_generate_messages.c
+5
-5
openair2/X2AP/x2ap_eNB_handler.c
openair2/X2AP/x2ap_eNB_handler.c
+1
-2
targets/RT/USER/lte-ue.c
targets/RT/USER/lte-ue.c
+4
-4
No files found.
cmake_targets/CMakeLists.txt
View file @
0518ced8
...
...
@@ -1373,7 +1373,7 @@ set(PHY_SRC_COMMON
${
OPENAIR1_DIR
}
/PHY/INIT/lte_parms.c
${
OPENAIR1_DIR
}
/PHY/INIT/lte_param_init.c
${
OPENAIR1_DIR
}
/PHY/TOOLS/cadd_vv.c
# ${OPENAIR1_DIR}/PHY/TOOLS/lte_dfts
.c
${
OPENAIR1_DIR
}
/PHY/TOOLS/dfts_load
.c
${
OPENAIR1_DIR
}
/PHY/TOOLS/log2_approx.c
${
OPENAIR1_DIR
}
/PHY/TOOLS/cmult_sv.c
${
OPENAIR1_DIR
}
/PHY/TOOLS/cmult_vv.c
...
...
This diff is collapsed.
Click to expand it.
openair1/PHY/INIT/lte_init_ru.c
View file @
0518ced8
...
...
@@ -38,7 +38,7 @@ int phy_init_RU(RU_t *ru) {
LTE_DL_FRAME_PARMS
*
fp
=
ru
->
frame_parms
;
RU_CALIBRATION
*
calibration
=
&
ru
->
calibration
;
int
i
,
j
,
p
,
re
;
init_dfts
();
//load_dftslib
();
LOG_I
(
PHY
,
"Initializing RU signal buffers (if_south %s) nb_tx %d
\n
"
,
ru_if_types
[
ru
->
if_south
],
ru
->
nb_tx
);
if
(
ru
->
is_slave
==
1
)
{
...
...
@@ -76,7 +76,7 @@ int phy_init_RU(RU_t *ru) {
}
if
(
ru
->
function
!=
NGFI_RRU_IF5
)
{
// we need to do RX/TX RU processing
init_dfts
();
load_dftslib
();
init_7_5KHz
();
LOG_I
(
PHY
,
"nb_tx %d
\n
"
,
ru
->
nb_tx
);
ru
->
common
.
rxdata_7_5kHz
=
(
int32_t
**
)
malloc16
(
ru
->
nb_rx
*
sizeof
(
int32_t
*
)
);
...
...
This diff is collapsed.
Click to expand it.
openair1/PHY/INIT/lte_init_ue.c
View file @
0518ced8
...
...
@@ -625,7 +625,7 @@ int init_lte_ue_signal(PHY_VARS_UE *ue,
int
th_id
;
LOG_D
(
PHY
,
"Initializing UE vars (abstraction %"
PRIu8
") for eNB TXant %"
PRIu8
", UE RXant %"
PRIu8
"
\n
"
,
abstraction_flag
,
fp
->
nb_antennas_tx
,
fp
->
nb_antennas_rx
);
crcTableInit
();
init_dfts
();
load_dftslib
();
init_frame_parms
(
&
ue
->
frame_parms
,
1
);
lte_sync_time_init
(
&
ue
->
frame_parms
);
init_lte_top
(
&
ue
->
frame_parms
);
...
...
This diff is collapsed.
Click to expand it.
openair1/PHY/INIT/nr_init.c
View file @
0518ced8
...
...
@@ -96,7 +96,7 @@ int phy_init_nr_gNB(PHY_VARS_gNB *gNB,
while
(
gNB
->
configured
==
0
)
usleep
(
10000
);
init_dfts
();
load_dftslib
();
/*
LOG_I(PHY,"[gNB %"PRIu8"] Initializing DL_FRAME_PARMS : N_RB_DL %"PRIu8", PHICH Resource %d, PHICH Duration %d nb_antennas_tx:%u nb_antennas_rx:%u PRACH[rootSequenceIndex:%u prach_Config_enabled:%u configIndex:%u highSpeed:%u zeroCorrelationZoneConfig:%u freqOffset:%u]\n",
gNB->Mod_id,
...
...
@@ -112,7 +112,6 @@ int phy_init_nr_gNB(PHY_VARS_gNB *gNB,
);*/
LOG_D
(
PHY
,
"[MSC_NEW][FRAME 00000][PHY_gNB][MOD %02"
PRIu8
"][]
\n
"
,
gNB
->
Mod_id
);
crcTableInit
();
init_dfts
();
load_nrLDPClib
();
// PBCH DMRS gold sequences generation
nr_init_pbch_dmrs
(
gNB
);
...
...
This diff is collapsed.
Click to expand it.
openair1/PHY/INIT/nr_init_ue.c
View file @
0518ced8
...
...
@@ -988,7 +988,7 @@ void init_nr_ue_transport(PHY_VARS_NR_UE *ue,
void
phy_init_nr_top
(
PHY_VARS_NR_UE
*
ue
)
{
NR_DL_FRAME_PARMS
*
frame_parms
=
&
ue
->
frame_parms
;
crcTableInit
();
init_dfts
();
load_dftslib
();
init_context_synchro_nr
(
frame_parms
);
generate_ul_reference_signal_sequences
(
SHRT_MAX
);
// Polar encoder init for PBCH
...
...
This diff is collapsed.
Click to expand it.
openair1/PHY/LTE_ESTIMATION/lte_dl_channel_estimation.c
View file @
0518ced8
...
...
@@ -657,35 +657,35 @@ int lte_dl_channel_estimation(PHY_VARS_UE *ue,
}
}
void
(
*
idft
)(
int16_t
*
,
int16_t
*
,
int
)
;
idft_size_idx_t
idftsizeidx
;
switch
(
ue
->
frame_parms
.
ofdm_symbol_size
)
{
case
128
:
idft
=
idft
128
;
break
;
case
256
:
idft
=
idft
256
;
break
;
case
512
:
idft
=
idft
512
;
break
;
case
1024
:
idft
=
idft
1024
;
break
;
case
1536
:
idft
=
idft
1536
;
break
;
case
2048
:
idft
=
idft
2048
;
break
;
default:
idft
=
idft
512
;
idft
sizeidx
=
IDFT_
128
;
break
;
case
256
:
idft
sizeidx
=
IDFT_
256
;
break
;
case
512
:
idft
sizeidx
=
IDFT_
512
;
break
;
case
1024
:
idft
sizeidx
=
IDFT_
1024
;
break
;
case
1536
:
idft
sizeidx
=
IDFT_
1536
;
break
;
case
2048
:
idft
sizeidx
=
IDFT_
2048
;
break
;
default:
idft
sizeidx
=
IDFT_
512
;
break
;
}
...
...
@@ -695,7 +695,7 @@ int lte_dl_channel_estimation(PHY_VARS_UE *ue,
for
(
p
=
0
;
p
<
ue
->
frame_parms
.
nb_antenna_ports_eNB
;
p
++
)
{
if
(
ue
->
common_vars
.
common_vars_rx_data_per_thread
[
ue
->
current_thread_id
[
Ns
>>
1
]].
dl_ch_estimates
[
eNB_offset
][(
p
<<
1
)
+
aarx
])
{
//LOG_I(PHY,"Channel Impulse Computation Slot %d ThreadId %d Symbol %d \n", Ns, ue->current_thread_id[Ns>>1], l);
idft
((
int16_t
*
)
&
ue
->
common_vars
.
common_vars_rx_data_per_thread
[
ue
->
current_thread_id
[
Ns
>>
1
]].
dl_ch_estimates
[
eNB_offset
][(
p
<<
1
)
+
aarx
][
8
],
idft
(
idftsizeidx
,
(
int16_t
*
)
&
ue
->
common_vars
.
common_vars_rx_data_per_thread
[
ue
->
current_thread_id
[
Ns
>>
1
]].
dl_ch_estimates
[
eNB_offset
][(
p
<<
1
)
+
aarx
][
8
],
(
int16_t
*
)
ue
->
common_vars
.
common_vars_rx_data_per_thread
[
ue
->
current_thread_id
[
Ns
>>
1
]].
dl_ch_estimates_time
[
eNB_offset
][(
p
<<
1
)
+
aarx
],
1
);
}
}
...
...
This diff is collapsed.
Click to expand it.
openair1/PHY/LTE_ESTIMATION/lte_dl_mbsfn_channel_estimation.c
View file @
0518ced8
...
...
@@ -724,31 +724,31 @@ int lte_dl_mbsfn_channel_estimation(PHY_VARS_UE *ue,
if
(
ue
->
common_vars
.
common_vars_rx_data_per_thread
[
ue
->
current_thread_id
[
subframe
]].
dl_ch_estimates
[
eNB_offset
][
aa
])
{
switch
(
ue
->
frame_parms
.
N_RB_DL
)
{
case
6
:
idft
128
(
(
int16_t
*
)
&
ue
->
common_vars
.
common_vars_rx_data_per_thread
[
ue
->
current_thread_id
[
subframe
]].
dl_ch_estimates
[
eNB_offset
][
aa
][
8
],
idft
(
IDFT_128
,
(
int16_t
*
)
&
ue
->
common_vars
.
common_vars_rx_data_per_thread
[
ue
->
current_thread_id
[
subframe
]].
dl_ch_estimates
[
eNB_offset
][
aa
][
8
],
(
int16_t
*
)
ue
->
common_vars
.
common_vars_rx_data_per_thread
[
ue
->
current_thread_id
[
subframe
]].
dl_ch_estimates_time
[
eNB_offset
][
aa
],
1
);
break
;
case
25
:
idft
512
(
(
int16_t
*
)
&
ue
->
common_vars
.
common_vars_rx_data_per_thread
[
ue
->
current_thread_id
[
subframe
]].
dl_ch_estimates
[
eNB_offset
][
aa
][
8
],
idft
(
IDFT_512
,
(
int16_t
*
)
&
ue
->
common_vars
.
common_vars_rx_data_per_thread
[
ue
->
current_thread_id
[
subframe
]].
dl_ch_estimates
[
eNB_offset
][
aa
][
8
],
(
int16_t
*
)
ue
->
common_vars
.
common_vars_rx_data_per_thread
[
ue
->
current_thread_id
[
subframe
]].
dl_ch_estimates_time
[
eNB_offset
][
aa
],
1
);
break
;
case
50
:
idft
1024
(
(
int16_t
*
)
&
ue
->
common_vars
.
common_vars_rx_data_per_thread
[
ue
->
current_thread_id
[
subframe
]].
dl_ch_estimates
[
eNB_offset
][
aa
][
8
],
idft
(
IDFT_1024
,
(
int16_t
*
)
&
ue
->
common_vars
.
common_vars_rx_data_per_thread
[
ue
->
current_thread_id
[
subframe
]].
dl_ch_estimates
[
eNB_offset
][
aa
][
8
],
(
int16_t
*
)
ue
->
common_vars
.
common_vars_rx_data_per_thread
[
ue
->
current_thread_id
[
subframe
]].
dl_ch_estimates_time
[
eNB_offset
][
aa
],
1
);
break
;
case
75
:
idft
1536
(
(
int16_t
*
)
&
ue
->
common_vars
.
common_vars_rx_data_per_thread
[
ue
->
current_thread_id
[
subframe
]].
dl_ch_estimates
[
eNB_offset
][
aa
][
8
],
idft
(
IDFT_1536
,
(
int16_t
*
)
&
ue
->
common_vars
.
common_vars_rx_data_per_thread
[
ue
->
current_thread_id
[
subframe
]].
dl_ch_estimates
[
eNB_offset
][
aa
][
8
],
(
int16_t
*
)
ue
->
common_vars
.
common_vars_rx_data_per_thread
[
ue
->
current_thread_id
[
subframe
]].
dl_ch_estimates_time
[
eNB_offset
][
aa
],
1
);
break
;
case
100
:
idft
2048
(
(
int16_t
*
)
&
ue
->
common_vars
.
common_vars_rx_data_per_thread
[
ue
->
current_thread_id
[
subframe
]].
dl_ch_estimates
[
eNB_offset
][
aa
][
8
],
idft
(
IDFT_2048
,
(
int16_t
*
)
&
ue
->
common_vars
.
common_vars_rx_data_per_thread
[
ue
->
current_thread_id
[
subframe
]].
dl_ch_estimates
[
eNB_offset
][
aa
][
8
],
(
int16_t
*
)
ue
->
common_vars
.
common_vars_rx_data_per_thread
[
ue
->
current_thread_id
[
subframe
]].
dl_ch_estimates_time
[
eNB_offset
][
aa
],
1
);
break
;
...
...
This diff is collapsed.
Click to expand it.
openair1/PHY/LTE_ESTIMATION/lte_sync_timefreq.c
View file @
0518ced8
...
...
@@ -80,7 +80,7 @@ void lte_sync_timefreq(PHY_VARS_UE *ue,int band,unsigned int DL_freq)
while
(
1
)
{
//compute frequency-domain representation of 6144-sample chunk
dft
6144
(
(
int16_t
*
)
rxp
,
dft
(
DFT_6144
,
(
int16_t
*
)
rxp
,
sp
,
1
);
...
...
@@ -267,7 +267,7 @@ void lte_sync_timefreq(PHY_VARS_UE *ue,int band,unsigned int DL_freq)
}
// ifft, accumulate energy over two half-frames
idft
256
(
(
int16_t
*
)
autocorr0
,(
int16_t
*
)
tmp_t
,
1
);
idft
(
IDFT_256
,
(
int16_t
*
)
autocorr0
,(
int16_t
*
)
tmp_t
,
1
);
/*
if (i==12288) {
sprintf(fname,"corr256F_%d.m",abs(f));
...
...
@@ -285,12 +285,12 @@ void lte_sync_timefreq(PHY_VARS_UE *ue,int band,unsigned int DL_freq)
for
(
re
=
0
;
re
<
(
256
/
4
);
re
++
)
autocorr0_t
[
re
]
=
_mm_add_epi32
(
autocorr0_t
[
re
],
_mm_madd_epi16
(
tmp_t
[
re
],
tmp_t
[
re
]));
idft
256
(
(
int16_t
*
)
autocorr1
,(
int16_t
*
)
tmp_t
,
1
);
idft
(
IDFT_256
,
(
int16_t
*
)
autocorr1
,(
int16_t
*
)
tmp_t
,
1
);
for
(
re
=
0
;
re
<
(
256
/
4
);
re
++
)
autocorr1_t
[
re
]
=
_mm_add_epi32
(
autocorr1_t
[
re
],
_mm_madd_epi16
(
tmp_t
[
re
],
tmp_t
[
re
]));
idft
256
(
(
int16_t
*
)
autocorr2
,(
int16_t
*
)
tmp_t
,
1
);
idft
(
IDFT_256
,
(
int16_t
*
)
autocorr2
,(
int16_t
*
)
tmp_t
,
1
);
for
(
re
=
0
;
re
<
(
256
/
4
);
re
++
)
autocorr2_t
[
re
]
=
_mm_add_epi32
(
autocorr2_t
[
re
],
_mm_madd_epi16
(
tmp_t
[
re
],
tmp_t
[
re
]));
...
...
This diff is collapsed.
Click to expand it.
openair1/PHY/LTE_UE_TRANSPORT/prach_ue.c
View file @
0518ced8
...
...
@@ -338,11 +338,11 @@ int32_t generate_prach( PHY_VARS_UE *ue, uint8_t eNB_id, uint8_t subframe, uint1
switch
(
ue
->
frame_parms
.
N_RB_UL
)
{
case
6
:
if
(
prach_fmt
==
4
)
{
idft
256
(
prachF
,
prach2
,
1
);
idft
(
IDFT_256
,
prachF
,
prach2
,
1
);
memmove
(
prach
,
prach
+
512
,
Ncp
<<
2
);
prach_len
=
256
+
Ncp
;
}
else
{
idft
1536
(
prachF
,
prach2
,
1
);
idft
(
IDFT_1536
,
prachF
,
prach2
,
1
);
memmove
(
prach
,
prach
+
3072
,
Ncp
<<
2
);
prach_len
=
1536
+
Ncp
;
...
...
@@ -356,12 +356,12 @@ int32_t generate_prach( PHY_VARS_UE *ue, uint8_t eNB_id, uint8_t subframe, uint1
case
15
:
if
(
prach_fmt
==
4
)
{
idft
512
(
prachF
,
prach2
,
1
);
idft
(
IDFT_512
,
prachF
,
prach2
,
1
);
//TODO: account for repeated format in dft output
memmove
(
prach
,
prach
+
1024
,
Ncp
<<
2
);
prach_len
=
512
+
Ncp
;
}
else
{
idft
3072
(
prachF
,
prach2
,
1
);
idft
(
IDFT_3072
,
prachF
,
prach2
,
1
);
memmove
(
prach
,
prach
+
6144
,
Ncp
<<
2
);
prach_len
=
3072
+
Ncp
;
...
...
@@ -376,11 +376,11 @@ int32_t generate_prach( PHY_VARS_UE *ue, uint8_t eNB_id, uint8_t subframe, uint1
case
25
:
default:
if
(
prach_fmt
==
4
)
{
idft
1024
(
prachF
,
prach2
,
1
);
idft
(
IDFT_1024
,
prachF
,
prach2
,
1
);
memmove
(
prach
,
prach
+
2048
,
Ncp
<<
2
);
prach_len
=
1024
+
Ncp
;
}
else
{
idft
6144
(
prachF
,
prach2
,
1
);
idft
(
IDFT_6144
,
prachF
,
prach2
,
1
);
/*for (i=0;i<6144*2;i++)
prach2[i]<<=1;*/
memmove
(
prach
,
prach
+
12288
,
Ncp
<<
2
);
...
...
@@ -396,11 +396,11 @@ int32_t generate_prach( PHY_VARS_UE *ue, uint8_t eNB_id, uint8_t subframe, uint1
case
50
:
if
(
prach_fmt
==
4
)
{
idft
2048
(
prachF
,
prach2
,
1
);
idft
(
IDFT_2048
,
prachF
,
prach2
,
1
);
memmove
(
prach
,
prach
+
4096
,
Ncp
<<
2
);
prach_len
=
2048
+
Ncp
;
}
else
{
idft
12288
(
prachF
,
prach2
,
1
);
idft
(
IDFT_12288
,
prachF
,
prach2
,
1
);
memmove
(
prach
,
prach
+
24576
,
Ncp
<<
2
);
prach_len
=
12288
+
Ncp
;
...
...
@@ -414,12 +414,12 @@ int32_t generate_prach( PHY_VARS_UE *ue, uint8_t eNB_id, uint8_t subframe, uint1
case
75
:
if
(
prach_fmt
==
4
)
{
idft
3072
(
prachF
,
prach2
,
1
);
idft
(
IDFT_3072
,
prachF
,
prach2
,
1
);
//TODO: account for repeated format in dft output
memmove
(
prach
,
prach
+
6144
,
Ncp
<<
2
);
prach_len
=
3072
+
Ncp
;
}
else
{
idft
18432
(
prachF
,
prach2
,
1
);
idft
(
IDFT_18432
,
prachF
,
prach2
,
1
);
memmove
(
prach
,
prach
+
36864
,
Ncp
<<
2
);
prach_len
=
18432
+
Ncp
;
...
...
@@ -434,11 +434,11 @@ int32_t generate_prach( PHY_VARS_UE *ue, uint8_t eNB_id, uint8_t subframe, uint1
case
100
:
if
(
ue
->
frame_parms
.
threequarter_fs
==
0
)
{
if
(
prach_fmt
==
4
)
{
idft
4096
(
prachF
,
prach2
,
1
);
idft
(
IDFT_4096
,
prachF
,
prach2
,
1
);
memmove
(
prach
,
prach
+
8192
,
Ncp
<<
2
);
prach_len
=
4096
+
Ncp
;
}
else
{
idft
24576
(
prachF
,
prach2
,
1
);
idft
(
IDFT_24576
,
prachF
,
prach2
,
1
);
memmove
(
prach
,
prach
+
49152
,
Ncp
<<
2
);
prach_len
=
24576
+
Ncp
;
...
...
@@ -449,12 +449,12 @@ int32_t generate_prach( PHY_VARS_UE *ue, uint8_t eNB_id, uint8_t subframe, uint1
}
}
else
{
if
(
prach_fmt
==
4
)
{
idft
3072
(
prachF
,
prach2
,
1
);
idft
(
IDFT_3072
,
prachF
,
prach2
,
1
);
//TODO: account for repeated format in dft output
memmove
(
prach
,
prach
+
6144
,
Ncp
<<
2
);
prach_len
=
3072
+
Ncp
;
}
else
{
idft
18432
(
prachF
,
prach2
,
1
);
idft
(
IDFT_18432
,
prachF
,
prach2
,
1
);
memmove
(
prach
,
prach
+
36864
,
Ncp
<<
2
);
prach_len
=
18432
+
Ncp
;
printf
(
"Generated prach for 100 PRB, 3/4 sampling
\n
"
);
...
...
This diff is collapsed.
Click to expand it.
openair1/PHY/LTE_UE_TRANSPORT/ulsch_modulation.c
View file @
0518ced8
This diff is collapsed.
Click to expand it.
openair1/PHY/MODULATION/nr_modulation.c
View file @
0518ced8
...
...
@@ -242,7 +242,7 @@ void nr_dft(int32_t *z, int32_t *d, uint32_t Msc_PUSCH)
switch
(
Msc_PUSCH
)
{
case
12
:
dft
12
((
int16_t
*
)
dft_in0
,
(
int16_t
*
)
dft_out
0
);
dft
(
DFT_12
,(
int16_t
*
)
dft_in0
,
(
int16_t
*
)
dft_out0
,
0
);
#if defined(__x86_64__) || defined(__i386__)
norm128
=
_mm_set1_epi16
(
9459
);
...
...
@@ -260,135 +260,135 @@ void nr_dft(int32_t *z, int32_t *d, uint32_t Msc_PUSCH)
break
;
case
24
:
dft
24
(
(
int16_t
*
)
dft_in0
,
(
int16_t
*
)
dft_out0
,
1
);
dft
(
DFT_24
,
(
int16_t
*
)
dft_in0
,
(
int16_t
*
)
dft_out0
,
1
);
break
;
case
36
:
dft
36
(
(
int16_t
*
)
dft_in0
,
(
int16_t
*
)
dft_out0
,
1
);
dft
(
DFT_36
,
(
int16_t
*
)
dft_in0
,
(
int16_t
*
)
dft_out0
,
1
);
break
;
case
48
:
dft
48
(
(
int16_t
*
)
dft_in0
,
(
int16_t
*
)
dft_out0
,
1
);
dft
(
DFT_48
,
(
int16_t
*
)
dft_in0
,
(
int16_t
*
)
dft_out0
,
1
);
break
;
case
60
:
dft
60
(
(
int16_t
*
)
dft_in0
,
(
int16_t
*
)
dft_out0
,
1
);
dft
(
DFT_60
,
(
int16_t
*
)
dft_in0
,
(
int16_t
*
)
dft_out0
,
1
);
break
;
case
72
:
dft
72
(
(
int16_t
*
)
dft_in0
,
(
int16_t
*
)
dft_out0
,
1
);
dft
(
DFT_72
,
(
int16_t
*
)
dft_in0
,
(
int16_t
*
)
dft_out0
,
1
);
break
;
case
96
:
dft
96
(
(
int16_t
*
)
dft_in0
,
(
int16_t
*
)
dft_out0
,
1
);
dft
(
DFT_96
,
(
int16_t
*
)
dft_in0
,
(
int16_t
*
)
dft_out0
,
1
);
break
;
case
108
:
dft
108
(
(
int16_t
*
)
dft_in0
,
(
int16_t
*
)
dft_out0
,
1
);
dft
(
DFT_108
,
(
int16_t
*
)
dft_in0
,
(
int16_t
*
)
dft_out0
,
1
);
break
;
case
120
:
dft
120
(
(
int16_t
*
)
dft_in0
,
(
int16_t
*
)
dft_out0
,
1
);
dft
(
DFT_120
,
(
int16_t
*
)
dft_in0
,
(
int16_t
*
)
dft_out0
,
1
);
break
;
case
144
:
dft
144
(
(
int16_t
*
)
dft_in0
,
(
int16_t
*
)
dft_out0
,
1
);
dft
(
DFT_144
,
(
int16_t
*
)
dft_in0
,
(
int16_t
*
)
dft_out0
,
1
);
break
;
case
180
:
dft
180
(
(
int16_t
*
)
dft_in0
,
(
int16_t
*
)
dft_out0
,
1
);
dft
(
DFT_180
,
(
int16_t
*
)
dft_in0
,
(
int16_t
*
)
dft_out0
,
1
);
break
;
case
192
:
dft
192
(
(
int16_t
*
)
dft_in0
,
(
int16_t
*
)
dft_out0
,
1
);
dft
(
DFT_192
,
(
int16_t
*
)
dft_in0
,
(
int16_t
*
)
dft_out0
,
1
);
break
;
case
216
:
dft
216
(
(
int16_t
*
)
dft_in0
,
(
int16_t
*
)
dft_out0
,
1
);
dft
(
DFT_216
,
(
int16_t
*
)
dft_in0
,
(
int16_t
*
)
dft_out0
,
1
);
break
;
case
240
:
dft
240
(
(
int16_t
*
)
dft_in0
,
(
int16_t
*
)
dft_out0
,
1
);
dft
(
DFT_240
,
(
int16_t
*
)
dft_in0
,
(
int16_t
*
)
dft_out0
,
1
);
break
;
case
288
:
dft
288
(
(
int16_t
*
)
dft_in0
,
(
int16_t
*
)
dft_out0
,
1
);
dft
(
DFT_288
,
(
int16_t
*
)
dft_in0
,
(
int16_t
*
)
dft_out0
,
1
);
break
;
case
300
:
dft
300
(
(
int16_t
*
)
dft_in0
,
(
int16_t
*
)
dft_out0
,
1
);
dft
(
DFT_300
,
(
int16_t
*
)
dft_in0
,
(
int16_t
*
)
dft_out0
,
1
);
break
;
case
324
:
dft
324
(
(
int16_t
*
)
dft_in0
,
(
int16_t
*
)
dft_out0
,
1
);
dft
(
DFT_324
,
(
int16_t
*
)
dft_in0
,
(
int16_t
*
)
dft_out0
,
1
);
break
;
case
360
:
dft
360
(
(
int16_t
*
)
dft_in0
,
(
int16_t
*
)
dft_out0
,
1
);
dft
(
DFT_360
,
(
int16_t
*
)
dft_in0
,
(
int16_t
*
)
dft_out0
,
1
);
break
;
case
384
:
dft
384
(
(
int16_t
*
)
dft_in0
,
(
int16_t
*
)
dft_out0
,
1
);
dft
(
DFT_384
,
(
int16_t
*
)
dft_in0
,
(
int16_t
*
)
dft_out0
,
1
);
break
;
case
432
:
dft
432
(
(
int16_t
*
)
dft_in0
,
(
int16_t
*
)
dft_out0
,
1
);
dft
(
DFT_432
,
(
int16_t
*
)
dft_in0
,
(
int16_t
*
)
dft_out0
,
1
);
break
;
case
480
:
dft
480
(
(
int16_t
*
)
dft_in0
,
(
int16_t
*
)
dft_out0
,
1
);
dft
(
DFT_480
,
(
int16_t
*
)
dft_in0
,
(
int16_t
*
)
dft_out0
,
1
);
break
;
case
540
:
dft
540
(
(
int16_t
*
)
dft_in0
,
(
int16_t
*
)
dft_out0
,
1
);
dft
(
DFT_540
,
(
int16_t
*
)
dft_in0
,
(
int16_t
*
)
dft_out0
,
1
);
break
;
case
576
:
dft
576
(
(
int16_t
*
)
dft_in0
,
(
int16_t
*
)
dft_out0
,
1
);
dft
(
DFT_576
,
(
int16_t
*
)
dft_in0
,
(
int16_t
*
)
dft_out0
,
1
);
break
;
case
600
:
dft
600
(
(
int16_t
*
)
dft_in0
,
(
int16_t
*
)
dft_out0
,
1
);
dft
(
DFT_600
,
(
int16_t
*
)
dft_in0
,
(
int16_t
*
)
dft_out0
,
1
);
break
;
case
648
:
dft
648
(
(
int16_t
*
)
dft_in0
,
(
int16_t
*
)
dft_out0
,
1
);
dft
(
DFT_648
,
(
int16_t
*
)
dft_in0
,
(
int16_t
*
)
dft_out0
,
1
);
break
;
case
720
:
dft
720
(
(
int16_t
*
)
dft_in0
,
(
int16_t
*
)
dft_out0
,
1
);
dft
(
DFT_720
,
(
int16_t
*
)
dft_in0
,
(
int16_t
*
)
dft_out0
,
1
);
break
;
case
768
:
dft
768
(
(
int16_t
*
)
dft_in0
,
(
int16_t
*
)
dft_out0
,
1
);
dft
(
DFT_768
,
(
int16_t
*
)
dft_in0
,
(
int16_t
*
)
dft_out0
,
1
);
break
;
case
864
:
dft
864
(
(
int16_t
*
)
dft_in0
,
(
int16_t
*
)
dft_out0
,
1
);
dft
(
DFT_864
,
(
int16_t
*
)
dft_in0
,
(
int16_t
*
)
dft_out0
,
1
);
break
;
case
900
:
dft
900
(
(
int16_t
*
)
dft_in0
,
(
int16_t
*
)
dft_out0
,
1
);
dft
(
DFT_900
,
(
int16_t
*
)
dft_in0
,
(
int16_t
*
)
dft_out0
,
1
);
break
;
case
960
:
dft
960
(
(
int16_t
*
)
dft_in0
,
(
int16_t
*
)
dft_out0
,
1
);
dft
(
DFT_960
,
(
int16_t
*
)
dft_in0
,
(
int16_t
*
)
dft_out0
,
1
);
break
;
case
972
:
dft
972
(
(
int16_t
*
)
dft_in0
,
(
int16_t
*
)
dft_out0
,
1
);
dft
(
DFT_960
,
(
int16_t
*
)
dft_in0
,
(
int16_t
*
)
dft_out0
,
1
);
break
;
case
1080
:
dft
1080
(
(
int16_t
*
)
dft_in0
,
(
int16_t
*
)
dft_out0
,
1
);
dft
(
DFT_1080
,
(
int16_t
*
)
dft_in0
,
(
int16_t
*
)
dft_out0
,
1
);
break
;
case
1152
:
dft
1152
(
(
int16_t
*
)
dft_in0
,
(
int16_t
*
)
dft_out0
,
1
);
dft
(
DFT_1152
,
(
int16_t
*
)
dft_in0
,
(
int16_t
*
)
dft_out0
,
1
);
break
;
case
1200
:
dft
1200
(
(
int16_t
*
)
dft_in0
,
(
int16_t
*
)
dft_out0
,
1
);
dft
(
DFT_1200
,
(
int16_t
*
)
dft_in0
,
(
int16_t
*
)
dft_out0
,
1
);
break
;
}
...
...
This diff is collapsed.
Click to expand it.
openair1/PHY/MODULATION/slot_fep.c
View file @
0518ced8
...
...
@@ -49,36 +49,36 @@ int slot_fep(PHY_VARS_UE *ue,
unsigned char harq_pid = dlsch_ue[0]->current_harq_pid;
LTE_DL_UE_HARQ_t *dlsch0_harq = dlsch_ue[0]->harq_processes[harq_pid];
int uespec_pilot[9][1200];*/
void
(
*
dft
)(
int16_t
*
,
int16_t
*
,
int
)
;
dft_size_idx_t
dftsizeidx
;
int
tmp_dft_in
[
2048
]
__attribute__
((
aligned
(
32
)));
// This is for misalignment issues for 6 and 15 PRBs
switch
(
frame_parms
->
ofdm_symbol_size
)
{
case
128
:
dft
=
dft
128
;
break
;
case
256
:
dft
=
dft
256
;
break
;
case
512
:
dft
=
dft
512
;
break
;
case
1024
:
dft
=
dft
1024
;
break
;
case
1536
:
dft
=
dft
1536
;
break
;
case
2048
:
dft
=
dft
2048
;
dft
sizeidx
=
DFT_
128
;
break
;
case
256
:
dft
sizeidx
=
DFT_
256
;
break
;
case
512
:
dft
sizeidx
=
DFT_
512
;
break
;
case
1024
:
dft
sizeidx
=
DFT_
1024
;
break
;
case
1536
:
dft
sizeidx
=
DFT_
1536
;
break
;
case
2048
:
dft
sizeidx
=
DFT_
2048
;
break
;
default:
dft
=
dft
512
;
dft
sizeidx
=
DFT_
512
;
break
;
}
...
...
@@ -118,13 +118,13 @@ int slot_fep(PHY_VARS_UE *ue,
memcpy
((
void
*
)
tmp_dft_in
,
(
void
*
)
&
common_vars
->
rxdata
[
aa
][
rx_offset
%
frame_length_samples
],
frame_parms
->
ofdm_symbol_size
*
sizeof
(
int
));
dft
((
int16_t
*
)
tmp_dft_in
,
dft
(
dftsizeidx
,
(
int16_t
*
)
tmp_dft_in
,
(
int16_t
*
)
&
common_vars
->
common_vars_rx_data_per_thread
[
ue
->
current_thread_id
[
Ns
>>
1
]].
rxdataF
[
aa
][
frame_parms
->
ofdm_symbol_size
*
symbol
],
1
);
}
else
{
// use dft input from RX buffer directly
#if UE_TIMING_TRACE
start_meas
(
&
ue
->
rx_dft_stats
);
#endif
dft
((
int16_t
*
)
&
common_vars
->
rxdata
[
aa
][(
rx_offset
)
%
frame_length_samples
],
dft
(
dftsizeidx
,
(
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
>>
1
]].
rxdataF
[
aa
][
frame_parms
->
ofdm_symbol_size
*
symbol
],
1
);
#if UE_TIMING_TRACE
stop_meas
(
&
ue
->
rx_dft_stats
);
...
...
@@ -153,10 +153,10 @@ int slot_fep(PHY_VARS_UE *ue,
memcpy
((
void
*
)
tmp_dft_in
,
(
void
*
)
&
common_vars
->
rxdata
[
aa
][(
rx_offset
)
%
frame_length_samples
],
frame_parms
->
ofdm_symbol_size
*
sizeof
(
int
));
dft
((
int16_t
*
)
tmp_dft_in
,
dft
(
dftsizeidx
,
(
int16_t
*
)
tmp_dft_in
,
(
int16_t
*
)
&
common_vars
->
common_vars_rx_data_per_thread
[
ue
->
current_thread_id
[
Ns
>>
1
]].
rxdataF
[
aa
][
frame_parms
->
ofdm_symbol_size
*
symbol
],
1
);
}
else
{
// use dft input from RX buffer directly
dft
((
int16_t
*
)
&
common_vars
->
rxdata
[
aa
][(
rx_offset
)
%
frame_length_samples
],
dft
(
dftsizeidx
,
(
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
>>
1
]].
rxdataF
[
aa
][
frame_parms
->
ofdm_symbol_size
*
symbol
],
1
);
}
...
...
@@ -247,36 +247,36 @@ int front_end_fft(PHY_VARS_UE *ue,
unsigned char harq_pid = dlsch_ue[0]->current_harq_pid;
LTE_DL_UE_HARQ_t *dlsch0_harq = dlsch_ue[0]->harq_processes[harq_pid];
int uespec_pilot[9][1200];*/
void
(
*
dft
)(
int16_t
*
,
int16_t
*
,
int
)
;
dft_size_idx_t
dftsizeidx
;
int
tmp_dft_in
[
2048
]
__attribute__
((
aligned
(
32
)));
// This is for misalignment issues for 6 and 15 PRBs
switch
(
frame_parms
->
ofdm_symbol_size
)
{
case
128
:
dft
=
dft
128
;
break
;
case
256
:
dft
=
dft
256
;
break
;
case
512
:
dft
=
dft
512
;
break
;
case
1024
:
dft
=
dft
1024
;
break
;
case
1536
:
dft
=
dft
1536
;
break
;
case
2048
:
dft
=
dft
2048
;
break
;
default:
dft
=
dft
512
;
dft
sizeidx
=
DFT_
128
;
break
;
case
256
:
dft
sizeidx
=
DFT_
256
;
break
;
case
512
:
dft
sizeidx
=
DFT_
512
;
break
;
case
1024
:
dft
sizeidx
=
DFT_
1024
;
break
;
case
1536
:
dft
sizeidx
=
DFT_
1536
;
break
;
case
2048
:
dft
sizeidx
=
DFT_
2048
;
break
;
default:
dft
sizeidx
=
DFT_
512
;
break
;
}
...
...
@@ -319,11 +319,11 @@ int front_end_fft(PHY_VARS_UE *ue,
memcpy
((
void
*
)
tmp_dft_in
,
(
void
*
)
&
common_vars
->
rxdata
[
aa
][
rx_offset
%
frame_length_samples
],
frame_parms
->
ofdm_symbol_size
*
sizeof
(
int
));
dft
((
int16_t
*
)
tmp_dft_in
,
dft
(
dftsizeidx
,
(
int16_t
*
)
tmp_dft_in
,
(
int16_t
*
)
&
common_vars
->
common_vars_rx_data_per_thread
[
threadId
].
rxdataF
[
aa
][
frame_parms
->
ofdm_symbol_size
*
symbol
],
1
);
}
else
{
// use dft input from RX buffer directly
start_meas
(
&
ue
->
rx_dft_stats
);
dft
((
int16_t
*
)
&
common_vars
->
rxdata
[
aa
][(
rx_offset
)
%
frame_length_samples
],
dft
(
dftsizeidx
,
(
int16_t
*
)
&
common_vars
->
rxdata
[
aa
][(
rx_offset
)
%
frame_length_samples
],
(
int16_t
*
)
&
common_vars
->
common_vars_rx_data_per_thread
[
threadId
].
rxdataF
[
aa
][
frame_parms
->
ofdm_symbol_size
*
symbol
],
1
);
stop_meas
(
&
ue
->
rx_dft_stats
);
}
...
...
@@ -349,10 +349,10 @@ int front_end_fft(PHY_VARS_UE *ue,
memcpy
((
void
*
)
tmp_dft_in
,
(
void
*
)
&
common_vars
->
rxdata
[
aa
][(
rx_offset
)
%
frame_length_samples
],
frame_parms
->
ofdm_symbol_size
*
sizeof
(
int
));
dft
((
int16_t
*
)
tmp_dft_in
,
dft
(
dftsizeidx
,
(
int16_t
*
)
tmp_dft_in
,
(
int16_t
*
)
&
common_vars
->
common_vars_rx_data_per_thread
[
threadId
].
rxdataF
[
aa
][
frame_parms
->
ofdm_symbol_size
*
symbol
],
1
);
}
else
{
// use dft input from RX buffer directly
dft
((
int16_t
*
)
&
common_vars
->
rxdata
[
aa
][(
rx_offset
)
%
frame_length_samples
],
dft
(
dftsizeidx
,
(
int16_t
*
)
&
common_vars
->
rxdata
[
aa
][(
rx_offset
)
%
frame_length_samples
],
(
int16_t
*
)
&
common_vars
->
common_vars_rx_data_per_thread
[
threadId
].
rxdataF
[
aa
][
frame_parms
->
ofdm_symbol_size
*
symbol
],
1
);
}
...
...
This diff is collapsed.
Click to expand it.
openair1/PHY/MODULATION/slot_fep_mbsfn.c
View file @
0518ced8
...
...
@@ -42,35 +42,35 @@ int slot_fep_mbsfn(PHY_VARS_UE *ue,
unsigned
int
subframe_offset
;
// int i;
unsigned
int
frame_length_samples
=
frame_parms
->
samples_per_tti
*
10
;
void
(
*
dft
)(
int16_t
*
,
int16_t
*
,
int
)
;
dft_size_idx_t
dftsizeidx
;
switch
(
frame_parms
->
ofdm_symbol_size
)
{
case
128
:
dft
=
dft
128
;
break
;
case
256
:
dft
=
dft
256
;
break
;
case
512
:
dft
=
dft
512
;
break
;
case
1024
:
dft
=
dft
1024
;
break
;
case
1536
:
dft
=
dft
1536
;
break
;
case
2048
:
dft
=
dft
2048
;
break
;
default:
dft
=
dft
512
;
dft
sizeidx
=
DFT_
128
;
break
;
case
256
:
dft
sizeidx
=
DFT_
256
;
break
;
case
512
:
dft
sizeidx
=
DFT_
512
;
break
;
case
1024
:
dft
sizeidx
=
DFT_
1024
;
break
;
case
1536
:
dft
sizeidx
=
DFT_
1536
;
break
;
case
2048
:
dft
sizeidx
=
DFT_
2048
;
break
;
default:
dft
sizeidx
=
DFT_
512
;
break
;
}
...
...
@@ -110,7 +110,7 @@ int slot_fep_mbsfn(PHY_VARS_UE *ue,
#if UE_TIMING_TRACE
start_meas
(
&
ue
->
rx_dft_stats
);
#endif
dft
((
int16_t
*
)
&
common_vars
->
rxdata
[
aa
][(
sample_offset
+
dft
(
dftsizeidx
,
(
int16_t
*
)
&
common_vars
->
rxdata
[
aa
][(
sample_offset
+
nb_prefix_samples0
+
subframe_offset
-
SOFFSET
)
%
frame_length_samples
],
...
...
@@ -131,7 +131,7 @@ int slot_fep_mbsfn(PHY_VARS_UE *ue,
#if UE_TIMING_TRACE
start_meas
(
&
ue
->
rx_dft_stats
);
#endif
dft
((
int16_t
*
)
&
common_vars
->
rxdata
[
aa
][(
sample_offset
+
dft
(
dftsizeidx
,
(
int16_t
*
)
&
common_vars
->
rxdata
[
aa
][(
sample_offset
+
(
frame_parms
->
ofdm_symbol_size
+
nb_prefix_samples0
+
nb_prefix_samples
)
+
(
frame_parms
->
ofdm_symbol_size
+
nb_prefix_samples
)
*
(
l
-
1
)
+
subframe_offset
-
...
...
@@ -208,43 +208,43 @@ int slot_fep_mbsfn_khz_1dot25(PHY_VARS_UE *ue,
int
ofdm_symbol_size
;
unsigned
int
subframe_offset
;
unsigned
int
frame_length_samples
=
frame_parms
->
samples_per_tti
*
10
;
void
(
*
dft
)(
int16_t
*
,
int16_t
*
,
int
)
;
dft_size_idx_t
dftsizeidx
;
AssertFatal
(
frame_parms
->
frame_type
==
FDD
,
"Frame is TDD!
\n
"
);
switch
(
frame_parms
->
ofdm_symbol_size
)
{
case
128
:
dft
=
dft
1536
;
dft
sizeidx
=
DFT_
1536
;
ofdm_symbol_size
=
1536
;
nb_prefix_samples
=
384
;
break
;
case
256
:
AssertFatal
(
1
==
0
,
"FeMBMS dft3072 not implemented
\n
"
);
dft
=
dft
3072
;
dft
sizeidx
=
DFT_
3072
;
ofdm_symbol_size
=
3072
;
nb_prefix_samples
=
768
;
break
;
case
512
:
dft
=
dft
6144
;
dft
sizeidx
=
DFT_
6144
;
nb_prefix_samples
=
1536
;
ofdm_symbol_size
=
6144
;
break
;
case
1024
:
dft
=
dft
12288
;
dft
sizeidx
=
DFT_
12288
;
nb_prefix_samples
=
3072
;
ofdm_symbol_size
=
12288
;
break
;
case
1536
:
dft
=
dft
18432
;
dft
sizeidx
=
DFT_
18432
;
nb_prefix_samples
=
4608
;
ofdm_symbol_size
=
18432
;
break
;
case
2048
:
dft
=
dft
24576
;
dft
sizeidx
=
DFT_
24576
;
nb_prefix_samples
=
6144
;
ofdm_symbol_size
=
24576
;
break
;
...
...
@@ -265,7 +265,7 @@ int slot_fep_mbsfn_khz_1dot25(PHY_VARS_UE *ue,
#if UE_TIMING_TRACE
start_meas
(
&
ue
->
rx_dft_stats
);
#endif
dft
((
int16_t
*
)
&
common_vars
->
rxdata
[
aa
][(
sample_offset
+
dft
(
dftsizeidx
,
(
int16_t
*
)
&
common_vars
->
rxdata
[
aa
][(
sample_offset
+
nb_prefix_samples
+
subframe_offset
-
SOFFSET
)
%
frame_length_samples
],
...
...
This diff is collapsed.
Click to expand it.
openair1/PHY/MODULATION/slot_fep_nr.c
View file @
0518ced8
...
...
@@ -237,44 +237,44 @@ int nr_slot_fep_init_sync(PHY_VARS_NR_UE *ue,
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
switch
(
frame_parms
->
ofdm_symbol_size
)
{
case
128
:
dft
=
dft
128
;
dft
size
=
DFT_
128
;
break
;
case
256
:
dft
=
dft
256
;
dft
size
=
DFT_
256
;
break
;
case
512
:
dft
=
dft
512
;
dft
size
=
DFT_
512
;
break
;
case
1024
:
dft
=
dft
1024
;
dft
size
=
DFT_
1024
;
break
;
case
1536
:
dft
=
dft
1536
;
dft
size
=
DFT_
1536
;
break
;
case
2048
:
dft
=
dft
2048
;
dft
size
=
DFT_
2048
;
break
;
case
3072
:
dft
=
dft
3072
;
dft
size
=
DFT_
3072
;
break
;
case
4096
:
dft
=
dft
4096
;
dft
size
=
DFT_
4096
;
break
;
case
8192
:
dft
=
dft
8192
;
dft
size
=
DFT_
8192
;
break
;
default:
...
...
@@ -330,14 +330,15 @@ int nr_slot_fep_init_sync(PHY_VARS_NR_UE *ue,
memcpy
((
void
*
)
tmp_dft_in
,
(
void
*
)
&
common_vars
->
rxdata
[
aa
][
rx_offset
],
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
);
}
else
{
// use dft input from RX buffer directly
#if UE_TIMING_TRACE
start_meas
(
&
ue
->
rx_dft_stats
);
#endif
dft
((
int16_t
*
)
&
common_vars
->
rxdata
[
aa
][
rx_offset
],
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
);
#if UE_TIMING_TRACE
stop_meas
(
&
ue
->
rx_dft_stats
);
...
...
@@ -358,11 +359,10 @@ int nr_slot_fep_init_sync(PHY_VARS_NR_UE *ue,
memcpy
((
void
*
)
tmp_dft_in
,
(
void
*
)
&
common_vars
->
rxdata
[
aa
][
rx_offset
],
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
);
}
else
{
// use dft input from RX buffer directly
dft
((
int16_t
*
)
&
common_vars
->
rxdata
[
aa
][
rx_offset
],
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
);
}
#if UE_TIMING_TRACE
...
...
This diff is collapsed.
Click to expand it.
openair1/PHY/NR_ESTIMATION/nr_ul_channel_estimation.c
View file @
0518ced8
...
...
@@ -430,55 +430,55 @@ int nr_pusch_channel_estimation(PHY_VARS_gNB *gNB,
switch
(
gNB
->
frame_parms
.
ofdm_symbol_size
)
{
case
128
:
idft
128
(
(
int16_t
*
)
&
ul_ch_estimates
[
aarx
][
symbol_offset
],
idft
(
IDFT_128
,
(
int16_t
*
)
&
ul_ch_estimates
[
aarx
][
symbol_offset
],
(
int16_t
*
)
ul_ch_estimates_time
[
aarx
],
1
);
break
;
case
256
:
idft
256
(
(
int16_t
*
)
&
ul_ch_estimates
[
aarx
][
symbol_offset
],
idft
(
IDFT_256
,
(
int16_t
*
)
&
ul_ch_estimates
[
aarx
][
symbol_offset
],
(
int16_t
*
)
ul_ch_estimates_time
[
aarx
],
1
);
break
;
case
512
:
idft
512
(
(
int16_t
*
)
&
ul_ch_estimates
[
aarx
][
symbol_offset
],
idft
(
IDFT_512
,
(
int16_t
*
)
&
ul_ch_estimates
[
aarx
][
symbol_offset
],
(
int16_t
*
)
ul_ch_estimates_time
[
aarx
],
1
);
break
;
case
1024
:
idft
1024
(
(
int16_t
*
)
&
ul_ch_estimates
[
aarx
][
symbol_offset
],
idft
(
IDFT_1024
,
(
int16_t
*
)
&
ul_ch_estimates
[
aarx
][
symbol_offset
],
(
int16_t
*
)
ul_ch_estimates_time
[
aarx
],
1
);
break
;
case
1536
:
idft
1536
(
(
int16_t
*
)
&
ul_ch_estimates
[
aarx
][
symbol_offset
],
idft
(
IDFT_1536
,
(
int16_t
*
)
&
ul_ch_estimates
[
aarx
][
symbol_offset
],
(
int16_t
*
)
ul_ch_estimates_time
[
aarx
],
1
);
break
;
case
2048
:
idft
2048
(
(
int16_t
*
)
&
ul_ch_estimates
[
aarx
][
symbol_offset
],
idft
(
IDFT_2048
,
(
int16_t
*
)
&
ul_ch_estimates
[
aarx
][
symbol_offset
],
(
int16_t
*
)
ul_ch_estimates_time
[
aarx
],
1
);
break
;
case
4096
:
idft
4096
(
(
int16_t
*
)
&
ul_ch_estimates
[
aarx
][
symbol_offset
],
idft
(
IDFT_4096
,
(
int16_t
*
)
&
ul_ch_estimates
[
aarx
][
symbol_offset
],
(
int16_t
*
)
ul_ch_estimates_time
[
aarx
],
1
);
break
;
case
8192
:
idft
8192
(
(
int16_t
*
)
&
ul_ch_estimates
[
aarx
][
symbol_offset
],
idft
(
IDFT_8192
,
(
int16_t
*
)
&
ul_ch_estimates
[
aarx
][
symbol_offset
],
(
int16_t
*
)
ul_ch_estimates_time
[
aarx
],
1
);
break
;
default:
idft
512
(
(
int16_t
*
)
&
ul_ch_estimates
[
aarx
][
symbol_offset
],
idft
(
IDFT_512
,
(
int16_t
*
)
&
ul_ch_estimates
[
aarx
][
symbol_offset
],
(
int16_t
*
)
ul_ch_estimates_time
[
aarx
],
1
);
break
;
...
...
This diff is collapsed.
Click to expand it.
openair1/PHY/NR_REFSIG/pss_nr.h
View file @
0518ced8
...
...
@@ -127,8 +127,8 @@ time_stats_t generic_time[TIME_LAST];
/************** FUNCTION ******************************************/
void
*
get_idft
(
int
ofdm_symbol_size
);
void
*
get_dft
(
int
ofdm_symbol_size
);
idft_size_idx_t
get_idft
(
int
ofdm_symbol_size
);
dft_size_idx_t
get_dft
(
int
ofdm_symbol_size
);
void
init_context_synchro_nr
(
NR_DL_FRAME_PARMS
*
frame_parms_ue
);
void
free_context_synchro_nr
(
void
);
void
init_context_pss_nr
(
NR_DL_FRAME_PARMS
*
frame_parms_ue
);
...
...
This diff is collapsed.
Click to expand it.
openair1/PHY/NR_TRANSPORT/nr_prach.c
View file @
0518ced8
...
...
@@ -175,39 +175,39 @@ void rx_nr_prach_ru(RU_t *ru,
//50 MHz @ 61.44 Ms/s
prach2
=
prach
[
aa
]
+
(
Ncp
<<
2
);
if
(
prach_fmt
==
0
||
prach_fmt
==
1
||
prach_fmt
==
2
)
dft
49152
(
prach2
,
rxsigF
[
aa
],
1
);
dft
(
DFT_49152
,
prach2
,
rxsigF
[
aa
],
1
);
if
(
prach_fmt
==
1
||
prach_fmt
==
2
)
{
dft
49152
(
prach2
+
98304
,
rxsigF
[
aa
]
+
98304
,
1
);
dft
(
DFT_49152
,
prach2
+
98304
,
rxsigF
[
aa
]
+
98304
,
1
);
reps
++
;
}
if
(
prach_fmt
==
2
)
{
dft
49152
(
prach2
+
(
98304
*
2
),
rxsigF
[
aa
]
+
(
98304
*
2
),
1
);
dft
49152
(
prach2
+
(
98304
*
3
),
rxsigF
[
aa
]
+
(
98304
*
3
),
1
);
dft
(
DFT_49152
,
prach2
+
(
98304
*
2
),
rxsigF
[
aa
]
+
(
98304
*
2
),
1
);
dft
(
DFT_49152
,
prach2
+
(
98304
*
3
),
rxsigF
[
aa
]
+
(
98304
*
3
),
1
);
reps
+=
2
;
}
if
(
prach_fmt
==
3
)
{
for
(
int
i
=
0
;
i
<
4
;
i
++
)
dft
12288
(
prach2
+
(
i
*
12288
*
2
),
rxsigF
[
aa
]
+
(
i
*
12288
*
2
),
1
);
for
(
int
i
=
0
;
i
<
4
;
i
++
)
dft
(
DFT_12288
,
prach2
+
(
i
*
12288
*
2
),
rxsigF
[
aa
]
+
(
i
*
12288
*
2
),
1
);
reps
=
4
;
}
if
(
prach_fmt
>
3
)
{
dft
2048
(
prach2
,
rxsigF
[
aa
],
1
);
dft
(
DFT_2048
,
prach2
,
rxsigF
[
aa
],
1
);
if
(
prach_fmt
!=
0xc0
)
{
dft
2048
(
prach2
+
4096
,
rxsigF
[
aa
]
+
4096
,
1
);
dft
(
DFT_2048
,
prach2
+
4096
,
rxsigF
[
aa
]
+
4096
,
1
);
reps
++
;
}
}
if
(
prach_fmt
==
0xa2
||
prach_fmt
==
0xa3
||
prach_fmt
==
0xb2
||
prach_fmt
==
0xb3
||
prach_fmt
==
0xb4
||
prach_fmt
==
0xc2
)
{
dft
2048
(
prach2
+
4096
*
2
,
rxsigF
[
aa
]
+
4096
*
2
,
1
);
dft
2048
(
prach2
+
4096
*
3
,
rxsigF
[
aa
]
+
4096
*
3
,
1
);
dft
(
DFT_2048
,
prach2
+
4096
*
2
,
rxsigF
[
aa
]
+
4096
*
2
,
1
);
dft
(
DFT_2048
,
prach2
+
4096
*
3
,
rxsigF
[
aa
]
+
4096
*
3
,
1
);
reps
+=
2
;
}
if
(
prach_fmt
==
0xa3
||
prach_fmt
==
0xb3
||
prach_fmt
==
0xc2
)
{
dft
2048
(
prach2
+
4096
*
4
,
rxsigF
[
aa
]
+
4096
*
4
,
1
);
dft
2048
(
prach2
+
4096
*
5
,
rxsigF
[
aa
]
+
4096
*
5
,
1
);
dft
(
DFT_2048
,
prach2
+
4096
*
4
,
rxsigF
[
aa
]
+
4096
*
4
,
1
);
dft
(
DFT_2048
,
prach2
+
4096
*
5
,
rxsigF
[
aa
]
+
4096
*
5
,
1
);
reps
+=
2
;
}
if
(
prach_fmt
==
0xc2
)
{
for
(
int
i
=
6
;
i
<
11
;
i
++
)
dft
2048
(
prach2
+
(
3072
*
i
),
rxsigF
[
aa
]
+
(
3072
*
i
),
1
);
for
(
int
i
=
6
;
i
<
11
;
i
++
)
dft
(
DFT_2048
,
prach2
+
(
3072
*
i
),
rxsigF
[
aa
]
+
(
3072
*
i
),
1
);
reps
+=
6
;
}
}
else
{
...
...
@@ -215,41 +215,41 @@ void rx_nr_prach_ru(RU_t *ru,
prach2
=
prach
[
aa
]
+
(
3
*
Ncp
);
AssertFatal
(
fp
->
N_RB_UL
<=
107
,
"cannot do 108..136 PRBs with 3/4 sampling
\n
"
);
if
(
prach_fmt
==
0
||
prach_fmt
==
1
||
prach_fmt
==
2
)
{
dft
36864
(
prach2
,
rxsigF
[
aa
],
1
);
dft
(
DFT_36864
,
prach2
,
rxsigF
[
aa
],
1
);
reps
++
;
}
if
(
prach_fmt
==
1
||
prach_fmt
==
2
)
{
dft
36864
(
prach2
+
73728
,
rxsigF
[
aa
]
+
73728
,
1
);
dft
(
DFT_36864
,
prach2
+
73728
,
rxsigF
[
aa
]
+
73728
,
1
);
reps
++
;
}
if
(
prach_fmt
==
2
)
{
dft
36864
(
prach2
+
(
98304
*
2
),
rxsigF
[
aa
]
+
(
98304
*
2
),
1
);
dft
36864
(
prach2
+
(
98304
*
3
),
rxsigF
[
aa
]
+
(
98304
*
3
),
1
);
dft
(
DFT_36864
,
prach2
+
(
98304
*
2
),
rxsigF
[
aa
]
+
(
98304
*
2
),
1
);
dft
(
DFT_36864
,
prach2
+
(
98304
*
3
),
rxsigF
[
aa
]
+
(
98304
*
3
),
1
);
reps
+=
2
;
}
if
(
prach_fmt
==
3
)
{
for
(
int
i
=
0
;
i
<
4
;
i
++
)
dft
9216
(
prach2
+
(
i
*
9216
*
2
),
rxsigF
[
aa
]
+
(
i
*
9216
*
2
),
1
);
for
(
int
i
=
0
;
i
<
4
;
i
++
)
dft
(
DFT_9216
,
prach2
+
(
i
*
9216
*
2
),
rxsigF
[
aa
]
+
(
i
*
9216
*
2
),
1
);
reps
=
4
;
}
if
(
prach_fmt
>
3
)
{
dft
1536
(
prach2
,
rxsigF
[
aa
],
1
);
dft
(
DFT_1536
,
prach2
,
rxsigF
[
aa
],
1
);
if
(
prach_fmt
!=
0xc0
)
{
dft
1536
(
prach2
+
3072
,
rxsigF
[
aa
]
+
3072
,
1
);
dft
(
DFT_1536
,
prach2
+
3072
,
rxsigF
[
aa
]
+
3072
,
1
);
reps
++
;
}
}
if
(
prach_fmt
==
0xa2
||
prach_fmt
==
0xa3
||
prach_fmt
==
0xb2
||
prach_fmt
==
0xb3
||
prach_fmt
==
0xb4
||
prach_fmt
==
0xc2
)
{
dft
1536
(
prach2
+
3072
*
2
,
rxsigF
[
aa
]
+
3072
*
2
,
1
);
dft
1536
(
prach2
+
3072
*
3
,
rxsigF
[
aa
]
+
3072
*
3
,
1
);
dft
(
DFT_1536
,
prach2
+
3072
*
2
,
rxsigF
[
aa
]
+
3072
*
2
,
1
);
dft
(
DFT_1536
,
prach2
+
3072
*
3
,
rxsigF
[
aa
]
+
3072
*
3
,
1
);
reps
+=
2
;
}
if
(
prach_fmt
==
0xa3
||
prach_fmt
==
0xb3
||
prach_fmt
==
0xc2
)
{
dft
1536
(
prach2
+
3072
*
4
,
rxsigF
[
aa
]
+
3072
*
4
,
1
);
dft
1536
(
prach2
+
3072
*
5
,
rxsigF
[
aa
]
+
3072
*
5
,
1
);
dft
(
DFT_1536
,
prach2
+
3072
*
4
,
rxsigF
[
aa
]
+
3072
*
4
,
1
);
dft
(
DFT_1536
,
prach2
+
3072
*
5
,
rxsigF
[
aa
]
+
3072
*
5
,
1
);
reps
+=
2
;
}
if
(
prach_fmt
==
0xc2
)
{
for
(
int
i
=
6
;
i
<
11
;
i
++
)
dft
1536
(
prach2
+
(
3072
*
i
),
rxsigF
[
aa
]
+
(
3072
*
i
),
1
);
for
(
int
i
=
6
;
i
<
11
;
i
++
)
dft
(
DFT_1536
,
prach2
+
(
3072
*
i
),
rxsigF
[
aa
]
+
(
3072
*
i
),
1
);
reps
+=
6
;
}
}
...
...
@@ -260,41 +260,41 @@ void rx_nr_prach_ru(RU_t *ru,
dftlen
=
98304
;
//80,90,100 MHz @ 61.44 Ms/s
if
(
prach_fmt
==
0
||
prach_fmt
==
1
||
prach_fmt
==
2
)
dft
98304
(
prach2
,
rxsigF
[
aa
],
1
);
dft
(
DFT_98304
,
prach2
,
rxsigF
[
aa
],
1
);
if
(
prach_fmt
==
1
||
prach_fmt
==
2
)
{
dft
98304
(
prach2
+
196608
,
rxsigF
[
aa
]
+
196608
,
1
);
dft
(
DFT_98304
,
prach2
+
196608
,
rxsigF
[
aa
]
+
196608
,
1
);
reps
++
;
}
if
(
prach_fmt
==
1
||
prach_fmt
==
2
)
{
dft
98304
(
prach2
+
196608
,
rxsigF
[
aa
]
+
196608
,
1
);
dft
98304
(
prach2
+
(
196608
*
2
),
rxsigF
[
aa
]
+
(
196608
*
2
),
1
);
dft
(
DFT_98304
,
prach2
+
196608
,
rxsigF
[
aa
]
+
196608
,
1
);
dft
(
DFT_98304
,
prach2
+
(
196608
*
2
),
rxsigF
[
aa
]
+
(
196608
*
2
),
1
);
reps
+=
2
;
}
if
(
prach_fmt
==
3
)
{
dft
24576
(
prach2
+
(
2
*
49152
),
rxsigF
[
aa
]
+
(
2
*
49152
),
1
);
dft
(
DFT_24576
,
prach2
+
(
2
*
49152
),
rxsigF
[
aa
]
+
(
2
*
49152
),
1
);
reps
=
4
;
dftlen
=
24576
;
}
if
(
prach_fmt
>
3
)
{
dftlen
=
4096
;
dft
4096
(
prach2
,
rxsigF
[
aa
],
1
);
dft
(
DFT_4096
,
prach2
,
rxsigF
[
aa
],
1
);
if
(
prach_fmt
!=
0xc0
)
{
dft
4096
(
prach2
+
8192
,
rxsigF
[
aa
]
+
8192
,
1
);
dft
(
DFT_4096
,
prach2
+
8192
,
rxsigF
[
aa
]
+
8192
,
1
);
reps
++
;
}
}
if
(
prach_fmt
==
0xa2
||
prach_fmt
==
0xa3
||
prach_fmt
==
0xb2
||
prach_fmt
==
0xb3
||
prach_fmt
==
0xb4
||
prach_fmt
==
0xc2
)
{
dft
4096
(
prach2
+
8192
*
2
,
rxsigF
[
aa
]
+
8192
*
2
,
1
);
dft
4096
(
prach2
+
8192
*
3
,
rxsigF
[
aa
]
+
8192
*
3
,
1
);
dft
(
DFT_4096
,
prach2
+
8192
*
2
,
rxsigF
[
aa
]
+
8192
*
2
,
1
);
dft
(
DFT_4096
,
prach2
+
8192
*
3
,
rxsigF
[
aa
]
+
8192
*
3
,
1
);
reps
+=
2
;
}
if
(
prach_fmt
==
0xa3
||
prach_fmt
==
0xb3
||
prach_fmt
==
0xc2
)
{
dft
4096
(
prach2
+
8192
*
4
,
rxsigF
[
aa
]
+
8192
*
4
,
1
);
dft
4096
(
prach2
+
8192
*
5
,
rxsigF
[
aa
]
+
8192
*
5
,
1
);
dft
(
DFT_4096
,
prach2
+
8192
*
4
,
rxsigF
[
aa
]
+
8192
*
4
,
1
);
dft
(
DFT_4096
,
prach2
+
8192
*
5
,
rxsigF
[
aa
]
+
8192
*
5
,
1
);
reps
+=
2
;
}
if
(
prach_fmt
==
0xc2
)
{
for
(
int
i
=
6
;
i
<
11
;
i
++
)
dft
4096
(
prach2
+
(
8192
*
i
),
rxsigF
[
aa
]
+
(
8192
*
i
),
1
);
for
(
int
i
=
6
;
i
<
11
;
i
++
)
dft
(
DFT_4096
,
prach2
+
(
8192
*
i
),
rxsigF
[
aa
]
+
(
8192
*
i
),
1
);
reps
+=
6
;
}
}
else
{
...
...
@@ -303,39 +303,39 @@ void rx_nr_prach_ru(RU_t *ru,
// 80 MHz @ 46.08 Ms/s
dftlen
=
73728
;
if
(
prach_fmt
==
0
||
prach_fmt
==
1
||
prach_fmt
==
2
)
{
dft
73728
(
prach2
,
rxsigF
[
aa
],
1
);
dft
(
DFT_73728
,
prach2
,
rxsigF
[
aa
],
1
);
reps
++
;
}
if
(
prach_fmt
==
1
||
prach_fmt
==
2
)
{
dft
73728
(
prach2
+
(
2
*
73728
),
rxsigF
[
aa
]
+
(
2
*
73728
),
1
);
dft
(
DFT_73728
,
prach2
+
(
2
*
73728
),
rxsigF
[
aa
]
+
(
2
*
73728
),
1
);
reps
++
;
}
if
(
prach_fmt
==
3
)
{
dft
73728
(
prach2
+
(
4
*
73728
),
rxsigF
[
aa
]
+
(
4
*
73728
),
1
);
dft
(
DFT_73728
,
prach2
+
(
4
*
73728
),
rxsigF
[
aa
]
+
(
4
*
73728
),
1
);
reps
=
4
;
dftlen
=
18432
;
}
if
(
prach_fmt
>
3
)
{
dftlen
=
3072
;
dft
3072
(
prach2
,
rxsigF
[
aa
],
1
);
dft
(
DFT_3072
,
prach2
,
rxsigF
[
aa
],
1
);
if
(
prach_fmt
!=
0xc0
)
{
dft
3072
(
prach2
+
6144
,
rxsigF
[
aa
]
+
6144
,
1
);
dft
(
DFT_3072
,
prach2
+
6144
,
rxsigF
[
aa
]
+
6144
,
1
);
reps
++
;
}
}
if
(
prach_fmt
==
0xa2
||
prach_fmt
==
0xa3
||
prach_fmt
==
0xb2
||
prach_fmt
==
0xb3
||
prach_fmt
==
0xb4
||
prach_fmt
==
0xc2
)
{
dft
3072
(
prach2
+
6144
*
2
,
rxsigF
[
aa
]
+
6144
*
2
,
1
);
dft
3072
(
prach2
+
6144
*
3
,
rxsigF
[
aa
]
+
6144
*
3
,
1
);
dft
(
DFT_3072
,
prach2
+
6144
*
2
,
rxsigF
[
aa
]
+
6144
*
2
,
1
);
dft
(
DFT_3072
,
prach2
+
6144
*
3
,
rxsigF
[
aa
]
+
6144
*
3
,
1
);
reps
+=
2
;
}
if
(
prach_fmt
==
0xa3
||
prach_fmt
==
0xb3
||
prach_fmt
==
0xc2
)
{
dft
3072
(
prach2
+
6144
*
4
,
rxsigF
[
aa
]
+
6144
*
4
,
1
);
dft
3072
(
prach2
+
6144
*
5
,
rxsigF
[
aa
]
+
6144
*
5
,
1
);
dft
(
DFT_3072
,
prach2
+
6144
*
4
,
rxsigF
[
aa
]
+
6144
*
4
,
1
);
dft
(
DFT_3072
,
prach2
+
6144
*
5
,
rxsigF
[
aa
]
+
6144
*
5
,
1
);
reps
+=
2
;
}
if
(
prach_fmt
==
0xc2
)
{
for
(
int
i
=
6
;
i
<
11
;
i
++
)
dft
3072
(
prach2
+
(
6144
*
i
),
rxsigF
[
aa
]
+
(
6144
*
i
),
1
);
for
(
int
i
=
6
;
i
<
11
;
i
++
)
dft
(
DFT_3072
,
prach2
+
(
6144
*
i
),
rxsigF
[
aa
]
+
(
6144
*
i
),
1
);
reps
+=
6
;
}
}
...
...
@@ -590,12 +590,12 @@ void rx_nr_prach(PHY_VARS_gNB *gNB,
// Now do IFFT of size 1024 (N_ZC=839) or 256 (N_ZC=139)
if
(
N_ZC
==
839
)
{
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
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
)])
>>
10
;
}
else
{
idft
256
(
prachF
,
prach_ifft_tmp
,
1
);
idft
(
IDFT_256
,
prachF
,
prach_ifft_tmp
,
1
);
log2_ifft_size
=
8
;
// compute energy and accumulate over receive antennas and repetitions for BR
for
(
i
=
0
;
i
<
256
;
i
++
)
...
...
This diff is collapsed.
Click to expand it.
openair1/PHY/NR_TRANSPORT/nr_ulsch_demodulation.c
View file @
0518ced8
...
...
@@ -44,7 +44,7 @@ void nr_idft(uint32_t *z, uint32_t Msc_PUSCH)
switch
(
Msc_PUSCH
)
{
case
12
:
dft
12
((
int16_t
*
)
idft_in0
,
(
int16_t
*
)
idft_out
0
);
dft
(
DFT_12
,(
int16_t
*
)
idft_in0
,
(
int16_t
*
)
idft_out0
,
0
);
#if defined(__x86_64__)||defined(__i386__)
norm128
=
_mm_set1_epi16
(
9459
);
...
...
@@ -63,135 +63,135 @@ void nr_idft(uint32_t *z, uint32_t Msc_PUSCH)
break
;
case
24
:
dft
24
(
idft_in0
,
idft_out0
,
1
);
dft
(
DFT_24
,
idft_in0
,
idft_out0
,
1
);
break
;
case
36
:
dft
36
(
idft_in0
,
idft_out0
,
1
);
dft
(
DFT_36
,
idft_in0
,
idft_out0
,
1
);
break
;
case
48
:
dft
48
(
idft_in0
,
idft_out0
,
1
);
dft
(
DFT_48
,
idft_in0
,
idft_out0
,
1
);
break
;
case
60
:
dft
60
(
idft_in0
,
idft_out0
,
1
);
dft
(
DFT_60
,
idft_in0
,
idft_out0
,
1
);
break
;
case
72
:
dft
72
(
idft_in0
,
idft_out0
,
1
);
dft
(
DFT_72
,
idft_in0
,
idft_out0
,
1
);
break
;
case
96
:
dft
96
(
idft_in0
,
idft_out0
,
1
);
dft
(
DFT_96
,
idft_in0
,
idft_out0
,
1
);
break
;
case
108
:
dft
108
(
idft_in0
,
idft_out0
,
1
);
dft
(
DFT_108
,
idft_in0
,
idft_out0
,
1
);
break
;
case
120
:
dft
120
(
idft_in0
,
idft_out0
,
1
);
dft
(
DFT_120
,
idft_in0
,
idft_out0
,
1
);
break
;
case
144
:
dft
144
(
idft_in0
,
idft_out0
,
1
);
dft
(
DFT_144
,
idft_in0
,
idft_out0
,
1
);
break
;
case
180
:
dft
180
(
idft_in0
,
idft_out0
,
1
);
dft
(
DFT_180
,
idft_in0
,
idft_out0
,
1
);
break
;
case
192
:
dft
192
(
idft_in0
,
idft_out0
,
1
);
dft
(
DFT_192
,
idft_in0
,
idft_out0
,
1
);
break
;
case
216
:
dft
216
(
idft_in0
,
idft_out0
,
1
);
dft
(
DFT_216
,
idft_in0
,
idft_out0
,
1
);
break
;
case
240
:
dft
240
(
idft_in0
,
idft_out0
,
1
);
dft
(
DFT_240
,
idft_in0
,
idft_out0
,
1
);
break
;
case
288
:
dft
288
(
idft_in0
,
idft_out0
,
1
);
dft
(
DFT_288
,
idft_in0
,
idft_out0
,
1
);
break
;
case
300
:
dft
300
(
idft_in0
,
idft_out0
,
1
);
dft
(
DFT_300
,
idft_in0
,
idft_out0
,
1
);
break
;
case
324
:
dft
324
(
(
int16_t
*
)
idft_in0
,
(
int16_t
*
)
idft_out0
,
1
);
dft
(
DFT_324
,
(
int16_t
*
)
idft_in0
,
(
int16_t
*
)
idft_out0
,
1
);
break
;
case
360
:
dft
360
(
(
int16_t
*
)
idft_in0
,
(
int16_t
*
)
idft_out0
,
1
);
dft
(
DFT_360
,
(
int16_t
*
)
idft_in0
,
(
int16_t
*
)
idft_out0
,
1
);
break
;
case
384
:
dft
384
(
(
int16_t
*
)
idft_in0
,
(
int16_t
*
)
idft_out0
,
1
);
dft
(
DFT_384
,
(
int16_t
*
)
idft_in0
,
(
int16_t
*
)
idft_out0
,
1
);
break
;
case
432
:
dft
432
(
(
int16_t
*
)
idft_in0
,
(
int16_t
*
)
idft_out0
,
1
);
dft
(
DFT_432
,
(
int16_t
*
)
idft_in0
,
(
int16_t
*
)
idft_out0
,
1
);
break
;
case
480
:
dft
480
(
(
int16_t
*
)
idft_in0
,
(
int16_t
*
)
idft_out0
,
1
);
dft
(
DFT_480
,
(
int16_t
*
)
idft_in0
,
(
int16_t
*
)
idft_out0
,
1
);
break
;
case
540
:
dft
540
(
(
int16_t
*
)
idft_in0
,
(
int16_t
*
)
idft_out0
,
1
);
dft
(
DFT_540
,
(
int16_t
*
)
idft_in0
,
(
int16_t
*
)
idft_out0
,
1
);
break
;
case
576
:
dft
576
(
(
int16_t
*
)
idft_in0
,
(
int16_t
*
)
idft_out0
,
1
);
dft
(
DFT_576
,
(
int16_t
*
)
idft_in0
,
(
int16_t
*
)
idft_out0
,
1
);
break
;
case
600
:
dft
600
(
(
int16_t
*
)
idft_in0
,
(
int16_t
*
)
idft_out0
,
1
);
dft
(
DFT_600
,
(
int16_t
*
)
idft_in0
,
(
int16_t
*
)
idft_out0
,
1
);
break
;
case
648
:
dft
648
(
(
int16_t
*
)
idft_in0
,
(
int16_t
*
)
idft_out0
,
1
);
dft
(
DFT_648
,
(
int16_t
*
)
idft_in0
,
(
int16_t
*
)
idft_out0
,
1
);
break
;
case
720
:
dft
720
(
(
int16_t
*
)
idft_in0
,
(
int16_t
*
)
idft_out0
,
1
);
dft
(
DFT_720
,
(
int16_t
*
)
idft_in0
,
(
int16_t
*
)
idft_out0
,
1
);
break
;
case
768
:
dft
768
(
(
int16_t
*
)
idft_in0
,
(
int16_t
*
)
idft_out0
,
1
);
dft
(
DFT_768
,
(
int16_t
*
)
idft_in0
,
(
int16_t
*
)
idft_out0
,
1
);
break
;
case
864
:
dft
864
(
(
int16_t
*
)
idft_in0
,
(
int16_t
*
)
idft_out0
,
1
);
dft
(
DFT_864
,
(
int16_t
*
)
idft_in0
,
(
int16_t
*
)
idft_out0
,
1
);
break
;
case
900
:
dft
900
(
(
int16_t
*
)
idft_in0
,
(
int16_t
*
)
idft_out0
,
1
);
dft
(
DFT_900
,
(
int16_t
*
)
idft_in0
,
(
int16_t
*
)
idft_out0
,
1
);
break
;
case
960
:
dft
960
(
(
int16_t
*
)
idft_in0
,
(
int16_t
*
)
idft_out0
,
1
);
dft
(
DFT_960
,
(
int16_t
*
)
idft_in0
,
(
int16_t
*
)
idft_out0
,
1
);
break
;
case
972
:
dft
972
(
(
int16_t
*
)
idft_in0
,
(
int16_t
*
)
idft_out0
,
1
);
dft
(
DFT_972
,
(
int16_t
*
)
idft_in0
,
(
int16_t
*
)
idft_out0
,
1
);
break
;
case
1080
:
dft
1080
(
(
int16_t
*
)
idft_in0
,
(
int16_t
*
)
idft_out0
,
1
);
dft
(
DFT_1080
,
(
int16_t
*
)
idft_in0
,
(
int16_t
*
)
idft_out0
,
1
);
break
;
case
1152
:
dft
1152
(
(
int16_t
*
)
idft_in0
,
(
int16_t
*
)
idft_out0
,
1
);
dft
(
DFT_1152
,
(
int16_t
*
)
idft_in0
,
(
int16_t
*
)
idft_out0
,
1
);
break
;
case
1200
:
dft
1200
(
idft_in0
,
idft_out0
,
1
);
dft
(
DFT_1200
,
idft_in0
,
idft_out0
,
1
);
break
;
default:
...
...
This diff is collapsed.
Click to expand it.
openair1/PHY/NR_UE_ESTIMATION/nr_dl_channel_estimation.c
View file @
0518ced8
...
...
@@ -405,39 +405,39 @@ int nr_pbch_channel_estimation(PHY_VARS_NR_UE *ue,
}
void
(
*
idft
)(
int16_t
*
,
int16_t
*
,
int
)
;
idft_size_idx_t
idftsizeidx
;
switch
(
ue
->
frame_parms
.
ofdm_symbol_size
)
{
case
128
:
idft
=
idft
128
;
idft
sizeidx
=
IDFT_
128
;
break
;
case
256
:
idft
=
idft
256
;
idft
sizeidx
=
IDFT_
256
;
break
;
case
512
:
idft
=
idft
512
;
idft
sizeidx
=
IDFT_
512
;
break
;
case
1024
:
idft
=
idft
1024
;
idft
sizeidx
=
IDFT_
1024
;
break
;
case
1536
:
idft
=
idft
1536
;
idft
sizeidx
=
IDFT_
1536
;
break
;
case
2048
:
idft
=
idft
2048
;
idft
sizeidx
=
IDFT_
2048
;
break
;
case
3072
:
idft
=
idft
3072
;
idft
sizeidx
=
IDFT_
3072
;
break
;
case
4096
:
idft
=
idft
4096
;
idft
sizeidx
=
IDFT_
4096
;
break
;
default:
...
...
@@ -453,7 +453,8 @@ int nr_pbch_channel_estimation(PHY_VARS_NR_UE *ue,
if
(
ue
->
pbch_vars
[
eNB_offset
]
->
dl_ch_estimates
[(
p
<<
1
)
+
aarx
])
{
LOG_D
(
PHY
,
"Channel Impulse Computation Slot %d ThreadId %d Symbol %d ch_offset %d
\n
"
,
Ns
,
ue
->
current_thread_id
[
Ns
],
symbol
,
ch_offset
);
idft
((
int16_t
*
)
&
ue
->
pbch_vars
[
eNB_offset
]
->
dl_ch_estimates
[(
p
<<
1
)
+
aarx
][
ch_offset
],
idft
(
idftsizeidx
,
(
int16_t
*
)
&
ue
->
pbch_vars
[
eNB_offset
]
->
dl_ch_estimates
[(
p
<<
1
)
+
aarx
][
ch_offset
],
(
int16_t
*
)
ue
->
pbch_vars
[
eNB_offset
]
->
dl_ch_estimates_time
[(
p
<<
1
)
+
aarx
],
1
);
}
}
...
...
This diff is collapsed.
Click to expand it.
openair1/PHY/NR_UE_TRANSPORT/nr_prach.c
View file @
0518ced8
This diff is collapsed.
Click to expand it.
openair1/PHY/NR_UE_TRANSPORT/pss_nr.c
View file @
0518ced8
...
...
@@ -52,7 +52,7 @@
*
* PARAMETERS : size of ofdm symbol
*
* RETURN :
function idft
* RETURN :
index pointing to the dft func in the dft library
*
* DESCRIPTION : get idft function depending of ofdm size
*
...
...
@@ -60,45 +60,45 @@
//#define DBG_PSS_NR
void
*
get_idft
(
int
ofdm_symbol_size
)
idft_size_idx_t
get_idft
(
int
ofdm_symbol_size
)
{
void
(
*
idft
)(
int16_t
*
,
int16_t
*
,
int
);
switch
(
ofdm_symbol_size
)
{
case
128
:
idft
=
idft
128
;
return
IDFT_
128
;
break
;
case
256
:
idft
=
idft
256
;
return
IDFT_
256
;
break
;
case
512
:
idft
=
idft
512
;
return
IDFT_
512
;
break
;
case
1024
:
idft
=
idft
1024
;
return
IDFT_
1024
;
break
;
case
1536
:
idft
=
idft
1536
;
return
IDFT_
1536
;
break
;
case
2048
:
idft
=
idft
2048
;
return
IDFT_
2048
;
break
;
case
3072
:
idft
=
idft
3072
;
return
IDFT_
3072
;
break
;
case
4096
:
idft
=
idft
4096
;
return
IDFT_
4096
;
break
;
case
8192
:
idft
=
idft
8192
;
return
IDFT_
8192
;
break
;
default:
...
...
@@ -106,7 +106,7 @@ void *get_idft(int ofdm_symbol_size)
assert
(
0
);
break
;
}
return
idft
;
return
IDFT_SIZE_IDXTABLESIZE
;
// never reached and will trigger assertion in idft function
}
/*******************************************************************
...
...
@@ -121,41 +121,41 @@ void *get_idft(int ofdm_symbol_size)
*
*********************************************************************/
void
*
get_dft
(
int
ofdm_symbol_size
)
dft_size_idx_t
get_dft
(
int
ofdm_symbol_size
)
{
void
(
*
dft
)(
int16_t
*
,
int16_t
*
,
int
);
switch
(
ofdm_symbol_size
)
{
case
128
:
dft
=
dft
128
;
return
DFT_
128
;
break
;
case
256
:
dft
=
dft
256
;
return
DFT_
256
;
break
;
case
512
:
dft
=
dft
512
;
return
DFT_
512
;
break
;
case
1024
:
dft
=
dft
1024
;
return
DFT_
1024
;
break
;
case
1536
:
dft
=
dft
1536
;
return
DFT_
1536
;
break
;
case
2048
:
dft
=
dft
2048
;
return
DFT_
2048
;
break
;
case
4096
:
dft
=
dft
4096
;
return
DFT_
4096
;
break
;
case
8192
:
dft
=
dft
8192
;
return
DFT_
8192
;
break
;
default:
...
...
@@ -163,7 +163,7 @@ void *get_dft(int ofdm_symbol_size)
assert
(
0
);
break
;
}
return
dft
;
return
DFT_SIZE_IDXTABLESIZE
;
// never reached and will trigger assertion in idft function
;
}
/*******************************************************************
...
...
@@ -191,7 +191,7 @@ void generate_pss_nr(NR_DL_FRAME_PARMS *fp,int N_ID_2)
unsigned
int
size
=
length
*
IQ_SIZE
;
/* i & q */
int16_t
*
primary_synchro
=
primary_synchro_nr
[
N_ID_2
];
/* pss in complex with alternatively i then q */
int16_t
*
primary_synchro2
=
primary_synchro_nr2
[
N_ID_2
];
/* pss in complex with alternatively i then q */
void
(
*
idft
)(
int16_t
*
,
int16_t
*
,
int
);
#define INITIAL_PSS_NR (7)
const
int
x_initial
[
INITIAL_PSS_NR
]
=
{
0
,
1
,
1
,
0
,
1
,
1
,
1
};
...
...
@@ -282,9 +282,10 @@ void generate_pss_nr(NR_DL_FRAME_PARMS *fp,int N_ID_2)
/* IFFT will give temporal signal of Pss */
idft
=
get_idft
(
length
);
idft
(
synchroF_tmp
,
/* complex input */
idft
((
int16_t
)
get_idft
(
length
),
synchroF_tmp
,
/* complex input */
synchro_tmp
,
/* complex output */
1
);
/* scaling factor */
...
...
@@ -312,6 +313,7 @@ void generate_pss_nr(NR_DL_FRAME_PARMS *fp,int N_ID_2)
#endif
#if 0
/* it allows checking that process of idft on a signal and then dft gives same signal with limited errors */
...
...
@@ -323,10 +325,11 @@ void generate_pss_nr(NR_DL_FRAME_PARMS *fp,int N_ID_2)
bzero(synchroF_tmp, size);
void (*dft)(int16_t *,int16_t *, int) = get_dft(length);
/* get pss in the time domain by applying an inverse FFT */
dft(synchro_tmp, /* complex input */
dft((int16_t)get_dft(length),
synchro_tmp, /* complex input */
synchroF_tmp, /* complex output */
1); /* scaling factor */
...
...
This diff is collapsed.
Click to expand it.
openair1/PHY/NR_UE_TRANSPORT/sss_nr.c
View file @
0518ced8
...
...
@@ -182,7 +182,7 @@ void insert_sss_nr(int16_t *sss_time,
}
/* get sss in the frequency domain by applying an inverse FFT */
idft
2048
(
synchroF_tmp
,
/* complex input */
idft
(
IDFT_2048
,
synchroF_tmp
,
/* complex input */
synchro_tmp
,
/* complex output */
1
);
/* scaling factor */
...
...
This diff is collapsed.
Click to expand it.
openair1/PHY/TOOLS/dfts_load.c
0 → 100644
View file @
0518ced8
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
/*! \file openair1/PHY/CODING/coding_nr_load.c
* \brief: load library implementing coding/decoding algorithms
* \author Francois TABURET
* \date 2020
* \version 0.1
* \company NOKIA BellLabs France
* \email: francois.taburet@nokia-bell-labs.com
* \note
* \warning
*/
#define _GNU_SOURCE
#include <sys/types.h>
#include <stdlib.h>
#include <malloc.h>
#include "assertions.h"
#include "common/utils/LOG/log.h"
#define OAIDFTS_LOADER
#include "tools_defs.h"
#include "common/config/config_userapi.h"
#include "common/utils/load_module_shlib.h"
/* function description array, to be used when loading the dfts/idfts lib */
static
loader_shlibfunc_t
shlib_fdesc
[
2
];
static
char
*
arg
[
64
]
=
{
"phytest"
,
"-O"
,
"cmdlineonly::dbgl0"
};
int
load_dftslib
(
void
)
{
char
*
ptr
=
(
char
*
)
config_get_if
();
if
(
ptr
==
NULL
)
{
// phy simulators, config module possibly not loaded
load_configmodule
(
3
,(
char
**
)
arg
,
CONFIG_ENABLECMDLINEONLY
)
;
logInit
();
}
shlib_fdesc
[
0
].
fname
=
"dft"
;
shlib_fdesc
[
1
].
fname
=
"idft"
;
int
ret
=
load_module_shlib
(
"dfts"
,
shlib_fdesc
,
sizeof
(
shlib_fdesc
)
/
sizeof
(
loader_shlibfunc_t
),
NULL
);
AssertFatal
(
(
ret
>=
0
),
"Error loading dftsc decoder"
);
dft
=
(
dftfunc_t
)
shlib_fdesc
[
0
].
fptr
;
idft
=
(
idftfunc_t
)
shlib_fdesc
[
1
].
fptr
;
return
0
;
}
This diff is collapsed.
Click to expand it.
openair1/PHY/TOOLS/oai_dfts.c
View file @
0518ced8
...
...
@@ -31,7 +31,7 @@
#ifndef M_PI
#define M_PI 3.14159265358979323846
#endif
#define OAIDFTS
#define OAIDFTS
_MAIN
#ifndef MR_MAIN
#include "PHY/defs_common.h"
#include "PHY/impl_defs_top.h"
...
...
@@ -5697,12 +5697,12 @@ void dft6144(int16_t *input, int16_t *output,unsigned char scale)
int16_t
twa9216
[
6144
]
__attribute__
((
aligned
(
32
)));
int16_t
twb9216
[
6144
]
__attribute__
((
aligned
(
32
)));
// 3072 x 3
void
dft9216
(
int16_t
*
input
,
int16_t
*
output
,
in
t
scale
)
{
void
dft9216
(
int16_t
*
input
,
int16_t
*
output
,
uint8_
t
scale
)
{
AssertFatal
(
1
==
0
,
"Need to do this ..
\n
"
);
}
void
idft9216
(
int16_t
*
input
,
int16_t
*
output
,
in
t
scale
)
{
void
idft9216
(
int16_t
*
input
,
int16_t
*
output
,
uint8_
t
scale
)
{
AssertFatal
(
1
==
0
,
"Need to do this ..
\n
"
);
}
...
...
@@ -6059,11 +6059,11 @@ void idft24576(int16_t *input, int16_t *output,unsigned char scale)
int16_t
twa36864
[
24576
]
__attribute__
((
aligned
(
32
)));
int16_t
twb36884
[
24576
]
__attribute__
((
aligned
(
32
)));
// 12288 x 3
void
dft36864
(
int16_t
*
input
,
int16_t
*
output
,
in
t
scale
)
{
void
dft36864
(
int16_t
*
input
,
int16_t
*
output
,
uint8_
t
scale
)
{
AssertFatal
(
1
==
0
,
"Need to do this ..
\n
"
);
}
void
idft36864
(
int16_t
*
input
,
int16_t
*
output
,
in
t
scale
)
{
void
idft36864
(
int16_t
*
input
,
int16_t
*
output
,
uint8_
t
scale
)
{
AssertFatal
(
1
==
0
,
"Need to do this ..
\n
"
);
}
...
...
@@ -6071,12 +6071,12 @@ void idft36864(int16_t *input, int16_t *output,int scale) {
int16_t
twa49152
[
32768
]
__attribute__
((
aligned
(
32
)));
int16_t
twb49152
[
32768
]
__attribute__
((
aligned
(
32
)));
// 16384 x 3
void
dft49152
(
int16_t
*
input
,
int16_t
*
output
,
in
t
scale
)
{
void
dft49152
(
int16_t
*
input
,
int16_t
*
output
,
uint8_
t
scale
)
{
AssertFatal
(
1
==
0
,
"Need to do this ..
\n
"
);
}
void
idft49152
(
int16_t
*
input
,
int16_t
*
output
,
in
t
scale
)
{
void
idft49152
(
int16_t
*
input
,
int16_t
*
output
,
uint8_
t
scale
)
{
AssertFatal
(
1
==
0
,
"Need to do this ..
\n
"
);
}
...
...
@@ -6084,12 +6084,12 @@ void idft49152(int16_t *input, int16_t *output,int scale) {
int16_t
twa73728
[
49152
]
__attribute__
((
aligned
(
32
)));
int16_t
twb73728
[
49152
]
__attribute__
((
aligned
(
32
)));
// 24576 x 3
void
dft73728
(
int16_t
*
input
,
int16_t
*
output
,
in
t
scale
)
{
void
dft73728
(
int16_t
*
input
,
int16_t
*
output
,
uint8_
t
scale
)
{
AssertFatal
(
1
==
0
,
"Need to do this ..
\n
"
);
}
void
idft73728
(
int16_t
*
input
,
int16_t
*
output
,
in
t
scale
)
{
void
idft73728
(
int16_t
*
input
,
int16_t
*
output
,
uint8_
t
scale
)
{
AssertFatal
(
1
==
0
,
"Need to do this ..
\n
"
);
}
...
...
@@ -6098,12 +6098,12 @@ void idft73728(int16_t *input, int16_t *output,int scale) {
int16_t
twa98304
[
49152
]
__attribute__
((
aligned
(
32
)));
int16_t
twb98304
[
49152
]
__attribute__
((
aligned
(
32
)));
// 32768 x 3
void
dft98304
(
int16_t
*
input
,
int16_t
*
output
,
in
t
scale
)
{
void
dft98304
(
int16_t
*
input
,
int16_t
*
output
,
uint8_
t
scale
)
{
AssertFatal
(
1
==
0
,
"Need to do this ..
\n
"
);
}
void
idft98304
(
int16_t
*
input
,
int16_t
*
output
,
in
t
scale
)
{
void
idft98304
(
int16_t
*
input
,
int16_t
*
output
,
uint8_
t
scale
)
{
AssertFatal
(
1
==
0
,
"Need to do this ..
\n
"
);
}
...
...
@@ -8593,8 +8593,6 @@ void dft1200(int16_t *x,int16_t *y,unsigned char scale_flag)
}
//#define round trunc
void
init_rad4
(
int
N
,
int16_t
*
tw
)
{
int16_t
*
twa
=
tw
;
...
...
@@ -8710,13 +8708,13 @@ void init_rad5_rep(int N,int16_t *twa,int16_t *twb,int16_t *twc,int16_t *twd) {
twa
+=
8
;
twb
+=
8
;
twc
+=
8
;
twd
+=
8
;
twd
+=
8
;
}
}
/*----------------------------------------------------------------*/
/* dft library entry points: */
void
init_dfts
(
void
)
int
dfts_autoinit
(
void
)
{
init_rad4
(
1024
,
tw1024
);
init_rad2
(
2048
,
tw2048
);
...
...
@@ -8763,10 +8761,12 @@ void init_dfts(void)
init_rad3_rep
(
1080
,
twa1080
,
twb1080
);
init_rad4_rep
(
1152
,
twa1152
,
twb1152
,
twc1152
);
init_rad4_rep
(
1200
,
twa1200
,
twb1200
,
twc1200
);
return
0
;
}
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
);
...
...
@@ -8779,7 +8779,6 @@ void idft(uint8_t sizeidx, int16_t *sigF,int16_t *sig,unsigned char scale_flag){
/*---------------------------------------------------------------------------------------*/
#ifdef MR_MAIN
#include <string.h>
#include <stdio.h>
...
...
@@ -8949,12 +8948,12 @@ int main(int argc, char**argv)
#ifdef __AVX2__
simd256_q15_t
x
[
4096
],
x2
[
4096
],
y
[
4096
],
tw0
,
tw1
,
tw2
,
tw3
;
#else
simd_q15_t
x
[
8192
],
x2
[
8192
],
y
[
8192
],
tw0
,
tw1
,
tw2
,
tw3
;
simd_q15_t
x
[
8192
],
y
[
8192
],
tw0
,
tw1
,
tw2
,
tw3
;
#endif
int
i
;
simd_q15_t
*
x128
=
(
simd_q15_t
*
)
x
,
*
y128
=
(
simd_q15_t
*
)
y
;
init_dfts
();
dfts_autoinit
();
set_taus_seed
(
0
);
opp_enabled
=
1
;
...
...
This diff is collapsed.
Click to expand it.
openair1/PHY/TOOLS/tools_defs.h
View file @
0518ced8
...
...
@@ -36,6 +36,8 @@ extern "C" {
#include <stdint.h>
#include "PHY/sse_intrin.h"
#define CEILIDIV(a,b) ((a+b-1)/b)
#define ROUNDIDIV(a,b) (((a<<1)+b)/(b<<1))
struct
complex
{
double
x
;
...
...
@@ -186,7 +188,7 @@ This function performs optimized fixed-point radix-2 FFT/IFFT.
#ifdef OAIDFTS
#ifdef OAIDFTS
_MAIN
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
);
...
...
@@ -195,15 +197,18 @@ 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
dft64
(
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
dft128
(
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
dft256
(
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
);
...
...
@@ -211,6 +216,7 @@ 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
dft512
(
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
);
...
...
@@ -221,208 +227,100 @@ 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
dft1024
(
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
dft1536
(
int16_t
*
sigF
,
int16_t
*
sig
,
uint8_t
scale_flag
);
void
dft2048
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
dft3072
(
int16_t
*
sigF
,
int16_t
*
sig
,
uint8_t
scale_flag
);
void
dft4096
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
dft6144
(
int16_t
*
sigF
,
int16_t
*
sig
,
uint8_t
scale_flag
);
void
dft8192
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
dft9216
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
dft12288
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
dft18432
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
dft24576
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
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
);
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
idft1536
(
int16_t
*
sigF
,
int16_t
*
sig
,
uint8_t
scale_flag
);
void
idft2048
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
idft3072
(
int16_t
*
sigF
,
int16_t
*
sig
,
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
idft8192
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
idft9216
(
int16_t
*
x
,
int16_t
*
y
,
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
idft36864
(
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
idft98304
(
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
;
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
);
# ifdef OAIDFTS_LOADER
dftfunc_t
dft
;
idftfunc_t
idft
;
# else
extern
dftfunc_t
dft
;
extern
idftfunc_t
idft
;
extern
int
load_dftslib
(
void
);
# endif
#endif
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_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_9216
,
DFT_12288
,
DFT_18432
,
DFT_24576
,
DFT_36864
,
DFT_49152
,
DFT_73728
,
DFT_98304
,
DFT_SIZE_IDXTABLESIZE
}
dft_size_idx_t
;
#ifdef OAIDFTS
#ifdef OAIDFTS
_MAIN
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
,
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
,
dft9216
,
dft12288
,
dft18432
,
dft24576
,
dft36864
,
dft49152
,
dft73728
,
dft98304
};
#endif
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_128
,
IDFT_256
,
IDFT_512
,
IDFT_1024
,
IDFT_1536
,
IDFT_2048
,
IDFT_3072
,
IDFT_4096
,
IDFT_6144
,
IDFT_8192
,
IDFT_9216
,
IDFT_12288
,
IDFT_18432
,
IDFT_24576
,
IDFT_36864
,
IDFT_49152
,
IDFT_73728
,
IDFT_98304
,
IDFT_SIZE_IDXTABLESIZE
}
idft_size_idx_t
;
#ifdef OAIDFTS
#ifdef OAIDFTS
_MAIN
aidftfunc_t
idft_ftab
[]
=
{
idft128
,
idft256
,
idft512
,
idft1024
,
idft1536
,
idft2048
,
idft3072
,
idft4096
,
idft6144
,
idft8192
,
idft12288
,
idft18432
,
idft24576
,
idft128
,
idft256
,
idft512
,
idft1024
,
idft1536
,
idft2048
,
idft3072
,
idft4096
,
idft6144
,
idft8192
,
idft9216
,
idft12288
,
idft18432
,
idft24576
,
idft36864
,
idft49152
,
idft73728
,
idft98304
};
#endif
void
dft49152
(
int16_t
*
sigF
,
int16_t
*
sig
,
int
scale
);
void
idft49152
(
int16_t
*
sigF
,
int16_t
*
sig
,
int
scale
);
void
dft9216
(
int16_t
*
sigF
,
int16_t
*
sig
,
int
scale
);
void
idft9216
(
int16_t
*
sigF
,
int16_t
*
sig
,
int
scale
);
void
dft36864
(
int16_t
*
sigF
,
int16_t
*
sig
,
int
scale
);
void
idft36864
(
int16_t
*
sigF
,
int16_t
*
sig
,
int
scale
);
void
dft98304
(
int16_t
*
sigF
,
int16_t
*
sig
,
int
scale
);
void
idft98304
(
int16_t
*
sigF
,
int16_t
*
sig
,
int
scale
);
void
dft73728
(
int16_t
*
sigF
,
int16_t
*
sig
,
int
scale
);
void
idft73728
(
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)
This function performs componentwise multiplication of a vector with a complex scalar.
...
...
This diff is collapsed.
Click to expand it.
openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c
View file @
0518ced8
...
...
@@ -1917,6 +1917,7 @@ int nr_ue_process_dci_indication_pdu(module_id_t module_id,int cc_id, int gNB_in
nr_extract_dci_info
(
mac
,
dci
->
dci_format
,
dci
->
payloadSize
,
dci
->
rnti
,(
uint64_t
*
)
dci
->
payloadBits
,
&
dci_pdu_rel15
);
nr_ue_process_dci
(
module_id
,
cc_id
,
gNB_index
,
&
dci_pdu_rel15
,
dci
->
rnti
,
dci
->
dci_format
);
return
0
;
}
int8_t
nr_ue_process_dci
(
module_id_t
module_id
,
int
cc_id
,
uint8_t
gNB_index
,
nr_dci_pdu_rel15_t
*
dci
,
uint16_t
rnti
,
uint32_t
dci_format
){
...
...
This diff is collapsed.
Click to expand it.
openair2/RRC/NR/MESSAGES/asn1_msg.c
View file @
0518ced8
...
...
@@ -570,8 +570,8 @@ void do_PHYSICALCELLGROUP(uint8_t Mod_id,
void
do_SpCellConfig
(
gNB_RRC_INST
*
rrc
,
struct
NR_SpCellConfig
*
spconfig
){
gNB_RrcConfigurationReq
*
common_configuration
;
common_configuration
=
CALLOC
(
1
,
sizeof
(
gNB_RrcConfigurationReq
));
//
gNB_RrcConfigurationReq *common_configuration;
//
common_configuration = CALLOC(1,sizeof(gNB_RrcConfigurationReq));
//Fill servingcellconfigcommon config value
//Fill common config to structure
// rrc->configuration = common_configuration;
...
...
This diff is collapsed.
Click to expand it.
openair2/X2AP/x2ap_eNB_generate_messages.c
View file @
0518ced8
...
...
@@ -1691,11 +1691,11 @@ int x2ap_gNB_generate_ENDC_x2_SgNB_addition_request_ACK( x2ap_eNB_instance_t *in
// Currently hardcoded (dummy) values filling the fields of SgNB_addition_request message. To be substituted
// with values coming from RRC.
uint16_t
nRencryptionAlgorithms
=
0
;
uint16_t
nRintegrityProtectionAlgorithms
=
0
;
uint8_t
SgNBSecurityKey
[
32
]
=
{
0
};
int
uEaggregateMaximumBitRateDownlink
=
100000000
;
int
uEaggregateMaximumBitRateUplink
=
100000000
;
//
uint16_t nRencryptionAlgorithms = 0;
//
uint16_t nRintegrityProtectionAlgorithms = 0;
//
uint8_t SgNBSecurityKey[32] = { 0 };
//
int uEaggregateMaximumBitRateDownlink = 100000000;
//
int uEaggregateMaximumBitRateUplink = 100000000;
int
e_rabs_admitted_tobeadded
=
1
;
int
e_RAB_ID
=
1
;
long
int
pDCPatSgNB
=
X2AP_EN_DC_ResourceConfiguration__pDCPatSgNB_present
;
...
...
This diff is collapsed.
Click to expand it.
openair2/X2AP/x2ap_eNB_handler.c
View file @
0518ced8
...
...
@@ -1773,7 +1773,7 @@ int x2ap_gNB_handle_ENDC_sGNB_addition_request (instance_t instance,
X2AP_MeNBtoSgNBContainer_t
*
container
=
&
ie
->
value
.
choice
.
MeNBtoSgNBContainer
;
if
(
ie
->
value
.
choice
.
MeNBtoSgNBContainer
.
size
>
8192
)
// TODO: this is the size of rrc_buffer in struct x2ap_handover_req_s
if
(
container
->
size
>
8192
)
// TODO: this is the size of rrc_buffer in struct x2ap_handover_req_s
{
printf
(
"%s:%d: fatal: buffer too big
\n
"
,
__FILE__
,
__LINE__
);
abort
();
}
memcpy
(
X2AP_ENDC_SGNB_ADDITION_REQ
(
msg
).
rrc_buffer
,
ie
->
value
.
choice
.
MeNBtoSgNBContainer
.
buf
,
ie
->
value
.
choice
.
MeNBtoSgNBContainer
.
size
);
...
...
@@ -1943,7 +1943,6 @@ int x2ap_gNB_handle_ENDC_sGNB_reconfiguration_complete (instance_t instance,
x2ap_eNB_instance_t
*
instance_p
;
x2ap_eNB_data_t
*
x2ap_eNB_data
;
MessageDef
*
msg
;
int
ue_id
;
DevAssert
(
pdu
!=
NULL
);
x2SgNBReconfigurationComplete
=
&
pdu
->
choice
.
initiatingMessage
.
value
.
choice
.
SgNBReconfigurationComplete
;
...
...
This diff is collapsed.
Click to expand it.
targets/RT/USER/lte-ue.c
View file @
0518ced8
...
...
@@ -589,7 +589,7 @@ static void *UE_thread_synch(void *arg)
LOG_I
(
PHY
,
"[UE thread Synch] Running Initial Synch (mode %d)
\n
"
,
UE
->
mode
);
if
(
initial_sync
(
UE
,
UE
->
mode
)
==
0
)
{
LOG_I
(
HW
,
"Got synch: hw_slot_offset %d, carrier off %d Hz, rxgain %d (DL %
u, UL %
u), UE_scan_carrier %d
\n
"
,
LOG_I
(
HW
,
"Got synch: hw_slot_offset %d, carrier off %d Hz, rxgain %d (DL %
lu, UL %l
u), UE_scan_carrier %d
\n
"
,
(
UE
->
rx_offset
<<
1
)
/
UE
->
frame_parms
.
samples_per_tti
,
freq_offset
,
UE
->
rx_total_gain_dB
,
...
...
@@ -714,7 +714,7 @@ static void *UE_thread_synch(void *arg)
}
}
LOG_I
(
PHY
,
"[initial_sync] trying carrier off %d Hz, rxgain %d (DL %
u, UL %
u)
\n
"
,
LOG_I
(
PHY
,
"[initial_sync] trying carrier off %d Hz, rxgain %d (DL %
lu, UL %l
u)
\n
"
,
freq_offset
,
UE
->
rx_total_gain_dB
,
downlink_frequency
[
0
][
0
]
+
freq_offset
,
...
...
@@ -2071,7 +2071,7 @@ int setup_ue_buffers(PHY_VARS_UE **phy_vars_ue,
txdata
=
(
int32_t
**
)
malloc16
(
frame_parms
->
nb_antennas_tx
*
sizeof
(
int32_t
*
)
);
for
(
i
=
0
;
i
<
frame_parms
->
nb_antennas_rx
;
i
++
)
{
LOG_I
(
PHY
,
"Mapping UE CC_id %d, rx_ant %d, freq %u on card %d, chain %d
\n
"
,
LOG_I
(
PHY
,
"Mapping UE CC_id %d, rx_ant %d, freq %
l
u on card %d, chain %d
\n
"
,
CC_id
,
i
,
downlink_frequency
[
CC_id
][
i
],
phy_vars_ue
[
CC_id
]
->
rf_map
.
card
,
(
phy_vars_ue
[
CC_id
]
->
rf_map
.
chain
)
+
i
);
free
(
phy_vars_ue
[
CC_id
]
->
common_vars
.
rxdata
[
i
]
);
rxdata
[
i
]
=
(
int32_t
*
)
malloc16_clear
(
307200
*
sizeof
(
int32_t
)
);
...
...
@@ -2079,7 +2079,7 @@ int setup_ue_buffers(PHY_VARS_UE **phy_vars_ue,
}
for
(
i
=
0
;
i
<
frame_parms
->
nb_antennas_tx
;
i
++
)
{
LOG_I
(
PHY
,
"Mapping UE CC_id %d, tx_ant %d, freq %u on card %d, chain %d
\n
"
,
LOG_I
(
PHY
,
"Mapping UE CC_id %d, tx_ant %d, freq %
l
u on card %d, chain %d
\n
"
,
CC_id
,
i
,
downlink_frequency
[
CC_id
][
i
],
phy_vars_ue
[
CC_id
]
->
rf_map
.
card
,
(
phy_vars_ue
[
CC_id
]
->
rf_map
.
chain
)
+
i
);
free
(
phy_vars_ue
[
CC_id
]
->
common_vars
.
txdata
[
i
]
);
txdata
[
i
]
=
(
int32_t
*
)
malloc16_clear
(
307200
*
sizeof
(
int32_t
)
);
...
...
This diff is collapsed.
Click to expand it.
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