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
spbro
OpenXG-RAN
Commits
3e0efbde
Commit
3e0efbde
authored
Nov 03, 2022
by
Robert Schmidt
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/nr_ue_improve_time_and_freq_sync' into integration_2022_wk44
parents
00106a7e
5063957a
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
85 additions
and
80 deletions
+85
-80
executables/nr-ue.c
executables/nr-ue.c
+2
-2
openair1/PHY/NR_UE_ESTIMATION/nr_adjust_synch_ue.c
openair1/PHY/NR_UE_ESTIMATION/nr_adjust_synch_ue.c
+6
-6
openair1/PHY/NR_UE_ESTIMATION/nr_dl_channel_estimation.c
openair1/PHY/NR_UE_ESTIMATION/nr_dl_channel_estimation.c
+26
-25
openair1/PHY/NR_UE_TRANSPORT/dci_nr.c
openair1/PHY/NR_UE_TRANSPORT/dci_nr.c
+10
-6
openair1/PHY/NR_UE_TRANSPORT/nr_initial_sync.c
openair1/PHY/NR_UE_TRANSPORT/nr_initial_sync.c
+39
-35
openair1/SIMULATION/NR_PHY/ulsim.c
openair1/SIMULATION/NR_PHY/ulsim.c
+2
-2
targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band66.tm1.24PRB.usrpx300.conf
...S/GENERIC-LTE-EPC/CONF/gnb.band66.tm1.24PRB.usrpx300.conf
+0
-1
targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band66.tm1.25PRB.usrpx300.conf
...S/GENERIC-LTE-EPC/CONF/gnb.band66.tm1.25PRB.usrpx300.conf
+0
-1
targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.band78.sa.fr1.106PRB.2x2.usrpn310.conf
...IC-NR-5GC/CONF/gnb.band78.sa.fr1.106PRB.2x2.usrpn310.conf
+0
-1
targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.band78.sa.fr1.162PRB.2x2.usrpn310.conf
...IC-NR-5GC/CONF/gnb.band78.sa.fr1.162PRB.2x2.usrpn310.conf
+0
-1
No files found.
executables/nr-ue.c
View file @
3e0efbde
...
@@ -798,10 +798,10 @@ void syncInFrame(PHY_VARS_NR_UE *UE, openair0_timestamp *timestamp) {
...
@@ -798,10 +798,10 @@ void syncInFrame(PHY_VARS_NR_UE *UE, openair0_timestamp *timestamp) {
int
computeSamplesShift
(
PHY_VARS_NR_UE
*
UE
)
{
int
computeSamplesShift
(
PHY_VARS_NR_UE
*
UE
)
{
int
samples_shift
=
-
(
UE
->
rx_offset
>>
1
);
int
samples_shift
=
-
(
UE
->
rx_offset
>>
1
);
UE
->
rx_offset
=
0
;
// reset so that it is not applied falsely in case of SSB being only in every second frame
UE
->
max_pos_fil
=
0
;
// reset IIR filter when sample shift is applied
if
(
samples_shift
!=
0
)
{
if
(
samples_shift
!=
0
)
{
LOG_I
(
NR_PHY
,
"Adjusting frame in time by %i samples
\n
"
,
samples_shift
);
LOG_I
(
NR_PHY
,
"Adjusting frame in time by %i samples
\n
"
,
samples_shift
);
UE
->
rx_offset
=
0
;
// reset so that it is not applied falsely in case of SSB being only in every second frame
UE
->
max_pos_fil
+=
samples_shift
<<
15
;
// reset IIR filter when sample shift is applied
}
}
return
samples_shift
;
return
samples_shift
;
}
}
...
...
openair1/PHY/NR_UE_ESTIMATION/nr_adjust_synch_ue.c
View file @
3e0efbde
...
@@ -27,7 +27,7 @@
...
@@ -27,7 +27,7 @@
#include "executables/softmodem-common.h"
#include "executables/softmodem-common.h"
#include "common/utils/LOG/vcd_signal_dumper.h"
#include "common/utils/LOG/vcd_signal_dumper.h"
#define DEBUG_PHY
//
#define DEBUG_PHY
// Adjust location synchronization point to account for drift
// Adjust location synchronization point to account for drift
// The adjustment is performed once per frame based on the
// The adjustment is performed once per frame based on the
...
@@ -75,14 +75,14 @@ void nr_adjust_synch_ue(NR_DL_FRAME_PARMS *frame_parms,
...
@@ -75,14 +75,14 @@ void nr_adjust_synch_ue(NR_DL_FRAME_PARMS *frame_parms,
// filter position to reduce jitter
// filter position to reduce jitter
if
(
clear
==
1
)
if
(
clear
==
1
)
ue
->
max_pos_fil
=
max_pos
;
ue
->
max_pos_fil
=
max_pos
<<
15
;
else
else
ue
->
max_pos_fil
=
((
ue
->
max_pos_fil
*
coef
)
+
(
max_pos
*
ncoef
))
>>
15
;
ue
->
max_pos_fil
=
((
ue
->
max_pos_fil
*
coef
)
>>
15
)
+
(
max_pos
*
ncoef
)
;
// do not filter to have proactive timing adjustment
// do not filter to have proactive timing adjustment
//ue->max_pos_fil = max_pos;
//ue->max_pos_fil = max_pos
<< 15
;
int
diff
=
ue
->
max_pos_fil
-
sync_pos
;
int
diff
=
(
ue
->
max_pos_fil
>>
15
)
-
sync_pos
;
if
(
frame_parms
->
freq_range
==
nr_FR2
)
if
(
frame_parms
->
freq_range
==
nr_FR2
)
sync_offset
=
2
;
sync_offset
=
2
;
...
@@ -118,7 +118,7 @@ void nr_adjust_synch_ue(NR_DL_FRAME_PARMS *frame_parms,
...
@@ -118,7 +118,7 @@ void nr_adjust_synch_ue(NR_DL_FRAME_PARMS *frame_parms,
}
}
#ifdef DEBUG_PHY
#ifdef DEBUG_PHY
LOG_
D
(
PHY
,
"AbsSubframe %d: diff = %i, rx_offset (final) = %i : clear = %d, max_pos = %d, max_pos_fil = %d, max_val = %d, sync_pos %d
\n
"
,
LOG_
I
(
PHY
,
"AbsSubframe %d: diff = %i, rx_offset (final) = %i : clear = %d, max_pos = %d, max_pos_fil = %d, max_val = %d, sync_pos %d
\n
"
,
subframe
,
subframe
,
diff
,
diff
,
ue
->
rx_offset
,
ue
->
rx_offset
,
...
...
openair1/PHY/NR_UE_ESTIMATION/nr_dl_channel_estimation.c
View file @
3e0efbde
...
@@ -27,6 +27,7 @@
...
@@ -27,6 +27,7 @@
#include "PHY/NR_REFSIG/nr_refsig.h"
#include "PHY/NR_REFSIG/nr_refsig.h"
#include "PHY/NR_REFSIG/dmrs_nr.h"
#include "PHY/NR_REFSIG/dmrs_nr.h"
#include "PHY/NR_REFSIG/ptrs_nr.h"
#include "PHY/NR_REFSIG/ptrs_nr.h"
#include "PHY/NR_REFSIG/nr_mod_table.h"
#include "PHY/NR_TRANSPORT/nr_sch_dmrs.h"
#include "PHY/NR_TRANSPORT/nr_sch_dmrs.h"
#include "PHY/NR_TRANSPORT/nr_transport_proto.h"
#include "PHY/NR_TRANSPORT/nr_transport_proto.h"
#include "common/utils/nr/nr_common.h"
#include "common/utils/nr/nr_common.h"
...
@@ -39,7 +40,26 @@
...
@@ -39,7 +40,26 @@
//#define DEBUG_PBCH
//#define DEBUG_PBCH
//#define DEBUG_PRS_CHEST // To enable PRS Matlab dumps
//#define DEBUG_PRS_CHEST // To enable PRS Matlab dumps
//#define DEBUG_PRS_PRINTS // To enable PRS channel estimation debug logs
//#define DEBUG_PRS_PRINTS // To enable PRS channel estimation debug logs
extern
short
nr_qpsk_mod_table
[
8
];
#define CH_INTERP 0
#define NO_INTERP 1
/* Generic function to find the peak of channel estimation buffer */
void
peak_estimator
(
int32_t
*
buffer
,
int32_t
buf_len
,
int32_t
*
peak_idx
,
int32_t
*
peak_val
)
{
int32_t
max_val
=
0
,
max_idx
=
0
,
abs_val
=
0
;
for
(
int
k
=
0
;
k
<
buf_len
;
k
++
)
{
abs_val
=
squaredMod
(((
c16_t
*
)
buffer
)[
k
]);
if
(
abs_val
>
max_val
)
{
max_val
=
abs_val
;
max_idx
=
k
;
}
}
*
peak_val
=
max_val
;
*
peak_idx
=
max_idx
;
}
int
nr_prs_channel_estimation
(
uint8_t
gNB_id
,
int
nr_prs_channel_estimation
(
uint8_t
gNB_id
,
uint8_t
rsc_id
,
uint8_t
rsc_id
,
...
@@ -545,29 +565,6 @@ int nr_prs_channel_estimation(uint8_t gNB_id,
...
@@ -545,29 +565,6 @@ int nr_prs_channel_estimation(uint8_t gNB_id,
return
(
0
);
return
(
0
);
}
}
#define CH_INTERP 0
#define NO_INTERP 1
/* Generic function to find the peak of channel estimation buffer */
void
peak_estimator
(
int32_t
*
buffer
,
int32_t
buf_len
,
int32_t
*
peak_idx
,
int32_t
*
peak_val
)
{
int32_t
max_val
=
0
,
max_idx
=
0
,
abs_val
=
0
;
for
(
int
k
=
0
;
k
<
buf_len
;
k
++
)
{
abs_val
=
squaredMod
(((
c16_t
*
)
buffer
)[
k
]);
if
(
abs_val
>
max_val
)
{
max_val
=
abs_val
;
max_idx
=
k
;
}
}
*
peak_val
=
max_val
;
*
peak_idx
=
max_idx
;
}
#define CH_INTERP 0
#define NO_INTERP 1
int
nr_pbch_dmrs_correlation
(
PHY_VARS_NR_UE
*
ue
,
int
nr_pbch_dmrs_correlation
(
PHY_VARS_NR_UE
*
ue
,
UE_nr_rxtx_proc_t
*
proc
,
UE_nr_rxtx_proc_t
*
proc
,
uint8_t
gNB_id
,
uint8_t
gNB_id
,
...
@@ -990,7 +987,7 @@ int nr_pbch_channel_estimation(PHY_VARS_NR_UE *ue,
...
@@ -990,7 +987,7 @@ int nr_pbch_channel_estimation(PHY_VARS_NR_UE *ue,
}
}
if
(
dmrss
==
2
)
if
(
dmrss
==
2
)
UEscopeCopy
(
ue
,
pbchDlChEstimateTime
,
(
void
*
)
dl_ch_estimates_time
,
sizeof
(
struct
complex16
),
ue
->
frame_parms
.
nb_antennas_rx
,
idftsizeidx
);
UEscopeCopy
(
ue
,
pbchDlChEstimateTime
,
(
void
*
)
dl_ch_estimates_time
,
sizeof
(
struct
complex16
),
ue
->
frame_parms
.
nb_antennas_rx
,
ue
->
frame_parms
.
ofdm_symbol_size
);
return
(
0
);
return
(
0
);
}
}
...
@@ -1223,6 +1220,10 @@ void nr_pdcch_channel_estimation(PHY_VARS_NR_UE *ue,
...
@@ -1223,6 +1220,10 @@ void nr_pdcch_channel_estimation(PHY_VARS_NR_UE *ue,
ch
[
0
]
=
ch_sum
[
0
]
/
3
;
ch
[
0
]
=
ch_sum
[
0
]
/
3
;
ch
[
1
]
=
ch_sum
[
1
]
/
3
;
ch
[
1
]
=
ch_sum
[
1
]
/
3
;
multadd_real_vector_complex_scalar
(
filt16a_1
,
ch
,
dl_ch
,
16
);
multadd_real_vector_complex_scalar
(
filt16a_1
,
ch
,
dl_ch
,
16
);
#ifdef DEBUG_PDCCH
for
(
int
m
=
0
;
m
<
12
;
m
++
)
printf
(
"data : dl_ch -> (%d,%d)
\n
"
,
dl_ch
[
0
+
2
*
m
],
dl_ch
[
1
+
2
*
m
]);
#endif
dl_ch
+=
24
;
dl_ch
+=
24
;
ch_sum
[
0
]
=
0
;
ch_sum
[
0
]
=
0
;
ch_sum
[
1
]
=
0
;
ch_sum
[
1
]
=
0
;
...
...
openair1/PHY/NR_UE_TRANSPORT/dci_nr.c
View file @
3e0efbde
...
@@ -682,18 +682,22 @@ int32_t nr_rx_pdcch(PHY_VARS_NR_UE *ue,
...
@@ -682,18 +682,22 @@ int32_t nr_rx_pdcch(PHY_VARS_NR_UE *ue,
int32_t
avgs
;
int32_t
avgs
;
int32_t
avgP
[
4
];
int32_t
avgP
[
4
];
int
n_rb
,
rb_offset
;
int
n_rb
,
rb_offset
;
get_coreset_rballoc
(
rel15
->
coreset
.
frequency_domain_resource
,
&
n_rb
,
&
rb_offset
);
// Pointers to extracted PDCCH symbols in frequency-domain.
// Pointers to extracted PDCCH symbols in frequency-domain.
int32_t
rx_size
=
4
*
273
*
12
;
int32_t
rx_size
=
4
*
n_rb
*
12
;
__attribute__
((
aligned
(
32
)))
int32_t
rxdataF_ext
[
4
*
frame_parms
->
nb_antennas_rx
][
rx_size
];
__attribute__
((
aligned
(
32
)))
int32_t
rxdataF_ext
[
frame_parms
->
nb_antennas_rx
][
rx_size
];
__attribute__
((
aligned
(
32
)))
int32_t
rxdataF_comp
[
4
*
frame_parms
->
nb_antennas_rx
][
rx_size
];
__attribute__
((
aligned
(
32
)))
int32_t
rxdataF_comp
[
frame_parms
->
nb_antennas_rx
][
rx_size
];
__attribute__
((
aligned
(
32
)))
int32_t
pdcch_dl_ch_estimates_ext
[
4
*
frame_parms
->
nb_antennas_rx
][
rx_size
];
__attribute__
((
aligned
(
32
)))
int32_t
pdcch_dl_ch_estimates_ext
[
frame_parms
->
nb_antennas_rx
][
rx_size
];
memset
(
rxdataF_comp
,
0
,
sizeof
(
rxdataF_comp
));
// Pointer to llrs, 4-bit resolution.
// Pointer to llrs, 4-bit resolution.
int32_t
llr_size
=
2
*
4
*
100
*
12
;
int32_t
llr_size
=
2
*
4
*
n_rb
*
9
;
int16_t
llr
[
llr_size
];
int16_t
llr
[
llr_size
];
get_coreset_rballoc
(
rel15
->
coreset
.
frequency_domain_resource
,
&
n_rb
,
&
rb_offset
);
memset
(
llr
,
0
,
sizeof
(
llr
));
LOG_D
(
PHY
,
"pdcch coreset: freq %x, n_rb %d, rb_offset %d
\n
"
,
LOG_D
(
PHY
,
"pdcch coreset: freq %x, n_rb %d, rb_offset %d
\n
"
,
rel15
->
coreset
.
frequency_domain_resource
[
0
],
n_rb
,
rb_offset
);
rel15
->
coreset
.
frequency_domain_resource
[
0
],
n_rb
,
rb_offset
);
for
(
int
s
=
rel15
->
coreset
.
StartSymbolIndex
;
s
<
(
rel15
->
coreset
.
StartSymbolIndex
+
rel15
->
coreset
.
duration
);
s
++
)
{
for
(
int
s
=
rel15
->
coreset
.
StartSymbolIndex
;
s
<
(
rel15
->
coreset
.
StartSymbolIndex
+
rel15
->
coreset
.
duration
);
s
++
)
{
...
...
openair1/PHY/NR_UE_TRANSPORT/nr_initial_sync.c
View file @
3e0efbde
...
@@ -51,7 +51,7 @@ extern openair0_config_t openair0_cfg[];
...
@@ -51,7 +51,7 @@ extern openair0_config_t openair0_cfg[];
int
cnt
=
0
;
int
cnt
=
0
;
#define DEBUG_INITIAL_SYNCH
#define DEBUG_INITIAL_SYNCH
#define DUMP_PBCH_CH_ESTIMATES 0
// create a new node of SSB structure
// create a new node of SSB structure
NR_UE_SSB
*
create_ssb_node
(
uint8_t
i
,
uint8_t
h
)
{
NR_UE_SSB
*
create_ssb_node
(
uint8_t
i
,
uint8_t
h
)
{
...
@@ -168,6 +168,11 @@ int nr_pbch_detection(UE_nr_rxtx_proc_t * proc, PHY_VARS_NR_UE *ue, int pbch_ini
...
@@ -168,6 +168,11 @@ int nr_pbch_detection(UE_nr_rxtx_proc_t * proc, PHY_VARS_NR_UE *ue, int pbch_ini
phy_pdcch_config
,
phy_pdcch_config
,
&
result
);
&
result
);
if
(
DUMP_PBCH_CH_ESTIMATES
&&
(
ret
==
0
))
{
write_output
(
"pbch_ch_estimates.m"
,
"pbch_ch_estimates"
,
dl_ch_estimates
,
frame_parms
->
nb_antennas_rx
*
estimateSz
,
1
,
1
);
write_output
(
"pbch_ch_estimates_time.m"
,
"pbch_ch_estimates_time"
,
dl_ch_estimates_time
,
frame_parms
->
nb_antennas_rx
*
frame_parms
->
ofdm_symbol_size
,
1
,
1
);
}
temp_ptr
=
temp_ptr
->
next_ssb
;
temp_ptr
=
temp_ptr
->
next_ssb
;
}
}
...
@@ -246,52 +251,51 @@ int nr_initial_sync(UE_nr_rxtx_proc_t *proc,
...
@@ -246,52 +251,51 @@ int nr_initial_sync(UE_nr_rxtx_proc_t *proc,
/* process pss search on received buffer */
/* process pss search on received buffer */
sync_pos
=
pss_synchro_nr
(
ue
,
is
,
NO_RATE_CHANGE
);
sync_pos
=
pss_synchro_nr
(
ue
,
is
,
NO_RATE_CHANGE
);
if
(
sync_pos
<
fp
->
nb_prefix_samples
)
continue
;
if
(
sync_pos
>=
fp
->
nb_prefix_samples
)
ue
->
ssb_offset
=
sync_pos
-
fp
->
nb_prefix_samples
;
ue
->
ssb_offset
=
sync_pos
-
fp
->
nb_prefix_samples
;
else
ue
->
ssb_offset
=
sync_pos
+
(
fp
->
samples_per_subframe
*
10
)
-
fp
->
nb_prefix_samples
;
#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
);
LOG_I
(
PHY
,
"sync_pos %d ssb_offset %d
\n
"
,
sync_pos
,
ue
->
ssb_offset
);
LOG_I
(
PHY
,
"sync_pos %d ssb_offset %d
\n
"
,
sync_pos
,
ue
->
ssb_offset
);
#endif
#endif
// digital compensation of FFO for SSB symbols
/* check that SSS/PBCH block is continuous inside the received buffer */
if
(
ue
->
UE_fo_compensation
){
if
(
ue
->
ssb_offset
+
NR_N_SYMBOLS_SSB
*
(
fp
->
ofdm_symbol_size
+
fp
->
nb_prefix_samples
)
<
fp
->
samples_per_frame
)
{
double
s_time
=
1
/
(
1.0e3
*
fp
->
samples_per_subframe
);
// sampling time
double
off_angle
=
-
2
*
M_PI
*
s_time
*
(
ue
->
common_vars
.
freq_offset
);
// offset rotation angle compensation per sample
// In SA we need to perform frequency offset correction until the end of buffer because we need to decode SIB1
// digital compensation of FFO for SSB symbols
// and we do not know yet in which slot it goes.
if
(
ue
->
UE_fo_compensation
){
double
s_time
=
1
/
(
1.0e3
*
fp
->
samples_per_subframe
);
// sampling time
double
off_angle
=
-
2
*
M_PI
*
s_time
*
(
ue
->
common_vars
.
freq_offset
);
// offset rotation angle compensation per sample
// start for offset correction
// In SA we need to perform frequency offset correction until the end of buffer because we need to decode SIB1
int
start
=
sa
?
is
*
fp
->
samples_per_frame
:
is
*
fp
->
samples_per_frame
+
ue
->
ssb_offset
;
// and we do not know yet in which slot it goes.
// loop over samples
// start for offset correction
int
end
=
sa
?
n_frames
*
fp
->
samples_per_frame
-
1
:
start
+
NR_N_SYMBOLS_SSB
*
(
fp
->
ofdm_symbol_size
+
fp
->
nb_prefix_samples
)
;
int
start
=
is
*
fp
->
samples_per_frame
;
for
(
int
n
=
start
;
n
<
end
;
n
++
){
// loop over samples
for
(
int
ar
=
0
;
ar
<
fp
->
nb_antennas_rx
;
ar
++
)
{
int
end
=
start
+
fp
->
samples_per_frame
;
re
=
((
double
)(((
short
*
)
ue
->
common_vars
.
rxdata
[
ar
]))[
2
*
n
]);
im
=
((
double
)(((
short
*
)
ue
->
common_vars
.
rxdata
[
ar
]))[
2
*
n
+
1
]);
for
(
int
n
=
start
;
n
<
end
;
n
++
){
((
short
*
)
ue
->
common_vars
.
rxdata
[
ar
])[
2
*
n
]
=
(
short
)(
round
(
re
*
cos
(
n
*
off_angle
)
-
im
*
sin
(
n
*
off_angle
)));
for
(
int
ar
=
0
;
ar
<
fp
->
nb_antennas_rx
;
ar
++
)
{
((
short
*
)
ue
->
common_vars
.
rxdata
[
ar
])[
2
*
n
+
1
]
=
(
short
)(
round
(
re
*
sin
(
n
*
off_angle
)
+
im
*
cos
(
n
*
off_angle
)));
re
=
((
double
)(((
short
*
)
ue
->
common_vars
.
rxdata
[
ar
]))[
2
*
n
]);
im
=
((
double
)(((
short
*
)
ue
->
common_vars
.
rxdata
[
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
[
ar
])[
2
*
n
+
1
]
=
(
short
)(
round
(
re
*
sin
(
n
*
off_angle
)
+
im
*
cos
(
n
*
off_angle
)));
}
}
}
}
}
}
/* check that SSS/PBCH block is continuous inside the received buffer */
if
(
sync_pos
<
(
NR_NUMBER_OF_SUBFRAMES_PER_FRAME
*
fp
->
samples_per_subframe
-
(
NB_SYMBOLS_PBCH
*
fp
->
ofdm_symbol_size
)))
{
/* slop_fep function works for lte and takes into account begining of frame with prefix for subframe 0 */
/* slop_fep function works for lte and takes into account begining of frame with prefix for subframe 0 */
/* for NR this is not the case but slot_fep is still used for computing FFT of samples */
/* for NR this is not the case but slot_fep is still used for computing FFT of samples */
/* in order to achieve correct processing for NR prefix samples is forced to 0 and then restored after function call */
/* in order to achieve correct processing for NR prefix samples is forced to 0 and then restored after function call */
/* symbol number are from beginning of SS/PBCH blocks as below: */
/* symbol number are from beginning of SS/PBCH blocks as below: */
/* Signal PSS PBCH SSS PBCH */
/* Signal PSS PBCH SSS PBCH */
/* symbol number 0 1 2 3 */
/* symbol number 0 1 2 3 */
/* time samples in buffer rxdata are used as input of FFT -> FFT results are stored in the frequency buffer rxdataF */
/* time samples in buffer rxdata are used as input of FFT -> FFT results are stored in the frequency buffer rxdataF */
/* rxdataF stores SS/PBCH from beginning of buffers in the same symbol order as in time domain */
/* rxdataF stores SS/PBCH from beginning of buffers in the same symbol order as in time domain */
for
(
int
i
=
0
;
i
<
4
;
i
++
)
for
(
int
i
=
0
;
i
<
4
;
i
++
)
nr_slot_fep_init_sync
(
ue
,
nr_slot_fep_init_sync
(
ue
,
...
@@ -317,10 +321,10 @@ int nr_initial_sync(UE_nr_rxtx_proc_t *proc,
...
@@ -317,10 +321,10 @@ int nr_initial_sync(UE_nr_rxtx_proc_t *proc,
// and we do not know yet in which slot it goes.
// and we do not know yet in which slot it goes.
// start for offset correction
// start for offset correction
int
start
=
sa
?
is
*
fp
->
samples_per_frame
:
is
*
fp
->
samples_per_frame
+
ue
->
ssb_offset
;
int
start
=
is
*
fp
->
samples_per_frame
;
// loop over samples
// loop over samples
int
end
=
s
a
?
n_frames
*
fp
->
samples_per_frame
-
1
:
start
+
NR_N_SYMBOLS_SSB
*
(
fp
->
ofdm_symbol_size
+
fp
->
nb_prefix_samples
)
;
int
end
=
s
tart
+
fp
->
samples_per_frame
;
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
++
)
{
...
...
openair1/SIMULATION/NR_PHY/ulsim.c
View file @
3e0efbde
...
@@ -1561,9 +1561,9 @@ int main(int argc, char **argv)
...
@@ -1561,9 +1561,9 @@ int main(int argc, char **argv)
for
(
int
r
=
1
;
r
<
max_rounds
;
r
++
)
for
(
int
r
=
1
;
r
<
max_rounds
;
r
++
)
printf
(
",%d/%d"
,
n_errors
[
r
],
round_trials
[
r
]);
printf
(
",%d/%d"
,
n_errors
[
r
],
round_trials
[
r
]);
printf
(
") (negative CRC), false_positive %d/%d, errors_scrambling (%u/%u"
,
printf
(
") (negative CRC), false_positive %d/%d, errors_scrambling (%u/%u"
,
n_false_positive
,
n_trials
,
errors_scrambling
[
0
],
available_bits
*
n_trials
);
n_false_positive
,
n_trials
,
errors_scrambling
[
0
],
available_bits
*
round_trials
[
0
]
);
for
(
int
r
=
1
;
r
<
max_rounds
;
r
++
)
for
(
int
r
=
1
;
r
<
max_rounds
;
r
++
)
printf
(
",%u/%u"
,
errors_scrambling
[
r
],
available_bits
*
n_trials
);
printf
(
",%u/%u"
,
errors_scrambling
[
r
],
available_bits
*
round_trials
[
r
]
);
printf
(
")
\n
"
);
printf
(
")
\n
"
);
printf
(
"
\n
"
);
printf
(
"
\n
"
);
...
...
targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band66.tm1.24PRB.usrpx300.conf
View file @
3e0efbde
...
@@ -181,7 +181,6 @@ L1s = (
...
@@ -181,7 +181,6 @@ L1s = (
{
{
num_cc
=
1
;
num_cc
=
1
;
tr_n_preference
=
"local_mac"
;
tr_n_preference
=
"local_mac"
;
thread_pool_size
=
8
;
ofdm_offset_divisor
=
8
;
#set this to UINT_MAX for offset 0
ofdm_offset_divisor
=
8
;
#set this to UINT_MAX for offset 0
}
}
);
);
...
...
targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band66.tm1.25PRB.usrpx300.conf
View file @
3e0efbde
...
@@ -179,7 +179,6 @@ L1s = (
...
@@ -179,7 +179,6 @@ L1s = (
{
{
num_cc
=
1
;
num_cc
=
1
;
tr_n_preference
=
"local_mac"
;
tr_n_preference
=
"local_mac"
;
thread_pool_size
=
8
;
ofdm_offset_divisor
=
8
;
#set this to UINT_MAX for offset 0
ofdm_offset_divisor
=
8
;
#set this to UINT_MAX for offset 0
}
}
);
);
...
...
targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.band78.sa.fr1.106PRB.2x2.usrpn310.conf
View file @
3e0efbde
...
@@ -235,7 +235,6 @@ L1s = (
...
@@ -235,7 +235,6 @@ L1s = (
num_cc
=
1
;
num_cc
=
1
;
tr_n_preference
=
"local_mac"
;
tr_n_preference
=
"local_mac"
;
prach_dtx_threshold
=
120
;
prach_dtx_threshold
=
120
;
thread_pool_size
=
4
;
# pucch0_dtx_threshold = 150;
# pucch0_dtx_threshold = 150;
}
}
);
);
...
...
targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.band78.sa.fr1.162PRB.2x2.usrpn310.conf
View file @
3e0efbde
...
@@ -239,7 +239,6 @@ L1s = (
...
@@ -239,7 +239,6 @@ L1s = (
num_cc
=
1
;
num_cc
=
1
;
tr_n_preference
=
"local_mac"
;
tr_n_preference
=
"local_mac"
;
prach_dtx_threshold
=
120
;
prach_dtx_threshold
=
120
;
thread_pool_size
=
8
;
# pucch0_dtx_threshold = 150;
# pucch0_dtx_threshold = 150;
}
}
);
);
...
...
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