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
lizhongxiao
OpenXG-RAN
Commits
65c427b1
Commit
65c427b1
authored
Mar 29, 2019
by
Florian Kaltenberger
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'thread-pool' of
https://gitlab.eurecom.fr/oai/openairinterface5g
into thread-pool
parents
19d9693c
bda26020
Changes
14
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
151 additions
and
225 deletions
+151
-225
common/utils/LOG/log.c
common/utils/LOG/log.c
+1
-0
common/utils/LOG/log.h
common/utils/LOG/log.h
+1
-0
common/utils/utils.h
common/utils/utils.h
+16
-0
executables/nr-ue.c
executables/nr-ue.c
+5
-5
openair1/PHY/INIT/nr_init_ue.c
openair1/PHY/INIT/nr_init_ue.c
+3
-4
openair1/PHY/MODULATION/slot_fep_nr.c
openair1/PHY/MODULATION/slot_fep_nr.c
+89
-186
openair1/PHY/NR_UE_ESTIMATION/nr_dl_channel_estimation.c
openair1/PHY/NR_UE_ESTIMATION/nr_dl_channel_estimation.c
+8
-10
openair1/PHY/NR_UE_ESTIMATION/nr_estimation.h
openair1/PHY/NR_UE_ESTIMATION/nr_estimation.h
+0
-2
openair1/PHY/NR_UE_TRANSPORT/nr_initial_sync.c
openair1/PHY/NR_UE_TRANSPORT/nr_initial_sync.c
+6
-6
openair1/PHY/NR_UE_TRANSPORT/nr_pbch.c
openair1/PHY/NR_UE_TRANSPORT/nr_pbch.c
+5
-6
openair1/PHY/NR_UE_TRANSPORT/pss_nr.c
openair1/PHY/NR_UE_TRANSPORT/pss_nr.c
+4
-4
openair1/PHY/TOOLS/nr_phy_scope.c
openair1/PHY/TOOLS/nr_phy_scope.c
+1
-1
openair1/PHY/TOOLS/time_meas.h
openair1/PHY/TOOLS/time_meas.h
+11
-0
openair1/PHY/defs_nr_UE.h
openair1/PHY/defs_nr_UE.h
+1
-1
No files found.
common/utils/LOG/log.c
View file @
65c427b1
...
@@ -478,6 +478,7 @@ void logRecord_mt(const char *file, const char *func, int line, int comp, int le
...
@@ -478,6 +478,7 @@ void logRecord_mt(const char *file, const char *func, int line, int comp, int le
log_header
(
log_buffer
,
MAX_LOG_TOTAL
,
comp
,
level
,
format
);
log_header
(
log_buffer
,
MAX_LOG_TOTAL
,
comp
,
level
,
format
);
g_log
->
log_component
[
comp
].
vprint
(
g_log
->
log_component
[
comp
].
stream
,
log_buffer
,
args
);
g_log
->
log_component
[
comp
].
vprint
(
g_log
->
log_component
[
comp
].
stream
,
log_buffer
,
args
);
fflush
(
g_log
->
log_component
[
comp
].
stream
);
va_end
(
args
);
va_end
(
args
);
...
...
common/utils/LOG/log.h
View file @
65c427b1
...
@@ -53,6 +53,7 @@
...
@@ -53,6 +53,7 @@
#endif
#endif
#include <pthread.h>
#include <pthread.h>
#include "T.h"
#include "T.h"
#include <common/utils/utils.h>
/*----------------------------------------------------------------------------*/
/*----------------------------------------------------------------------------*/
#ifdef __cplusplus
#ifdef __cplusplus
...
...
common/utils/utils.h
View file @
65c427b1
...
@@ -3,6 +3,9 @@
...
@@ -3,6 +3,9 @@
#include <stdint.h>
#include <stdint.h>
#include <sys/types.h>
#include <sys/types.h>
#ifdef __cplusplus
extern
"C"
{
#endif
void
*
calloc_or_fail
(
size_t
size
);
void
*
calloc_or_fail
(
size_t
size
);
void
*
malloc_or_fail
(
size_t
size
);
void
*
malloc_or_fail
(
size_t
size
);
...
@@ -14,4 +17,17 @@ int hex_string_to_hex_value (uint8_t *hex_value, const char *hex_string, int siz
...
@@ -14,4 +17,17 @@ int hex_string_to_hex_value (uint8_t *hex_value, const char *hex_string, int siz
char
*
itoa
(
int
i
);
char
*
itoa
(
int
i
);
#define findInList(keY, result, list, element_type) {\
int i;\
for (i=0; i<sizeof(list)/sizeof(element_type) ; i++)\
if (list[i].key==keY) {\
result=list[i].val;\
break;\
}\
AssertFatal(i < sizeof(list)/sizeof(element_type), "List %s doesn't contain %s\n",#list, #keY); \
}
#ifdef __cplusplus
}
#endif
#endif
#endif
executables/nr-ue.c
View file @
65c427b1
...
@@ -453,7 +453,7 @@ void readFrame(PHY_VARS_NR_UE *UE, openair0_timestamp *timestamp) {
...
@@ -453,7 +453,7 @@ void readFrame(PHY_VARS_NR_UE *UE, openair0_timestamp *timestamp) {
for
(
int
x
=
0
;
x
<
10
;
x
++
)
{
for
(
int
x
=
0
;
x
<
10
;
x
++
)
{
for
(
int
i
=
0
;
i
<
UE
->
frame_parms
.
nb_antennas_rx
;
i
++
)
for
(
int
i
=
0
;
i
<
UE
->
frame_parms
.
nb_antennas_rx
;
i
++
)
rxp
[
i
]
=
((
void
*
)
&
UE
->
common_vars
.
rxdata
[
i
][
0
])
+
4
*
x
*
UE
->
frame_parms
.
samples_per_subframe
;
rxp
[
i
]
=
((
void
*
)
&
UE
->
common_vars
.
rxdata
Time
[
i
][
0
])
+
4
*
x
*
UE
->
frame_parms
.
samples_per_subframe
;
AssertFatal
(
UE
->
frame_parms
.
samples_per_subframe
==
AssertFatal
(
UE
->
frame_parms
.
samples_per_subframe
==
UE
->
rfdevice
.
trx_read_func
(
&
UE
->
rfdevice
,
UE
->
rfdevice
.
trx_read_func
(
&
UE
->
rfdevice
,
...
@@ -507,7 +507,7 @@ void syncInFrame(PHY_VARS_NR_UE *UE, openair0_timestamp *timestamp) {
...
@@ -507,7 +507,7 @@ void syncInFrame(PHY_VARS_NR_UE *UE, openair0_timestamp *timestamp) {
AssertFatal
(
unitTransfer
==
AssertFatal
(
unitTransfer
==
UE
->
rfdevice
.
trx_read_func
(
&
UE
->
rfdevice
,
UE
->
rfdevice
.
trx_read_func
(
&
UE
->
rfdevice
,
timestamp
,
timestamp
,
(
void
**
)
UE
->
common_vars
.
rxdata
,
(
void
**
)
UE
->
common_vars
.
rxdata
Time
,
unitTransfer
,
unitTransfer
,
UE
->
frame_parms
.
nb_antennas_rx
),
""
);
UE
->
frame_parms
.
nb_antennas_rx
),
""
);
}
}
...
@@ -593,7 +593,7 @@ void *UE_thread(void *arg) {
...
@@ -593,7 +593,7 @@ void *UE_thread(void *arg) {
AssertFatal
(
UE
->
frame_parms
.
ofdm_symbol_size
+
UE
->
frame_parms
.
nb_prefix_samples0
==
AssertFatal
(
UE
->
frame_parms
.
ofdm_symbol_size
+
UE
->
frame_parms
.
nb_prefix_samples0
==
UE
->
rfdevice
.
trx_read_func
(
&
UE
->
rfdevice
,
UE
->
rfdevice
.
trx_read_func
(
&
UE
->
rfdevice
,
&
timestamp
,
&
timestamp
,
(
void
**
)
UE
->
common_vars
.
rxdata
,
(
void
**
)
UE
->
common_vars
.
rxdata
Time
,
UE
->
frame_parms
.
ofdm_symbol_size
+
UE
->
frame_parms
.
nb_prefix_samples0
,
UE
->
frame_parms
.
ofdm_symbol_size
+
UE
->
frame_parms
.
nb_prefix_samples0
,
UE
->
frame_parms
.
nb_antennas_rx
),
""
);
UE
->
frame_parms
.
nb_antennas_rx
),
""
);
continue
;
continue
;
...
@@ -614,7 +614,7 @@ void *UE_thread(void *arg) {
...
@@ -614,7 +614,7 @@ void *UE_thread(void *arg) {
LOG_D
(
PHY
,
"Process slot %d thread Idx %d
\n
"
,
slot_nr
,
thread_idx
);
LOG_D
(
PHY
,
"Process slot %d thread Idx %d
\n
"
,
slot_nr
,
thread_idx
);
for
(
int
i
=
0
;
i
<
UE
->
frame_parms
.
nb_antennas_rx
;
i
++
)
for
(
int
i
=
0
;
i
<
UE
->
frame_parms
.
nb_antennas_rx
;
i
++
)
rxp
[
i
]
=
(
void
*
)
&
UE
->
common_vars
.
rxdata
[
i
][
UE
->
frame_parms
.
ofdm_symbol_size
+
rxp
[
i
]
=
(
void
*
)
&
UE
->
common_vars
.
rxdata
Time
[
i
][
UE
->
frame_parms
.
ofdm_symbol_size
+
UE
->
frame_parms
.
nb_prefix_samples0
+
UE
->
frame_parms
.
nb_prefix_samples0
+
slot_nr
*
UE
->
frame_parms
.
samples_per_slot
];
slot_nr
*
UE
->
frame_parms
.
samples_per_slot
];
...
@@ -661,7 +661,7 @@ void *UE_thread(void *arg) {
...
@@ -661,7 +661,7 @@ void *UE_thread(void *arg) {
AssertFatal
(
first_symbols
==
AssertFatal
(
first_symbols
==
UE
->
rfdevice
.
trx_read_func
(
&
UE
->
rfdevice
,
UE
->
rfdevice
.
trx_read_func
(
&
UE
->
rfdevice
,
&
timestamp
,
&
timestamp
,
(
void
**
)
UE
->
common_vars
.
rxdata
,
(
void
**
)
UE
->
common_vars
.
rxdata
Time
,
first_symbols
,
first_symbols
,
UE
->
frame_parms
.
nb_antennas_rx
),
""
);
UE
->
frame_parms
.
nb_antennas_rx
),
""
);
else
else
...
...
openair1/PHY/INIT/nr_init_ue.c
View file @
65c427b1
...
@@ -19,7 +19,7 @@
...
@@ -19,7 +19,7 @@
* contact@openairinterface.org
* contact@openairinterface.org
*/
*/
#include "phy_init.h"
#include "
PHY/INIT/
phy_init.h"
#include "SCHED_UE/sched_UE.h"
#include "SCHED_UE/sched_UE.h"
#include "PHY/phy_extern_nr_ue.h"
#include "PHY/phy_extern_nr_ue.h"
//#include "SIMULATION/TOOLS/sim.h"
//#include "SIMULATION/TOOLS/sim.h"
...
@@ -34,7 +34,6 @@
...
@@ -34,7 +34,6 @@
#include "PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h"
#include "PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h"
//#include "PHY/LTE_REFSIG/lte_refsig.h"
//#include "PHY/LTE_REFSIG/lte_refsig.h"
#include "PHY/CODING/nrPolar_tools/nr_polar_pbch_defs.h"
#include "PHY/CODING/nrPolar_tools/nr_polar_pbch_defs.h"
#include "PHY/INIT/phy_init.h"
#include "PHY/NR_REFSIG/pss_nr.h"
#include "PHY/NR_REFSIG/pss_nr.h"
#include "openair1/PHY/NR_REFSIG/ul_ref_seq_nr.h"
#include "openair1/PHY/NR_REFSIG/ul_ref_seq_nr.h"
...
@@ -711,13 +710,13 @@ int init_nr_ue_signal(PHY_VARS_NR_UE *ue,
...
@@ -711,13 +710,13 @@ int init_nr_ue_signal(PHY_VARS_NR_UE *ue,
// init RX buffers
// init RX buffers
common_vars
->
rxdata
=
(
int32_t
**
)
malloc16
(
fp
->
nb_antennas_rx
*
sizeof
(
int32_t
*
)
);
common_vars
->
rxdata
Time
=
(
int32_t
**
)
malloc16
(
fp
->
nb_antennas_rx
*
sizeof
(
int32_t
*
)
);
for
(
th_id
=
0
;
th_id
<
RX_NB_TH_MAX
;
th_id
++
)
{
for
(
th_id
=
0
;
th_id
<
RX_NB_TH_MAX
;
th_id
++
)
{
common_vars
->
common_vars_rx_data_per_thread
[
th_id
].
rxdataF
=
(
int32_t
**
)
malloc16
(
fp
->
nb_antennas_rx
*
sizeof
(
int32_t
*
)
);
common_vars
->
common_vars_rx_data_per_thread
[
th_id
].
rxdataF
=
(
int32_t
**
)
malloc16
(
fp
->
nb_antennas_rx
*
sizeof
(
int32_t
*
)
);
}
}
for
(
i
=
0
;
i
<
fp
->
nb_antennas_rx
;
i
++
)
{
for
(
i
=
0
;
i
<
fp
->
nb_antennas_rx
;
i
++
)
{
common_vars
->
rxdata
[
i
]
=
(
int32_t
*
)
malloc16_clear
(
(
fp
->
samples_per_subframe
*
10
+
2048
)
*
sizeof
(
int32_t
)
);
common_vars
->
rxdata
Time
[
i
]
=
(
int32_t
*
)
malloc16_clear
(
(
fp
->
samples_per_subframe
*
10
+
2048
)
*
sizeof
(
int32_t
)
);
for
(
th_id
=
0
;
th_id
<
RX_NB_TH_MAX
;
th_id
++
)
{
for
(
th_id
=
0
;
th_id
<
RX_NB_TH_MAX
;
th_id
++
)
{
common_vars
->
common_vars_rx_data_per_thread
[
th_id
].
rxdataF
[
i
]
=
(
int32_t
*
)
malloc16_clear
(
sizeof
(
int32_t
)
*
(
fp
->
ofdm_symbol_size
*
14
)
);
common_vars
->
common_vars_rx_data_per_thread
[
th_id
].
rxdataF
[
i
]
=
(
int32_t
*
)
malloc16_clear
(
sizeof
(
int32_t
)
*
(
fp
->
ofdm_symbol_size
*
14
)
);
}
}
...
...
openair1/PHY/MODULATION/slot_fep_nr.c
View file @
65c427b1
This diff is collapsed.
Click to expand it.
openair1/PHY/NR_UE_ESTIMATION/nr_dl_channel_estimation.c
View file @
65c427b1
...
@@ -413,7 +413,6 @@ int nr_pbch_channel_estimation(PHY_VARS_NR_UE *ue,
...
@@ -413,7 +413,6 @@ int nr_pbch_channel_estimation(PHY_VARS_NR_UE *ue,
int
nr_pdcch_channel_estimation
(
PHY_VARS_NR_UE
*
ue
,
int
nr_pdcch_channel_estimation
(
PHY_VARS_NR_UE
*
ue
,
uint8_t
eNB_offset
,
uint8_t
eNB_offset
,
unsigned
char
Ns
,
unsigned
char
Ns
,
unsigned
char
l
,
unsigned
char
symbol
,
unsigned
char
symbol
,
unsigned
short
coreset_start_subcarrier
,
unsigned
short
coreset_start_subcarrier
,
unsigned
short
nb_rb_coreset
)
unsigned
short
nb_rb_coreset
)
...
@@ -616,14 +615,14 @@ int nr_pdcch_channel_estimation(PHY_VARS_NR_UE *ue,
...
@@ -616,14 +615,14 @@ int nr_pdcch_channel_estimation(PHY_VARS_NR_UE *ue,
break
;
break
;
}
}
if
(
(
Ns
==
1
)
&&
(
l
==
0
))
if
(
(
Ns
==
1
)
&&
(
symbo
l
==
0
))
{
{
// do ifft of channel estimate
// do ifft of channel estimate
for
(
aarx
=
0
;
aarx
<
ue
->
frame_parms
.
nb_antennas_rx
;
aarx
++
)
for
(
aarx
=
0
;
aarx
<
ue
->
frame_parms
.
nb_antennas_rx
;
aarx
++
)
for
(
p
=
0
;
p
<
ue
->
frame_parms
.
nb_antenna_ports_eNB
;
p
++
)
{
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
]].
dl_ch_estimates
[
eNB_offset
][(
p
<<
1
)
+
aarx
])
if
(
ue
->
common_vars
.
common_vars_rx_data_per_thread
[
ue
->
current_thread_id
[
Ns
]].
dl_ch_estimates
[
eNB_offset
][(
p
<<
1
)
+
aarx
])
{
{
LOG_D
(
PHY
,
"Channel Impulse Computation Slot %d ThreadId %d Symbol %d
\n
"
,
Ns
,
ue
->
current_thread_id
[
Ns
],
l
);
LOG_D
(
PHY
,
"Channel Impulse Computation Slot %d ThreadId %d Symbol %d
\n
"
,
Ns
,
ue
->
current_thread_id
[
Ns
],
symbo
l
);
idft
((
int16_t
*
)
&
ue
->
common_vars
.
common_vars_rx_data_per_thread
[
ue
->
current_thread_id
[
Ns
]].
dl_ch_estimates
[
eNB_offset
][(
p
<<
1
)
+
aarx
][
0
],
idft
((
int16_t
*
)
&
ue
->
common_vars
.
common_vars_rx_data_per_thread
[
ue
->
current_thread_id
[
Ns
]].
dl_ch_estimates
[
eNB_offset
][(
p
<<
1
)
+
aarx
][
0
],
(
int16_t
*
)
ue
->
common_vars
.
common_vars_rx_data_per_thread
[
ue
->
current_thread_id
[
Ns
]].
dl_ch_estimates_time
[
eNB_offset
][(
p
<<
1
)
+
aarx
],
1
);
(
int16_t
*
)
ue
->
common_vars
.
common_vars_rx_data_per_thread
[
ue
->
current_thread_id
[
Ns
]].
dl_ch_estimates_time
[
eNB_offset
][(
p
<<
1
)
+
aarx
],
1
);
}
}
...
@@ -637,7 +636,6 @@ int nr_pdsch_channel_estimation(PHY_VARS_NR_UE *ue,
...
@@ -637,7 +636,6 @@ int nr_pdsch_channel_estimation(PHY_VARS_NR_UE *ue,
uint8_t
eNB_offset
,
uint8_t
eNB_offset
,
unsigned
char
Ns
,
unsigned
char
Ns
,
unsigned
short
p
,
unsigned
short
p
,
unsigned
char
l
,
unsigned
char
symbol
,
unsigned
char
symbol
,
unsigned
short
bwp_start_subcarrier
,
unsigned
short
bwp_start_subcarrier
,
unsigned
short
nb_rb_pdsch
)
unsigned
short
nb_rb_pdsch
)
...
...
openair1/PHY/NR_UE_ESTIMATION/nr_estimation.h
View file @
65c427b1
...
@@ -45,7 +45,6 @@
...
@@ -45,7 +45,6 @@
int
nr_pdcch_channel_estimation
(
PHY_VARS_NR_UE
*
ue
,
int
nr_pdcch_channel_estimation
(
PHY_VARS_NR_UE
*
ue
,
uint8_t
eNB_offset
,
uint8_t
eNB_offset
,
unsigned
char
Ns
,
unsigned
char
Ns
,
unsigned
char
l
,
unsigned
char
symbol
,
unsigned
char
symbol
,
unsigned
short
coreset_start_subcarrier
,
unsigned
short
coreset_start_subcarrier
,
unsigned
short
nb_rb_coreset
);
unsigned
short
nb_rb_coreset
);
...
@@ -69,7 +68,6 @@ int nr_pdsch_channel_estimation(PHY_VARS_NR_UE *ue,
...
@@ -69,7 +68,6 @@ int nr_pdsch_channel_estimation(PHY_VARS_NR_UE *ue,
uint8_t
eNB_offset
,
uint8_t
eNB_offset
,
unsigned
char
Ns
,
unsigned
char
Ns
,
unsigned
short
p
,
unsigned
short
p
,
unsigned
char
l
,
unsigned
char
symbol
,
unsigned
char
symbol
,
unsigned
short
bwp_start_subcarrier
,
unsigned
short
bwp_start_subcarrier
,
unsigned
short
nb_rb_pdsch
);
unsigned
short
nb_rb_pdsch
);
...
...
openair1/PHY/NR_UE_TRANSPORT/nr_initial_sync.c
View file @
65c427b1
...
@@ -253,7 +253,7 @@ int nr_initial_sync(PHY_VARS_NR_UE *ue, runmode_t mode)
...
@@ -253,7 +253,7 @@ int nr_initial_sync(PHY_VARS_NR_UE *ue, runmode_t mode)
ue
->
ssb_offset
=
sync_pos
+
(
fp
->
samples_per_subframe
*
10
)
-
fp
->
nb_prefix_samples
;
ue
->
ssb_offset
=
sync_pos
+
(
fp
->
samples_per_subframe
*
10
)
-
fp
->
nb_prefix_samples
;
//write_output("rxdata1.m","rxd1",ue->common_vars.rxdata[0],10*fp->samples_per_subframe,1,1);
//write_output("rxdata1.m","rxd1",ue->common_vars.rxdata
Time
[0],10*fp->samples_per_subframe,1,1);
#ifdef DEBUG_INITIAL_SYNCH
#ifdef DEBUG_INITIAL_SYNCH
LOG_I
(
PHY
,
"[UE%d] Initial sync : Estimated PSS position %d, Nid2 %d
\n
"
,
ue
->
Mod_id
,
sync_pos
,
ue
->
common_vars
.
eNb_id
);
LOG_I
(
PHY
,
"[UE%d] Initial sync : Estimated PSS position %d, Nid2 %d
\n
"
,
ue
->
Mod_id
,
sync_pos
,
ue
->
common_vars
.
eNb_id
);
...
@@ -270,10 +270,10 @@ int nr_initial_sync(PHY_VARS_NR_UE *ue, runmode_t mode)
...
@@ -270,10 +270,10 @@ int nr_initial_sync(PHY_VARS_NR_UE *ue, runmode_t mode)
for
(
int
n
=
start
;
n
<
end
;
n
++
){
for
(
int
n
=
start
;
n
<
end
;
n
++
){
for
(
int
ar
=
0
;
ar
<
fp
->
nb_antennas_rx
;
ar
++
)
{
for
(
int
ar
=
0
;
ar
<
fp
->
nb_antennas_rx
;
ar
++
)
{
re
=
((
double
)(((
short
*
)
ue
->
common_vars
.
rxdata
[
ar
]))[
2
*
n
]);
re
=
((
double
)(((
short
*
)
ue
->
common_vars
.
rxdata
Time
[
ar
]))[
2
*
n
]);
im
=
((
double
)(((
short
*
)
ue
->
common_vars
.
rxdata
[
ar
]))[
2
*
n
+
1
]);
im
=
((
double
)(((
short
*
)
ue
->
common_vars
.
rxdata
Time
[
ar
]))[
2
*
n
+
1
]);
((
short
*
)
ue
->
common_vars
.
rxdata
[
ar
])[
2
*
n
]
=
(
short
)(
round
(
re
*
cos
(
n
*
off_angle
)
-
im
*
sin
(
n
*
off_angle
)));
((
short
*
)
ue
->
common_vars
.
rxdata
Time
[
ar
])[
2
*
n
]
=
(
short
)(
round
(
re
*
cos
(
n
*
off_angle
)
-
im
*
sin
(
n
*
off_angle
)));
((
short
*
)
ue
->
common_vars
.
rxdata
[
ar
])[
2
*
n
+
1
]
=
(
short
)(
round
(
re
*
sin
(
n
*
off_angle
)
+
im
*
cos
(
n
*
off_angle
)));
((
short
*
)
ue
->
common_vars
.
rxdata
Time
[
ar
])[
2
*
n
+
1
]
=
(
short
)(
round
(
re
*
sin
(
n
*
off_angle
)
+
im
*
cos
(
n
*
off_angle
)));
}
}
}
}
}
}
...
...
openair1/PHY/NR_UE_TRANSPORT/nr_pbch.c
View file @
65c427b1
...
@@ -421,7 +421,7 @@ int nr_rx_pbch( PHY_VARS_NR_UE *ue,
...
@@ -421,7 +421,7 @@ int nr_rx_pbch( PHY_VARS_NR_UE *ue,
int
max_h
=
0
;
int
max_h
=
0
;
int
symbol
;
int
symbol
;
//uint8_t pbch_a[64];
//uint8_t pbch_a[64];
uint8_t
*
pbch_a
=
malloc
(
sizeof
(
uint8_t
)
*
32
);
uint8_t
*
pbch_a
=
calloc
(
NR_POLAR_PBCH_PAYLOAD_BITS
,
sizeof
(
*
pbch_a
)
);
//uint32_t pbch_a_prime;
//uint32_t pbch_a_prime;
int16_t
*
pbch_e_rx
;
int16_t
*
pbch_e_rx
;
uint8_t
*
decoded_output
=
nr_ue_pbch_vars
->
decoded_output
;
uint8_t
*
decoded_output
=
nr_ue_pbch_vars
->
decoded_output
;
...
@@ -434,12 +434,11 @@ int nr_rx_pbch( PHY_VARS_NR_UE *ue,
...
@@ -434,12 +434,11 @@ int nr_rx_pbch( PHY_VARS_NR_UE *ue,
//uint8_t decoderListSize = 8, pathMetricAppr = 0;
//uint8_t decoderListSize = 8, pathMetricAppr = 0;
//time_stats_t polar_decoder_init,polar_rate_matching,decoding,bit_extraction,deinterleaving;
//time_stats_t polar_decoder_init,polar_rate_matching,decoding,bit_extraction,deinterleaving;
//time_stats_t path_metric,sorting,update_LLR;
//time_stats_t path_metric,sorting,update_LLR;
memset
(
&
pbch_a
[
0
],
0
,
sizeof
(
uint8_t
)
*
NR_POLAR_PBCH_PAYLOAD_BITS
);
//printf("nr_pbch_ue nid_cell %d\n",frame_parms->Nid_cell);
//printf("nr_pbch_ue nid_cell %d\n",frame_parms->Nid_cell);
pbch_e_rx
=
&
nr_ue_pbch_vars
->
llr
[
0
]
;
pbch_e_rx
=
nr_ue_pbch_vars
->
llr
;
// clear LLR buffer
// clear LLR buffer
memset
(
nr_ue_pbch_vars
->
llr
,
0
,
NR_POLAR_PBCH_E
);
memset
(
nr_ue_pbch_vars
->
llr
,
0
,
NR_POLAR_PBCH_E
*
sizeof
(
*
nr_ue_pbch_vars
->
llr
)
);
int
symbol_offset
=
1
;
int
symbol_offset
=
1
;
if
(
ue
->
is_synchronized
>
0
)
if
(
ue
->
is_synchronized
>
0
)
...
@@ -500,12 +499,12 @@ int nr_rx_pbch( PHY_VARS_NR_UE *ue,
...
@@ -500,12 +499,12 @@ int nr_rx_pbch( PHY_VARS_NR_UE *ue,
*/
*/
if
(
symbol
==
1
)
{
if
(
symbol
==
1
)
{
nr_pbch_quantize
(
pbch_e_rx
,
nr_pbch_quantize
(
pbch_e_rx
,
(
short
*
)
&
(
nr_ue_pbch_vars
->
rxdataF_
comp
[
0
][
symbol
*
240
]),
(
short
*
)
&
(
nr_ue_pbch_vars
->
rxdataF_
ext
[
0
][
symbol
*
240
]),
144
);
144
);
pbch_e_rx
+=
144
;
pbch_e_rx
+=
144
;
}
else
{
}
else
{
nr_pbch_quantize
(
pbch_e_rx
,
nr_pbch_quantize
(
pbch_e_rx
,
(
short
*
)
&
(
nr_ue_pbch_vars
->
rxdataF_
comp
[
0
][
symbol
*
240
]),
(
short
*
)
&
(
nr_ue_pbch_vars
->
rxdataF_
ext
[
0
][
symbol
*
240
]),
360
);
360
);
pbch_e_rx
+=
360
;
pbch_e_rx
+=
360
;
}
}
...
...
openair1/PHY/NR_UE_TRANSPORT/pss_nr.c
View file @
65c427b1
...
@@ -626,11 +626,11 @@ void decimation_synchro_nr(PHY_VARS_NR_UE *PHY_vars_UE, int rate_change, int **r
...
@@ -626,11 +626,11 @@ void decimation_synchro_nr(PHY_VARS_NR_UE *PHY_vars_UE, int rate_change, int **r
/* build with cic filter does not work properly. Performances are significantly deteriorated */
/* build with cic filter does not work properly. Performances are significantly deteriorated */
#ifdef CIC_DECIMATOR
#ifdef CIC_DECIMATOR
cic_decimator
((
int16_t
*
)
&
(
PHY_vars_UE
->
common_vars
.
rxdata
[
0
][
0
]),
(
int16_t
*
)
&
(
rxdata
[
0
][
0
]),
cic_decimator
((
int16_t
*
)
&
(
PHY_vars_UE
->
common_vars
.
rxdata
Time
[
0
][
0
]),
(
int16_t
*
)
&
(
rxdata
[
0
][
0
]),
samples_for_frame
,
rate_change
,
CIC_FILTER_STAGE_NUMBER
,
0
,
FIR_RATE_CHANGE
);
samples_for_frame
,
rate_change
,
CIC_FILTER_STAGE_NUMBER
,
0
,
FIR_RATE_CHANGE
);
#else
#else
fir_decimator
((
int16_t
*
)
&
(
PHY_vars_UE
->
common_vars
.
rxdata
[
0
][
0
]),
(
int16_t
*
)
&
(
rxdata
[
0
][
0
]),
fir_decimator
((
int16_t
*
)
&
(
PHY_vars_UE
->
common_vars
.
rxdata
Time
[
0
][
0
]),
(
int16_t
*
)
&
(
rxdata
[
0
][
0
]),
samples_for_frame
,
rate_change
,
0
);
samples_for_frame
,
rate_change
,
0
);
#endif
#endif
...
@@ -669,7 +669,7 @@ int pss_synchro_nr(PHY_VARS_NR_UE *PHY_vars_UE, int rate_change)
...
@@ -669,7 +669,7 @@ int pss_synchro_nr(PHY_VARS_NR_UE *PHY_vars_UE, int rate_change)
int
samples_for_frame
=
frame_parms
->
samples_per_subframe
*
NR_NUMBER_OF_SUBFRAMES_PER_FRAME
;
int
samples_for_frame
=
frame_parms
->
samples_per_subframe
*
NR_NUMBER_OF_SUBFRAMES_PER_FRAME
;
LOG_M
(
"rxdata0_rand.m"
,
"rxd0_rand"
,
&
PHY_vars_UE
->
common_vars
.
rxdata
[
0
][
0
],
samples_for_frame
,
1
,
1
);
LOG_M
(
"rxdata0_rand.m"
,
"rxd0_rand"
,
&
PHY_vars_UE
->
common_vars
.
rxdata
Time
[
0
][
0
],
samples_for_frame
,
1
,
1
);
#endif
#endif
...
@@ -688,7 +688,7 @@ int pss_synchro_nr(PHY_VARS_NR_UE *PHY_vars_UE, int rate_change)
...
@@ -688,7 +688,7 @@ int pss_synchro_nr(PHY_VARS_NR_UE *PHY_vars_UE, int rate_change)
}
}
else
{
else
{
rxdata
=
PHY_vars_UE
->
common_vars
.
rxdata
;
rxdata
=
PHY_vars_UE
->
common_vars
.
rxdata
Time
;
}
}
#ifdef DBG_PSS_NR
#ifdef DBG_PSS_NR
...
...
openair1/PHY/TOOLS/nr_phy_scope.c
View file @
65c427b1
...
@@ -582,7 +582,7 @@ void phy_scope_UE(FD_lte_phy_scope_ue *form,
...
@@ -582,7 +582,7 @@ void phy_scope_UE(FD_lte_phy_scope_ue *form,
llr_pdcch
=
(
float
*
)
calloc
(
12
*
frame_parms
->
N_RB_DL
*
num_pdcch_symbols
*
2
,
sizeof
(
float
));
// init to zero
llr_pdcch
=
(
float
*
)
calloc
(
12
*
frame_parms
->
N_RB_DL
*
num_pdcch_symbols
*
2
,
sizeof
(
float
));
// init to zero
bit_pdcch
=
(
float
*
)
calloc
(
12
*
frame_parms
->
N_RB_DL
*
num_pdcch_symbols
*
2
,
sizeof
(
float
));
bit_pdcch
=
(
float
*
)
calloc
(
12
*
frame_parms
->
N_RB_DL
*
num_pdcch_symbols
*
2
,
sizeof
(
float
));
rxsig_t
=
(
int16_t
**
)
phy_vars_ue
->
common_vars
.
rxdata
;
rxsig_t
=
(
int16_t
**
)
phy_vars_ue
->
common_vars
.
rxdata
Time
;
rxsig_t_dB
=
calloc
(
nb_antennas_rx
,
sizeof
(
float
*
));
rxsig_t_dB
=
calloc
(
nb_antennas_rx
,
sizeof
(
float
*
));
for
(
arx
=
0
;
arx
<
nb_antennas_rx
;
arx
++
)
{
for
(
arx
=
0
;
arx
<
nb_antennas_rx
;
arx
++
)
{
rxsig_t_dB
[
arx
]
=
(
float
*
)
calloc
(
samples_per_frame
,
sizeof
(
float
));
rxsig_t_dB
[
arx
]
=
(
float
*
)
calloc
(
samples_per_frame
,
sizeof
(
float
));
...
...
openair1/PHY/TOOLS/time_meas.h
View file @
65c427b1
...
@@ -147,4 +147,15 @@ static inline void copy_meas(time_stats_t *dst_ts,time_stats_t *src_ts)
...
@@ -147,4 +147,15 @@ static inline void copy_meas(time_stats_t *dst_ts,time_stats_t *src_ts)
dst_ts
->
max
=
src_ts
->
max
;
dst_ts
->
max
=
src_ts
->
max
;
}
}
}
}
#if UE_TIMING_TRACE
#define UE_meas(meaS, funC) \
start_meas(&meaS);\
funC;\
stop_meas(&meaS);
#else
#define UE_meas(meaS, funC) \
funC;
#endif
#endif
#endif
openair1/PHY/defs_nr_UE.h
View file @
65c427b1
...
@@ -407,7 +407,7 @@ typedef struct {
...
@@ -407,7 +407,7 @@ typedef struct {
/// Should point to the same memory as PHY_vars->rx_vars[a].RX_DMA_BUFFER.
/// Should point to the same memory as PHY_vars->rx_vars[a].RX_DMA_BUFFER.
/// - first index: rx antenna [0..nb_antennas_rx[
/// - first index: rx antenna [0..nb_antennas_rx[
/// - second index: sample [0..FRAME_LENGTH_COMPLEX_SAMPLES+2048[
/// - second index: sample [0..FRAME_LENGTH_COMPLEX_SAMPLES+2048[
int32_t
**
rxdata
;
int32_t
**
rxdata
Time
;
NR_UE_COMMON_PER_THREAD
common_vars_rx_data_per_thread
[
RX_NB_TH_MAX
];
NR_UE_COMMON_PER_THREAD
common_vars_rx_data_per_thread
[
RX_NB_TH_MAX
];
...
...
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