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
Michael Black
OpenXG-RAN
Commits
43a98185
Commit
43a98185
authored
Apr 05, 2019
by
Francesco Mani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix on pbchsim for -I but still not working without initial sync
parent
91121c6b
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
18 additions
and
21 deletions
+18
-21
executables/nr-ue.c
executables/nr-ue.c
+1
-1
openair1/PHY/MODULATION/slot_fep_nr.c
openair1/PHY/MODULATION/slot_fep_nr.c
+0
-2
openair1/PHY/NR_UE_TRANSPORT/nr_initial_sync.c
openair1/PHY/NR_UE_TRANSPORT/nr_initial_sync.c
+3
-3
openair1/PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h
openair1/PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h
+3
-1
openair1/SIMULATION/NR_PHY/dlsim.c
openair1/SIMULATION/NR_PHY/dlsim.c
+1
-1
openair1/SIMULATION/NR_PHY/pbchsim.c
openair1/SIMULATION/NR_PHY/pbchsim.c
+10
-13
No files found.
executables/nr-ue.c
View file @
43a98185
...
...
@@ -239,7 +239,7 @@ static void UE_synch(void *arg) {
case
pbch
:
LOG_I
(
PHY
,
"[UE thread Synch] Running Initial Synch (mode %d)
\n
"
,
UE
->
mode
);
if
(
nr_initial_sync
(
syncD
->
proc
,
UE
,
UE
->
mode
)
==
0
)
{
if
(
nr_initial_sync
(
syncD
->
proc
,
UE
,
UE
->
mode
,
2
)
==
0
)
{
freq_offset
=
UE
->
common_vars
.
freq_offset
;
// frequency offset computed with pss in initial sync
hw_slot_offset
=
(
UE
->
rx_offset
<<
1
)
/
UE
->
frame_parms
.
samples_per_slot
;
LOG_I
(
PHY
,
"Got synch: hw_slot_offset %d, carrier off %d Hz, rxgain %d (DL %u, UL %u), UE_scan_carrier %d
\n
"
,
...
...
openair1/PHY/MODULATION/slot_fep_nr.c
View file @
43a98185
...
...
@@ -133,8 +133,6 @@ int nr_slot_fep(PHY_VARS_NR_UE *ue,
return
(
-
1
);
}
for
(
aa
=
0
;
aa
<
frame_parms
->
nb_antennas_rx
;
aa
++
)
{
memset
(
&
common_vars
->
common_vars_rx_data_per_thread
[
ue
->
current_thread_id
[
Ns
]].
rxdataF
[
aa
][
frame_parms
->
ofdm_symbol_size
*
symbol
],
0
,
frame_parms
->
ofdm_symbol_size
*
sizeof
(
int
));
...
...
openair1/PHY/NR_UE_TRANSPORT/nr_initial_sync.c
View file @
43a98185
...
...
@@ -201,7 +201,7 @@ int nr_pbch_detection(UE_nr_rxtx_proc_t * proc, PHY_VARS_NR_UE *ue, int pbch_ini
char
duplex_string
[
2
][
4
]
=
{
"FDD"
,
"TDD"
};
char
prefix_string
[
2
][
9
]
=
{
"NORMAL"
,
"EXTENDED"
};
int
nr_initial_sync
(
UE_nr_rxtx_proc_t
*
proc
,
PHY_VARS_NR_UE
*
ue
,
runmode_t
mode
)
int
nr_initial_sync
(
UE_nr_rxtx_proc_t
*
proc
,
PHY_VARS_NR_UE
*
ue
,
runmode_t
mode
,
int
n_frames
)
{
int32_t
sync_pos
,
sync_pos_frame
;
// k_ssb, N_ssb_crb, sync_pos2,
...
...
@@ -243,7 +243,8 @@ int nr_initial_sync(UE_nr_rxtx_proc_t *proc, PHY_VARS_NR_UE *ue, runmode_t mode)
cnt
=
0
;
// initial sync performed on two successive frames, if pbch passes on first frame, no need to process second frame
for
(
is
=
0
;
is
<
2
;
is
++
)
{
// only one frame is used for symulation tools
for
(
is
=
0
;
is
<
n_frames
;
is
++
)
{
/* process pss search on received buffer */
sync_pos
=
pss_synchro_nr
(
ue
,
is
,
NO_RATE_CHANGE
);
...
...
@@ -253,7 +254,6 @@ int nr_initial_sync(UE_nr_rxtx_proc_t *proc, PHY_VARS_NR_UE *ue, runmode_t mode)
else
ue
->
ssb_offset
=
sync_pos
+
(
fp
->
samples_per_subframe
*
10
)
-
fp
->
nb_prefix_samples
;
#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
,
"sync_pos %d ssb_offset %d
\n
"
,
sync_pos
,
ue
->
ssb_offset
);
...
...
openair1/PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h
View file @
43a98185
...
...
@@ -1435,7 +1435,9 @@ void generate_RIV_tables(void);
@param mode current running mode
*/
int
nr_initial_sync
(
UE_nr_rxtx_proc_t
*
proc
,
PHY_VARS_NR_UE
*
phy_vars_ue
,
runmode_t
mode
);
PHY_VARS_NR_UE
*
phy_vars_ue
,
runmode_t
mode
,
int
n_frames
);
/*!
...
...
openair1/SIMULATION/NR_PHY/dlsim.c
View file @
43a98185
...
...
@@ -685,7 +685,7 @@ int main(int argc, char **argv)
}
if
(
UE
->
is_synchronized
==
0
)
{
UE_nr_rxtx_proc_t
proc
=
{
0
};
ret
=
nr_initial_sync
(
&
proc
,
UE
,
normal_txrx
);
ret
=
nr_initial_sync
(
&
proc
,
UE
,
normal_txrx
,
1
);
printf
(
"nr_initial_sync1 returns %d
\n
"
,
ret
);
if
(
ret
<
0
)
n_errors
++
;
}
...
...
openair1/SIMULATION/NR_PHY/pbchsim.c
View file @
43a98185
...
...
@@ -478,8 +478,7 @@ int main(int argc, char **argv)
if
(
eps
!=
0
.
0
)
UE
->
UE_fo_compensation
=
1
;
// if a frequency offset is set then perform fo estimation and compensation
if
(
init_nr_ue_signal
(
UE
,
1
,
0
)
!=
0
)
{
if
(
init_nr_ue_signal
(
UE
,
1
,
0
)
!=
0
)
{
printf
(
"Error at UE NR initialisation
\n
"
);
exit
(
-
1
);
}
...
...
@@ -588,39 +587,37 @@ int main(int argc, char **argv)
for
(
i
=
0
;
i
<
frame_length_complex_samples
;
i
++
)
{
for
(
aa
=
0
;
aa
<
frame_parms
->
nb_antennas_rx
;
aa
++
)
{
((
short
*
)
UE
->
common_vars
.
rxdata
[
aa
])[
2
*
i
]
=
(
short
)
((
r_re
[
aa
][
i
]
+
sqrt
(
sigma2
/
2
)
*
gaussdouble
(
0
.
0
,
1
.
0
)));
((
short
*
)
UE
->
common_vars
.
rxdata
[
aa
])[
2
*
i
+
1
]
=
(
short
)
((
r_im
[
aa
][
i
]
+
sqrt
(
sigma2
/
2
)
*
gaussdouble
(
0
.
0
,
1
.
0
)));
((
short
*
)
UE
->
common_vars
.
rxdata
_is
[
aa
])[
2
*
i
]
=
(
short
)
((
r_re
[
aa
][
i
]
+
sqrt
(
sigma2
/
2
)
*
gaussdouble
(
0
.
0
,
1
.
0
)));
((
short
*
)
UE
->
common_vars
.
rxdata
_is
[
aa
])[
2
*
i
+
1
]
=
(
short
)
((
r_im
[
aa
][
i
]
+
sqrt
(
sigma2
/
2
)
*
gaussdouble
(
0
.
0
,
1
.
0
)));
}
}
if
(
n_trials
==
1
)
{
LOG_M
(
"rxsig0.m"
,
"rxs0"
,
UE
->
common_vars
.
rxdata
[
0
],
frame_parms
->
samples_per_frame
,
1
,
1
);
LOG_M
(
"rxsig0.m"
,
"rxs0"
,
UE
->
common_vars
.
rxdata
_is
[
0
],
frame_parms
->
samples_per_frame
,
1
,
1
);
if
(
gNB
->
frame_parms
.
nb_antennas_tx
>
1
)
LOG_M
(
"rxsig1.m"
,
"rxs1"
,
UE
->
common_vars
.
rxdata
[
1
],
frame_parms
->
samples_per_frame
,
1
,
1
);
LOG_M
(
"rxsig1.m"
,
"rxs1"
,
UE
->
common_vars
.
rxdata
_is
[
1
],
frame_parms
->
samples_per_frame
,
1
,
1
);
}
if
(
UE
->
is_synchronized
==
0
)
{
UE_nr_rxtx_proc_t
proc
=
{
0
};
ret
=
nr_initial_sync
(
&
proc
,
UE
,
normal_txrx
);
ret
=
nr_initial_sync
(
&
proc
,
UE
,
normal_txrx
,
1
);
printf
(
"nr_initial_sync1 returns %d
\n
"
,
ret
);
if
(
ret
<
0
)
n_errors
++
;
}
else
{
UE
->
rx_offset
=
0
;
uint8_t
ssb_index
=
0
;
while
(
!
((
SSB_positions
>>
ssb_index
)
&
0x01
))
ssb_index
++
;
// to select the first transmitted ssb
UE
->
symbol_offset
=
nr_get_ssb_start_symbol
(
frame_parms
,
ssb_index
,
n_hf
);
int
ssb_slot
=
(
ssb_index
/
2
)
+
(
n_hf
*
frame_parms
->
slots_per_frame
);
for
(
int
i
=
UE
->
symbol_offset
+
1
;
i
<
UE
->
symbol_offset
+
4
;
i
++
)
{
nr_slot_fep
(
UE
,
i
,
0
,
i
%
frame_parms
->
symbols_per_slot
,
ssb_slot
,
0
,
0
,
NR_PBCH_EST
);
nr_pbch_channel_estimation
(
UE
,
0
,
0
,
i
,
i
-
(
UE
->
symbol_offset
+
1
),
ssb_index
%
8
,
n_hf
);
nr_pbch_channel_estimation
(
UE
,
0
,
ssb_slot
,
i
%
frame_parms
->
symbols_per_slot
,
i
-
(
UE
->
symbol_offset
+
1
),
ssb_index
%
8
,
n_hf
);
}
UE_nr_rxtx_proc_t
proc
=
{
0
};
...
...
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