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
wangjie
OpenXG-RAN
Commits
1a3548e5
Commit
1a3548e5
authored
Jan 22, 2015
by
Raymond Knopp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
git-svn-id:
http://svn.eurecom.fr/openair4G/trunk@6421
818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent
b4635ac4
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
72 additions
and
75 deletions
+72
-75
targets/RT/USER/lte-softmodem.c
targets/RT/USER/lte-softmodem.c
+72
-75
No files found.
targets/RT/USER/lte-softmodem.c
View file @
1a3548e5
...
...
@@ -1870,8 +1870,8 @@ static void *UE_thread_synch(void *arg) {
openair0_cfg
[
card
].
rx_gain
[
i
]
=
PHY_vars_UE_g
[
0
][
0
]
->
rx_total_gain_dB
-
USRP_GAIN_OFFSET
;
#ifdef USRP
#ifndef USRP_DEBUG
openair0_set_frequencies
(
&
openair0
,
&
openair0_cfg
[
0
]);
//
openair0_set_gains(&openair0,&openair0_cfg[0]);
openair0_set_
rx_
frequencies
(
&
openair0
,
&
openair0_cfg
[
0
]);
openair0_set_gains
(
&
openair0
,
&
openair0_cfg
[
0
]);
#endif
#endif
}
...
...
@@ -1881,6 +1881,7 @@ static void *UE_thread_synch(void *arg) {
else
{
LOG_D
(
PHY
,
"[SCHED][UE] Check absolute frequency %u
\n
"
,
downlink_frequency
[
0
][
0
]);
}
while
(
!
oai_exit
)
{
if
(
pthread_mutex_lock
(
&
UE
->
mutex_synch
)
!=
0
)
{
...
...
@@ -1897,40 +1898,32 @@ static void *UE_thread_synch(void *arg) {
}
}
// mutex_lock
vcd_signal_dumper_dump_function_by_name
(
VCD_SIGNAL_DUMPER_FUNCTIONS_UE_SYNCH
,
1
);
switch
(
sync_mode
)
{
case
rssi
:
rssi_min
=
1
<<
3
1
;
rssi_min
=
(
1
<<
31
)
-
1
;
rssi_max
=
0
;
rssi_avg
=
0
;
memset
(
power_dBm_max
,
0
,
1024
);
for
(
i
=
0
;
i
<
76800
*
4
;
i
+=
1024
)
{
//compute frequency-domain representation of 1024-sample chunk
dft1024
(
&
PHY_vars_UE_g
[
0
][
0
]
->
lte_ue_common_vars
.
rxdata
[
0
][
i
],
spectrum
,
1
);
compute_spectrum_stats
(
spectrum
,
power_avg
,
power_max
,
power_min
,
PHY_vars_UE_g
[
0
][
0
]
->
rx_total_gain_dB
);
}
/*
for
(
i
=
0
;
i
<
76800
;
i
+=
7680
)
{
rssi_lin
=
signal_energy
(
&
PHY_vars_UE_g
[
0
][
0
]
->
lte_ue_common_vars
.
rxdata
[
0
][
i
],
7680
);
if
(
PHY_vars_UE_g
[
0
][
0
]
->
lte_frame_parms
.
nb_antennas_rx
>
1
)
rssi_lin
+=
signal_energy
(
&
PHY_vars_UE_g
[
0
][
0
]
->
lte_ue_common_vars
.
rxdata
[
1
][
i
],
7680
);
rssi_avg += rssi;
rssi_min = (rssi
< rssi_min) ? rssi
: rssi_min;
rssi_max = (rssi
> rssi_max) ? rssi
: rssi_max;
rssi_avg
+=
rssi
_lin
;
rssi_min
=
(
rssi
_lin
<
rssi_min
)
?
rssi_lin
:
rssi_min
;
rssi_max
=
(
rssi
_lin
>
rssi_max
)
?
rssi_lin
:
rssi_max
;
}
rssi_dBm
=
dB_fixed_times10
(
rssi_avg
/
10
)
/
10
.
0
-
PHY_vars_UE_g
[
0
][
0
]
->
rx_total_gain_dB
;
rssi_max_dBm
=
dB_fixed_times10
(
rssi_max
)
/
10
.
0
-
PHY_vars_UE_g
[
0
][
0
]
->
rx_total_gain_dB
;
rssi_min_dBm
=
dB_fixed_times10
(
rssi_min
)
/
10
.
0
-
PHY_vars_UE_g
[
0
][
0
]
->
rx_total_gain_dB
;
LOG_D(PHY,"Band %d, DL Freq %u: RSSI
(avg, min, max) %f,%f,%f dBm\n",
LOG_D
(
PHY
,
"Band %d, DL Freq %u: RSSI (%d,%d,%d)
(avg, min, max) %f,%f,%f dBm
\n
"
,
bands_to_scan
.
band_info
[
current_band
].
band
,
downlink_frequency
[
0
][
0
],
rssi_avg
/
10
,
rssi_min
,
rssi_max
,
rssi_dBm
,
rssi_min_dBm
,
rssi_max_dBm
);
...
...
@@ -1942,23 +1935,27 @@ static void *UE_thread_synch(void *arg) {
}
if
(
current_band
==
bands_to_scan
.
nbands
)
{
current_band
=
0
;
oai_exit
=
1
;
}
for
(
card
=
0
;
card
<
MAX_CARDS
;
card
++
)
{
for
(
i
=
0
;
i
<
openair0_cfg
[
card
].
rx_num_channels
;
i
++
)
{
downlink_frequency
[
card
][
i
]
=
bands_to_scan
.
band_info
[
current_band
].
dl_min
+
current_offset
;
uplink_frequency_offset
[
card
][
i
]
=
bands_to_scan
.
band_info
[
current_band
].
ul_min
-
bands_to_scan
.
band_info
[
0
].
dl_min
+
current_offset
;
openair0_cfg
[
card
].
rx_freq
[
i
]
=
downlink_frequency
[
card
][
i
]
+
openair_daq_vars
.
freq_offset
;
openair0_cfg
[
card
].
tx_freq
[
i
]
=
downlink_frequency
[
card
][
i
]
+
uplink_frequency_offset
[
card
][
i
]
+
openair_daq_vars
.
freq_offset
;
openair0_cfg
[
card
].
rx_gain
[
i
]
=
PHY_vars_UE_g
[
0
][
0
]
->
rx_total_gain_dB
-
USRP_GAIN_OFFSET
;
// 65 calibrated for USRP B210 @ 2.6 GHz
#ifdef USRP
#ifndef USRP_DEBUG
openair0_set_frequencies(&openair0,&openair0_cfg[0]);
openair0_set_
rx_
frequencies
(
&
openair0
,
&
openair0_cfg
[
0
]);
// openair0_set_gains(&openair0,&openair0_cfg[0]);
#endif
#endif
}
}
*/
break
;
case
pbch
:
...
...
@@ -2030,7 +2027,7 @@ static void *UE_thread_synch(void *arg) {
default:
break
;
}
vcd_signal_dumper_dump_function_by_name
(
VCD_SIGNAL_DUMPER_FUNCTIONS_UE_SYNCH
,
0
);
if
(
pthread_mutex_lock
(
&
PHY_vars_UE_g
[
0
][
0
]
->
mutex_synch
)
!=
0
)
{
printf
(
"[openair][SCHED][eNB] error locking mutex for UE synch
\n
"
);
}
...
...
@@ -2041,7 +2038,7 @@ if (pthread_mutex_lock(&PHY_vars_UE_g[0][0]->mutex_synch) != 0) {
printf
(
"[openair][SCHED][eNB] error unlocking mutex for UE synch
\n
"
);
}
}
vcd_signal_dumper_dump_function_by_name
(
VCD_SIGNAL_DUMPER_FUNCTIONS_UE_SYNCH
,
0
);
}
// while !oai_exit
return
(
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