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
ZhouShuya
OpenXG-RAN
Commits
7e45f8be
Commit
7e45f8be
authored
Oct 10, 2020
by
cig
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix for scan carrier to make it compatible with custom DL/UL IF implementation
parent
fa07a484
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
7 deletions
+21
-7
executables/nr-ue.c
executables/nr-ue.c
+21
-7
No files found.
executables/nr-ue.c
View file @
7e45f8be
...
@@ -343,21 +343,35 @@ static void UE_synch(void *arg) {
...
@@ -343,21 +343,35 @@ static void UE_synch(void *arg) {
// initial sync failed
// initial sync failed
// calculate new offset and try again
// calculate new offset and try again
if
(
UE
->
UE_scan_carrier
==
1
)
{
if
(
UE
->
UE_scan_carrier
==
1
)
{
uint64_t
dl_carrier
,
ul_carrier
;
if
(
freq_offset
>=
0
)
if
(
freq_offset
>=
0
)
freq_offset
+=
100
;
freq_offset
+=
100
;
freq_offset
*=
-
1
;
freq_offset
*=
-
1
;
LOG_I
(
PHY
,
"[initial_sync] trying carrier off %d Hz, rxgain %d (DL %lu, UL %lu)
\n
"
,
freq_offset
,
if
(
downlink_frequency
[
0
][
0
])
UE
->
rx_total_gain_dB
,
dl_carrier
=
downlink_frequency
[
0
][
0
];
UE
->
frame_parms
.
dl_CarrierFreq
+
freq_offset
,
else
UE
->
frame_parms
.
ul_CarrierFreq
+
freq_offset
);
dl_carrier
=
UE
->
frame_parms
.
dl_CarrierFreq
;
if
(
uplink_frequency_offset
[
0
][
0
])
ul_carrier
=
dl_carrier
+
uplink_frequency_offset
[
0
][
0
];
else
ul_carrier
=
dl_carrier
+
UE
->
frame_parms
.
ul_CarrierFreq
-
UE
->
frame_parms
.
dl_CarrierFreq
;
for
(
i
=
0
;
i
<
openair0_cfg
[
UE
->
rf_map
.
card
].
rx_num_channels
;
i
++
)
{
for
(
i
=
0
;
i
<
openair0_cfg
[
UE
->
rf_map
.
card
].
rx_num_channels
;
i
++
)
{
openair0_cfg
[
UE
->
rf_map
.
card
].
rx_freq
[
UE
->
rf_map
.
chain
+
i
]
=
UE
->
frame_parms
.
dl_CarrierFreq
+
freq_offset
;
openair0_cfg
[
UE
->
rf_map
.
card
].
rx_freq
[
UE
->
rf_map
.
chain
+
i
]
=
dl_carrier
+
freq_offset
;
openair0_cfg
[
UE
->
rf_map
.
card
].
tx_freq
[
UE
->
rf_map
.
chain
+
i
]
=
UE
->
frame_parms
.
ul_CarrierFreq
+
freq_offset
;
openair0_cfg
[
UE
->
rf_map
.
card
].
tx_freq
[
UE
->
rf_map
.
chain
+
i
]
=
ul_carrier
+
freq_offset
;
openair0_cfg
[
UE
->
rf_map
.
card
].
rx_gain
[
UE
->
rf_map
.
chain
+
i
]
=
UE
->
rx_total_gain_dB
;
//-USRP_GAIN_OFFSET;
openair0_cfg
[
UE
->
rf_map
.
card
].
rx_gain
[
UE
->
rf_map
.
chain
+
i
]
=
UE
->
rx_total_gain_dB
;
//-USRP_GAIN_OFFSET;
LOG_I
(
PHY
,
"[initial_sync] trying carrier off %d Hz, rxgain %d (DL %f, UL %f)
\n
"
,
freq_offset
,
UE
->
rx_total_gain_dB
,
openair0_cfg
[
UE
->
rf_map
.
card
].
rx_freq
[
UE
->
rf_map
.
chain
+
i
],
openair0_cfg
[
UE
->
rf_map
.
card
].
tx_freq
[
UE
->
rf_map
.
chain
+
i
]);
if
(
UE
->
UE_scan_carrier
==
1
)
if
(
UE
->
UE_scan_carrier
==
1
)
openair0_cfg
[
UE
->
rf_map
.
card
].
autocal
[
UE
->
rf_map
.
chain
+
i
]
=
1
;
openair0_cfg
[
UE
->
rf_map
.
card
].
autocal
[
UE
->
rf_map
.
chain
+
i
]
=
1
;
}
}
...
...
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