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
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
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
OpenXG
OpenXG-RAN
Commits
155d24f9
Commit
155d24f9
authored
May 19, 2024
by
Sakthivel Velumani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Code cleanup
Remove old and unused code. Fix indentation.
parent
7c146154
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
37 additions
and
115 deletions
+37
-115
executables/nr-ue.c
executables/nr-ue.c
+37
-115
No files found.
executables/nr-ue.c
View file @
155d24f9
...
@@ -94,12 +94,6 @@
...
@@ -94,12 +94,6 @@
*
*
*/
*/
typedef
enum
{
pss
=
0
,
pbch
=
1
,
si
=
2
}
sync_mode_t
;
static
void
*
NRUE_phy_stub_standalone_pnf_task
(
void
*
arg
);
static
void
*
NRUE_phy_stub_standalone_pnf_task
(
void
*
arg
);
static
size_t
dump_L1_UE_meas_stats
(
PHY_VARS_NR_UE
*
ue
,
char
*
output
,
size_t
max_len
)
static
size_t
dump_L1_UE_meas_stats
(
PHY_VARS_NR_UE
*
ue
,
char
*
output
,
size_t
max_len
)
...
@@ -357,82 +351,16 @@ typedef struct {
...
@@ -357,82 +351,16 @@ typedef struct {
}
syncData_t
;
}
syncData_t
;
static
void
UE_synch
(
void
*
arg
)
{
static
void
UE_synch
(
void
*
arg
)
{
syncData_t
*
syncD
=
(
syncData_t
*
)
arg
;
syncData_t
*
syncD
=
(
syncData_t
*
)
arg
;
int
i
,
hw_slot_offset
;
PHY_VARS_NR_UE
*
UE
=
syncD
->
UE
;
PHY_VARS_NR_UE
*
UE
=
syncD
->
UE
;
sync_mode_t
sync_mode
=
pbch
;
//int CC_id = UE->CC_id;
static
int
freq_offset
=
0
;
UE
->
is_synchronized
=
0
;
UE
->
is_synchronized
=
0
;
if
(
UE
->
UE_scan
==
0
)
{
for
(
i
=
0
;
i
<
openair0_cfg
[
UE
->
rf_map
.
card
].
rx_num_channels
;
i
++
)
{
LOG_I
(
PHY
,
"[SCHED][UE] Check absolute frequency DL %f, UL %f (RF card %d, oai_exit %d, channel %d, rx_num_channels %d)
\n
"
,
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
],
UE
->
rf_map
.
card
,
oai_exit
,
i
,
openair0_cfg
[
0
].
rx_num_channels
);
}
sync_mode
=
pbch
;
}
else
{
LOG_E
(
PHY
,
"Fixme!
\n
"
);
/*
for (i=0; i<openair0_cfg[UE->rf_map.card].rx_num_channels; i++) {
downlink_frequency[UE->rf_map.card][UE->rf_map.chain+i] = bands_to_scan.band_info[CC_id].dl_min;
uplink_frequency_offset[UE->rf_map.card][UE->rf_map.chain+i] =
bands_to_scan.band_info[CC_id].ul_min-bands_to_scan.band_info[CC_id].dl_min;
openair0_cfg[UE->rf_map.card].rx_freq[UE->rf_map.chain+i] = downlink_frequency[CC_id][i];
openair0_cfg[UE->rf_map.card].tx_freq[UE->rf_map.chain+i] =
downlink_frequency[CC_id][i]+uplink_frequency_offset[CC_id][i];
openair0_cfg[UE->rf_map.card].rx_gain[UE->rf_map.chain+i] = UE->rx_total_gain_dB;
}
*/
}
if
(
UE
->
target_Nid_cell
!=
-
1
)
{
if
(
UE
->
target_Nid_cell
!=
-
1
)
{
LOG_W
(
NR_PHY
,
"Starting re-sync detection for target Nid_cell %i
\n
"
,
UE
->
target_Nid_cell
);
LOG_W
(
NR_PHY
,
"Starting re-sync detection for target Nid_cell %i
\n
"
,
UE
->
target_Nid_cell
);
}
else
{
}
else
{
LOG_W
(
NR_PHY
,
"Starting sync detection
\n
"
);
LOG_W
(
NR_PHY
,
"Starting sync detection
\n
"
);
}
}
switch
(
sync_mode
)
{
/*
case pss:
LOG_I(PHY,"[SCHED][UE] Scanning band %d (%d), freq %u\n",bands_to_scan.band_info[current_band].band, current_band,bands_to_scan.band_info[current_band].dl_min+current_offset);
//lte_sync_timefreq(UE,current_band,bands_to_scan.band_info[current_band].dl_min+current_offset);
current_offset += 20000000; // increase by 20 MHz
if (current_offset > bands_to_scan.band_info[current_band].dl_max-bands_to_scan.band_info[current_band].dl_min) {
current_band++;
current_offset=0;
}
if (current_band==bands_to_scan.nbands) {
current_band=0;
oai_exit=1;
}
for (i=0; i<openair0_cfg[UE->rf_map.card].rx_num_channels; i++) {
downlink_frequency[UE->rf_map.card][UE->rf_map.chain+i] = bands_to_scan.band_info[current_band].dl_min+current_offset;
uplink_frequency_offset[UE->rf_map.card][UE->rf_map.chain+i] = bands_to_scan.band_info[current_band].ul_min-bands_to_scan.band_info[0].dl_min + current_offset;
openair0_cfg[UE->rf_map.card].rx_freq[UE->rf_map.chain+i] = downlink_frequency[CC_id][i];
openair0_cfg[UE->rf_map.card].tx_freq[UE->rf_map.chain+i] = downlink_frequency[CC_id][i]+uplink_frequency_offset[CC_id][i];
openair0_cfg[UE->rf_map.card].rx_gain[UE->rf_map.chain+i] = UE->rx_total_gain_dB;
if (UE->UE_scan_carrier) {
openair0_cfg[UE->rf_map.card].autocal[UE->rf_map.chain+i] = 1;
}
}
break;
*/
case
pbch
:
LOG_I
(
PHY
,
"[UE thread Synch] Running Initial Synch
\n
"
);
LOG_I
(
PHY
,
"[UE thread Synch] Running Initial Synch
\n
"
);
uint64_t
dl_carrier
,
ul_carrier
;
uint64_t
dl_carrier
,
ul_carrier
;
...
@@ -440,8 +368,8 @@ static void UE_synch(void *arg) {
...
@@ -440,8 +368,8 @@ static void UE_synch(void *arg) {
nr_initial_sync_t
ret
=
nr_initial_sync
(
&
syncD
->
proc
,
UE
,
2
,
get_softmodem_params
()
->
sa
,
syncD
->
gscnInfo
,
syncD
->
numGscn
);
nr_initial_sync_t
ret
=
nr_initial_sync
(
&
syncD
->
proc
,
UE
,
2
,
get_softmodem_params
()
->
sa
,
syncD
->
gscnInfo
,
syncD
->
numGscn
);
if
(
ret
.
cell_detected
)
{
if
(
ret
.
cell_detected
)
{
syncD
->
rx_offset
=
ret
.
rx_offset
;
syncD
->
rx_offset
=
ret
.
rx_offset
;
freq_offset
=
UE
->
common_vars
.
freq_offset
;
// frequency offset computed with pss in initial sync
const
int
freq_offset
=
UE
->
common_vars
.
freq_offset
;
// frequency offset computed with pss in initial sync
hw_slot_offset
=
const
int
hw_slot_offset
=
((
ret
.
rx_offset
<<
1
)
/
UE
->
frame_parms
.
samples_per_subframe
*
UE
->
frame_parms
.
slots_per_subframe
)
((
ret
.
rx_offset
<<
1
)
/
UE
->
frame_parms
.
samples_per_subframe
*
UE
->
frame_parms
.
slots_per_subframe
)
+
round
((
float
)((
ret
.
rx_offset
<<
1
)
%
UE
->
frame_parms
.
samples_per_subframe
)
/
UE
->
frame_parms
.
samples_per_slot0
);
+
round
((
float
)((
ret
.
rx_offset
<<
1
)
%
UE
->
frame_parms
.
samples_per_subframe
)
/
UE
->
frame_parms
.
samples_per_slot0
);
...
@@ -449,23 +377,17 @@ static void UE_synch(void *arg) {
...
@@ -449,23 +377,17 @@ static void UE_synch(void *arg) {
// todo: the freq_offset computed on DL shall be scaled before being applied to UL
// todo: the freq_offset computed on DL shall be scaled before being applied to UL
nr_rf_card_config_freq
(
&
openair0_cfg
[
UE
->
rf_map
.
card
],
ul_carrier
,
dl_carrier
,
freq_offset
);
nr_rf_card_config_freq
(
&
openair0_cfg
[
UE
->
rf_map
.
card
],
ul_carrier
,
dl_carrier
,
freq_offset
);
LOG_I
(
PHY
,
"Got synch: hw_slot_offset %d, carrier off %d Hz, rxgain %f (DL %f Hz, UL %f Hz)
\n
"
,
LOG_I
(
PHY
,
"Got synch: hw_slot_offset %d, carrier off %d Hz, rxgain %f (DL %f Hz, UL %f Hz)
\n
"
,
hw_slot_offset
,
hw_slot_offset
,
freq_offset
,
freq_offset
,
openair0_cfg
[
UE
->
rf_map
.
card
].
rx_gain
[
0
],
openair0_cfg
[
UE
->
rf_map
.
card
].
rx_gain
[
0
],
openair0_cfg
[
UE
->
rf_map
.
card
].
rx_freq
[
0
],
openair0_cfg
[
UE
->
rf_map
.
card
].
rx_freq
[
0
],
openair0_cfg
[
UE
->
rf_map
.
card
].
tx_freq
[
0
]);
openair0_cfg
[
UE
->
rf_map
.
card
].
tx_freq
[
0
]);
UE
->
rfdevice
.
trx_set_freq_func
(
&
UE
->
rfdevice
,
&
openair0_cfg
[
0
]);
UE
->
rfdevice
.
trx_set_freq_func
(
&
UE
->
rfdevice
,
&
openair0_cfg
[
0
]);
UE
->
is_synchronized
=
1
;
UE
->
is_synchronized
=
1
;
}
}
break
;
case
si
:
default:
break
;
}
}
}
static
void
RU_write
(
nr_rxtx_thread_data_t
*
rxtxD
)
{
static
void
RU_write
(
nr_rxtx_thread_data_t
*
rxtxD
)
{
...
...
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