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
littleBu
OpenXG-RAN
Commits
28a4f533
Commit
28a4f533
authored
5 years ago
by
frtabu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix basic simu problem, due to remaining #if OAI_USRP... macros in UE
parent
fad83e47
Branches unavailable
2025.w08
2025.w07
2025.w06
2025.w05
2025.w04
2025.w03
2025.w02
2024.w51
2024.w50
2024.w49
2024.w48
2024.w47
2024.w46
2024.w45
2024.w44
2024.w43
2024.w42
2024.w41
2024.w40
2024.w39
2024.w38
2024.w36
2024.w35
2024.w34
2024.w33
2024.w32
2024.w31
2024.w30
2024.w29
2024.w28
2024.w27
2024.w26
2024.w25
2024.w24
2024.w23
2024.w22
2024.w21
2024.w18
2024.w17
2024.w16
2024.w15
2024.w14
2024.w13
2024.w12
2024.w11
2024.w10
2024.w09
2024.w08
2024.w06
2024.w05
2024.w04
2024.w03
2024.w02
2024.w01
2023.w51
2023.w50
2023.w49
2023.w48
2023.w47
2023.w45
2023.w43
2023.w42
2023.w41
2023.w40
2023.w39
2023.w38
2023.w37
2023.w36
2023.w34
2023.w33
2023.w32
2023.w31
2023.w30
2023.w29
2023.w28
2023.w27
2023.w26
2023.w25
2023.w24
2023.w23
2023.w22
2023.w21
2023.w20
2023.w19
2023.w18
2023.w18b
2023.w16
2023.w15
2023.w14
2023.w13
2023.w12
2023.w11
2023.w11b
2023.w10
2023.w10b
2023.w09
2023.w08
2023.w08b
2023.w07
2023.w06
2023.w05
2023.w03
2023.w02
2022.42
2022.41
2022.w51
2022.w50
2022.w49
2022.w48
2022.w47
2022.w46
2022.w45
2022.w43
2022.w42
2022.w42b
2022.w41
2022.w40
2022.w39
2022.w38
2022.w37
2022.w37b
2022.w36
2022.w35
2022.w33
2022.w32
2022.w31
2022.w31b
2022.w30
2022.w29
2022.w26
2022.w25
2022.w24
2022.w24b
2022.w23
2022.w22
2022.w21
2022.w20
2022.w19
2022.w18
2022.w17
2022.w15
2022.w15b
2022.w14a
2022.w13
2022.w13b
2022.w13a
2022.w12
2022.w10
2022.w09
2022.w09b
2022.w08
2022.w08b
2022.w07
2022.w07b
2022.w06
2022.w06a
2022.w05
2022.w05b
2022.w03_hotfix
2022.w03_b
2022.w02
2022.w01
2021.wk46
2021.wk14_a
2021.wk13_d
2021.wk13_c
2021.w51_c
2021.w51_a
2021.w50_a
2021.w49_b
2021.w49_a
2021.w48
2021.w47
2021.w46
2021.w46-powder
2021.w45
2021.w45_b
2021.w44
2021.w43
2021.w42
2021.w37
2021.w36
2021.w35
2021.w34
2021.w33
2021.w32
2021.w31
2021.w30
2021.w29
2021.w28
2021.w27
2021.w26
2021.w25
2021.w24
2021.w23
2021.w22
2021.w20
2021.w19
2021.w18_b
2021.w18_a
2021.w17_b
2021.w16
2021.w15
2021.w14
2021.w13_a
2021.w12
2021.w11
2021.w10
2021.w09
2021.w08
2021.w06
2021.w05
2021.w04
2021.w02
2020.w51_2
2020.w51
2020.w50
2020.w49
2020.w48_2
2020.w48
2020.w47
2020.w46_2
2020.w46
2020.w45_2
2020.w45
2020.w44
2020.w42_2
2020.w42
2020.w41
2020.w39
2020.w38
2020.w37
2020.w36
2020.w34
2020.w33
2020.w31
2020.w30
2020.w29
2020.w28
2020.w26
2020.w25
2020.w24
2020.w23
2020.w22
2020.w19
2020.w17
2020.w16
2020.w15
2020.w11
2020.w09
2020.w06
2020.w05
2020.w04
2020.w03
2019.w51
2019.w44
2019.w41
2019.w36
2019.w30
2019.w28
2019.w27
2019.w25
2019.w23
2019.w21
v2.2.0
v2.1.0
v2.0.0
v1.2.2
v1.2.1
v1.2.0
v1.1.1
v1.1.0
setparam
nr-ip-over-lte-v.1.5
nr-ip-over-lte-v.1.4
nr-ip-over-lte-v.1.3
nr-ip-over-lte-v.1.2
nr-ip-over-lte-v.1.1
nr-ip-over-lte-v.1.0
flexran-eol
develop-nr-2020w03
develop-nr-2020w02
develop-nr-2019w51
develop-nr-2019w50
develop-nr-2019w48
develop-nr-2019w47
develop-nr-2019w45
develop-nr-2019w43
develop-nr-2019w42
develop-nr-2019w40
benetel_phase_rotation
benetel_gnb_rel_2.0
benetel_gnb_rel_1.0
benetel_enb_rel_2.0
benetel_enb_rel_1.0
ARC_1.3
No related merge requests found
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
890 additions
and
1029 deletions
+890
-1029
openair1/PHY/LTE_TRANSPORT/print_stats.c
openair1/PHY/LTE_TRANSPORT/print_stats.c
+460
-493
openair1/PHY/LTE_UE_TRANSPORT/initial_sync.c
openair1/PHY/LTE_UE_TRANSPORT/initial_sync.c
+21
-60
openair1/PHY/LTE_UE_TRANSPORT/prach_ue.c
openair1/PHY/LTE_UE_TRANSPORT/prach_ue.c
+242
-259
openair1/SCHED_UE/phy_procedures_lte_ue.c
openair1/SCHED_UE/phy_procedures_lte_ue.c
+166
-216
targets/RT/USER/lte-ue.c
targets/RT/USER/lte-ue.c
+1
-1
No files found.
openair1/PHY/LTE_TRANSPORT/print_stats.c
View file @
28a4f533
This diff is collapsed.
Click to expand it.
openair1/PHY/LTE_UE_TRANSPORT/initial_sync.c
View file @
28a4f533
...
...
@@ -31,6 +31,7 @@
*/
#include "PHY/types.h"
#include "PHY/defs_UE.h"
#include "targets/RT/USER/lte-softmodem.h"
#include "PHY/phy_extern_ue.h"
#include "SCHED_UE/sched_UE.h"
#include "transport_proto_ue.h"
...
...
@@ -49,10 +50,8 @@ int pbch_detection(PHY_VARS_UE *ue, runmode_t mode) {
uint8_t
l
,
pbch_decoded
,
frame_mod4
,
pbch_tx_ant
,
dummy
;
LTE_DL_FRAME_PARMS
*
frame_parms
=&
ue
->
frame_parms
;
char
phich_resource
[
6
];
#ifdef DEBUG_INITIAL_SYNCH
LOG_I
(
PHY
,
"[UE%d] Initial sync: starting PBCH detection (rx_offset %d)
\n
"
,
ue
->
Mod_id
,
LOG_D
(
PHY
,
"[UE%d] Initial sync: starting PBCH detection (rx_offset %d)
\n
"
,
ue
->
Mod_id
,
ue
->
rx_offset
);
#endif
for
(
l
=
0
;
l
<
frame_parms
->
symbols_per_tti
/
2
;
l
++
)
{
slot_fep
(
ue
,
...
...
@@ -95,8 +94,7 @@ int pbch_detection(PHY_VARS_UE *ue, runmode_t mode) {
0
);
}
#ifdef DEBUG_INITIAL_SYNCH
LOG_I
(
PHY
,
"[UE %d] RX RSSI %d dBm, digital (%d, %d) dB, linear (%d, %d), avg rx power %d dB (%d lin), RX gain %d dB
\n
"
,
LOG_D
(
PHY
,
"[UE %d] RX RSSI %d dBm, digital (%d, %d) dB, linear (%d, %d), avg rx power %d dB (%d lin), RX gain %d dB
\n
"
,
ue
->
Mod_id
,
ue
->
measurements
.
rx_rssi_dBm
[
0
]
-
((
ue
->
frame_parms
.
nb_antennas_rx
==
2
)
?
3
:
0
),
ue
->
measurements
.
rx_power_dB
[
0
][
0
],
...
...
@@ -106,7 +104,7 @@ int pbch_detection(PHY_VARS_UE *ue, runmode_t mode) {
ue
->
measurements
.
rx_power_avg_dB
[
0
],
ue
->
measurements
.
rx_power_avg
[
0
],
ue
->
rx_total_gain_dB
);
LOG_
I
(
PHY
,
"[UE %d] N0 %d dBm digital (%d, %d) dB, linear (%d, %d), avg noise power %d dB (%d lin)
\n
"
,
LOG_
D
(
PHY
,
"[UE %d] N0 %d dBm digital (%d, %d) dB, linear (%d, %d), avg noise power %d dB (%d lin)
\n
"
,
ue
->
Mod_id
,
ue
->
measurements
.
n0_power_tot_dBm
,
ue
->
measurements
.
n0_power_dB
[
0
],
...
...
@@ -115,7 +113,6 @@ int pbch_detection(PHY_VARS_UE *ue, runmode_t mode) {
ue
->
measurements
.
n0_power
[
1
],
ue
->
measurements
.
n0_power_avg_dB
,
ue
->
measurements
.
n0_power_avg
);
#endif
pbch_decoded
=
0
;
for
(
frame_mod4
=
0
;
frame_mod4
<
4
;
frame_mod4
++
)
{
...
...
@@ -225,8 +222,7 @@ int pbch_detection(PHY_VARS_UE *ue, runmode_t mode) {
ue
->
proc
.
proc_rxtx
[
i
].
frame_tx
=
ue
->
proc
.
proc_rxtx
[
0
].
frame_rx
;
}
#ifdef DEBUG_INITIAL_SYNCH
LOG_I
(
PHY
,
"[UE%d] Initial sync: pbch decoded sucessfully p %d, tx_ant %d, frame %d, N_RB_DL %d, phich_duration %d, phich_resource %s!
\n
"
,
LOG_D
(
PHY
,
"[UE%d] Initial sync: pbch decoded sucessfully p %d, tx_ant %d, frame %d, N_RB_DL %d, phich_duration %d, phich_resource %s!
\n
"
,
ue
->
Mod_id
,
frame_parms
->
nb_antenna_ports_eNB
,
pbch_tx_ant
,
...
...
@@ -234,7 +230,6 @@ int pbch_detection(PHY_VARS_UE *ue, runmode_t mode) {
frame_parms
->
N_RB_DL
,
frame_parms
->
phich_config_common
.
phich_duration
,
phich_resource
);
//frame_parms->phich_config_common.phich_resource);
#endif
return
(
0
);
}
else
{
return
(
-
1
);
...
...
@@ -254,10 +249,6 @@ int initial_sync(PHY_VARS_UE *ue, runmode_t mode) {
LTE_DL_FRAME_PARMS
*
frame_parms
=
&
ue
->
frame_parms
;
int
ret
=-
1
;
int
aarx
,
rx_power
=
0
;
/*#ifdef OAI_USRP
__m128i *rxdata128;
#endif*/
// LOG_I(PHY,"**************************************************************\n");
// First try FDD normal prefix
frame_parms
->
Ncp
=
NORMAL
;
frame_parms
->
frame_type
=
FDD
;
...
...
@@ -277,9 +268,7 @@ int initial_sync(PHY_VARS_UE *ue, runmode_t mode) {
else
sync_pos2
=
sync_pos
+
FRAME_LENGTH_COMPLEX_SAMPLES
-
frame_parms
->
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
);
#endif
LOG_D
(
PHY
,
"[UE%d] Initial sync : Estimated PSS position %d, Nid2 %d
\n
"
,
ue
->
Mod_id
,
sync_pos
,
ue
->
common_vars
.
eNb_id
);
// SSS detection
// PSS is hypothesized in last symbol of first slot in Frame
sync_pos_slot
=
(
frame_parms
->
samples_per_tti
>>
1
)
-
frame_parms
->
ofdm_symbol_size
-
frame_parms
->
nb_prefix_samples
;
...
...
@@ -291,9 +280,7 @@ int initial_sync(PHY_VARS_UE *ue, runmode_t mode) {
if
(((
sync_pos2
-
sync_pos_slot
)
>=
0
)
&&
((
sync_pos2
-
sync_pos_slot
)
<
((
FRAME_LENGTH_COMPLEX_SAMPLES
-
frame_parms
->
samples_per_tti
/
2
))))
{
#ifdef DEBUG_INITIAL_SYNCH
LOG_I
(
PHY
,
"Calling sss detection (FDD normal CP)
\n
"
);
#endif
LOG_D
(
PHY
,
"Calling sss detection (FDD normal CP)
\n
"
);
rx_sss
(
ue
,
&
metric_fdd_ncp
,
&
flip_fdd_ncp
,
&
phase_fdd_ncp
);
frame_parms
->
nushift
=
frame_parms
->
Nid_cell
%
6
;
...
...
@@ -304,14 +291,10 @@ int initial_sync(PHY_VARS_UE *ue, runmode_t mode) {
lte_gold
(
frame_parms
,
ue
->
lte_gold_table
[
0
],
frame_parms
->
Nid_cell
);
ret
=
pbch_detection
(
ue
,
mode
);
// LOG_M("rxdata2.m","rxd2",ue->common_vars.rxdata[0],10*frame_parms->samples_per_tti,1,1);
#ifdef DEBUG_INITIAL_SYNCH
LOG_I
(
PHY
,
"FDD Normal prefix: CellId %d metric %d, phase %d, flip %d, pbch %d
\n
"
,
LOG_D
(
PHY
,
"FDD Normal prefix: CellId %d metric %d, phase %d, flip %d, pbch %d
\n
"
,
frame_parms
->
Nid_cell
,
metric_fdd_ncp
,
phase_fdd_ncp
,
flip_fdd_ncp
,
ret
);
#endif
}
else
{
#ifdef DEBUG_INITIAL_SYNCH
LOG_I
(
PHY
,
"FDD Normal prefix: SSS error condition: sync_pos %d, sync_pos_slot %d
\n
"
,
sync_pos
,
sync_pos_slot
);
#endif
LOG_D
(
PHY
,
"FDD Normal prefix: SSS error condition: sync_pos %d, sync_pos_slot %d
\n
"
,
sync_pos
,
sync_pos_slot
);
}
if
(
ret
==-
1
)
{
...
...
@@ -347,14 +330,10 @@ int initial_sync(PHY_VARS_UE *ue, runmode_t mode) {
lte_gold
(
frame_parms
,
ue
->
lte_gold_table
[
0
],
frame_parms
->
Nid_cell
);
ret
=
pbch_detection
(
ue
,
mode
);
// LOG_M("rxdata3.m","rxd3",ue->common_vars.rxdata[0],10*frame_parms->samples_per_tti,1,1);
#ifdef DEBUG_INITIAL_SYNCH
LOG_I
(
PHY
,
"FDD Extended prefix: CellId %d metric %d, phase %d, flip %d, pbch %d
\n
"
,
LOG_D
(
PHY
,
"FDD Extended prefix: CellId %d metric %d, phase %d, flip %d, pbch %d
\n
"
,
frame_parms
->
Nid_cell
,
metric_fdd_ecp
,
phase_fdd_ecp
,
flip_fdd_ecp
,
ret
);
#endif
}
else
{
#ifdef DEBUG_INITIAL_SYNCH
LOG_I
(
PHY
,
"FDD Extended prefix: SSS error condition: sync_pos %d, sync_pos_slot %d
\n
"
,
sync_pos
,
sync_pos_slot
);
#endif
LOG_D
(
PHY
,
"FDD Extended prefix: SSS error condition: sync_pos %d, sync_pos_slot %d
\n
"
,
sync_pos
,
sync_pos_slot
);
}
if
(
ret
==-
1
)
{
...
...
@@ -390,10 +369,8 @@ int initial_sync(PHY_VARS_UE *ue, runmode_t mode) {
lte_gold
(
frame_parms
,
ue
->
lte_gold_table
[
0
],
frame_parms
->
Nid_cell
);
ret
=
pbch_detection
(
ue
,
mode
);
// LOG_M("rxdata4.m","rxd4",ue->common_vars.rxdata[0],10*frame_parms->samples_per_tti,1,1);
#ifdef DEBUG_INITIAL_SYNCH
LOG_I
(
PHY
,
"TDD Normal prefix: CellId %d metric %d, phase %d, flip %d, pbch %d
\n
"
,
LOG_D
(
PHY
,
"TDD Normal prefix: CellId %d metric %d, phase %d, flip %d, pbch %d
\n
"
,
frame_parms
->
Nid_cell
,
metric_tdd_ncp
,
phase_tdd_ncp
,
flip_tdd_ncp
,
ret
);
#endif
if
(
ret
==-
1
)
{
// Now TDD extended prefix
...
...
@@ -426,10 +403,8 @@ int initial_sync(PHY_VARS_UE *ue, runmode_t mode) {
lte_gold
(
frame_parms
,
ue
->
lte_gold_table
[
0
],
frame_parms
->
Nid_cell
);
ret
=
pbch_detection
(
ue
,
mode
);
// LOG_M("rxdata5.m","rxd5",ue->common_vars.rxdata[0],10*frame_parms->samples_per_tti,1,1);
#ifdef DEBUG_INITIAL_SYNCH
LOG_I
(
PHY
,
"TDD Extended prefix: CellId %d metric %d, phase %d, flip %d, pbch %d
\n
"
,
LOG_D
(
PHY
,
"TDD Extended prefix: CellId %d metric %d, phase %d, flip %d, pbch %d
\n
"
,
frame_parms
->
Nid_cell
,
metric_tdd_ecp
,
phase_tdd_ecp
,
flip_tdd_ecp
,
ret
);
#endif
}
}
}
...
...
@@ -481,18 +456,16 @@ int initial_sync(PHY_VARS_UE *ue, runmode_t mode) {
openair0_cfg
[
0
].
rx_freq
[
0
]
-
ue
->
common_vars
.
freq_offset
,
ue
->
common_vars
.
freq_offset
);
}
else
{
#ifdef DEBUG_INITIAL_SYNC
LOG_I
(
PHY
,
"[UE%d] Initial sync : PBCH not ok
\n
"
,
ue
->
Mod_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_D
(
PHY
,
"[UE%d] Initial sync : PBCH not ok
\n
"
,
ue
->
Mod_id
);
LOG_D
(
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: (metric fdd_ncp %d (%d), metric fdd_ecp %d (%d), metric_tdd_ncp %d (%d), metric_tdd_ecp %d (%d))\n",
ue->Mod_id,
metric_fdd_ncp,Nid_cell_fdd_ncp,
metric_fdd_ecp,Nid_cell_fdd_ecp,
metric_tdd_ncp,Nid_cell_tdd_ncp,
metric_tdd_ecp,Nid_cell_tdd_ecp);*/
LOG_
I
(
PHY
,
"[UE%d] Initial sync : Estimated Nid_cell %d, Frame_type %d
\n
"
,
ue
->
Mod_id
,
LOG_
D
(
PHY
,
"[UE%d] Initial sync : Estimated Nid_cell %d, Frame_type %d
\n
"
,
ue
->
Mod_id
,
frame_parms
->
Nid_cell
,
frame_parms
->
frame_type
);
#endif
ue
->
UE_mode
[
0
]
=
NOT_SYNCHED
;
ue
->
pbch_vars
[
0
]
->
pdu_errors_last
=
ue
->
pbch_vars
[
0
]
->
pdu_errors
;
ue
->
pbch_vars
[
0
]
->
pdu_errors
++
;
...
...
@@ -517,27 +490,15 @@ int initial_sync(PHY_VARS_UE *ue, runmode_t mode) {
// we might add a low-pass filter here later
ue
->
measurements
.
rx_power_avg
[
0
]
=
rx_power
/
frame_parms
->
nb_antennas_rx
;
ue
->
measurements
.
rx_power_avg_dB
[
0
]
=
dB_fixed
(
ue
->
measurements
.
rx_power_avg
[
0
]);
#ifdef DEBUG_INITIAL_SYNCH
LOG_I
(
PHY
,
"[UE%d] Initial sync : Estimated power: %d dB
\n
"
,
ue
->
Mod_id
,
ue
->
measurements
.
rx_power_avg_dB
[
0
]
);
#endif
#ifndef OAI_USRP
#ifndef OAI_BLADERF
#ifndef OAI_LMSSDR
phy_adjust_gain
(
ue
,
ue
->
measurements
.
rx_power_avg_dB
[
0
],
0
);
#endif
#endif
#endif
if
(
IS_SOFTMODEM_BASICSIM
||
IS_SOFTMODEM_RFSIM
)
phy_adjust_gain
(
ue
,
ue
->
measurements
.
rx_power_avg_dB
[
0
],
0
);
}
else
{
#ifndef OAI_USRP
#ifndef OAI_BLADERF
#ifndef OAI_LMSSDR
phy_adjust_gain
(
ue
,
dB_fixed
(
ue
->
measurements
.
rssi
),
0
);
#endif
#endif
#endif
if
(
IS_SOFTMODEM_BASICSIM
||
IS_SOFTMODEM_RFSIM
)
phy_adjust_gain
(
ue
,
dB_fixed
(
ue
->
measurements
.
rssi
),
0
);
}
// exit_fun("debug exit");
return
ret
;
}
This diff is collapsed.
Click to expand it.
openair1/PHY/LTE_UE_TRANSPORT/prach_ue.c
View file @
28a4f533
This diff is collapsed.
Click to expand it.
openair1/SCHED_UE/phy_procedures_lte_ue.c
View file @
28a4f533
This diff is collapsed.
Click to expand it.
targets/RT/USER/lte-ue.c
View file @
28a4f533
...
...
@@ -1741,7 +1741,7 @@ void *UE_thread(void *arg) {
}
}
//usleep(3000);
//
usleep(3000);
if
(
sub_frame
==
0
)
{
//UE->proc.proc_rxtx[0].frame_rx++;
//UE->proc.proc_rxtx[1].frame_rx++;
...
...
This diff is collapsed.
Click to expand it.
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