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
lizhongxiao
OpenXG-RAN
Commits
5d16593b
Commit
5d16593b
authored
Nov 10, 2020
by
cig
Committed by
Thomas Schlichter
Dec 09, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
NR UE Code cleanup
- removed long time commented-out and unused code - minor logging fixes
parent
18bf5b55
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
71 deletions
+12
-71
openair1/PHY/NR_UE_ESTIMATION/nr_ue_measurements.c
openair1/PHY/NR_UE_ESTIMATION/nr_ue_measurements.c
+11
-53
openair1/SCHED_NR_UE/phy_procedures_nr_ue.c
openair1/SCHED_NR_UE/phy_procedures_nr_ue.c
+1
-18
No files found.
openair1/PHY/NR_UE_ESTIMATION/nr_ue_measurements.c
View file @
5d16593b
...
...
@@ -33,29 +33,6 @@
//#define DEBUG_MEAS_UE
//#define DEBUG_RANK_EST
#if 0
int16_t cond_num_threshold = 0;
void print_shorts(char *s,short *x)
{
printf("%s : %d,%d,%d,%d,%d,%d,%d,%d\n",s,
x[0],x[1],x[2],x[3],x[4],x[5],x[6],x[7]
);
}
void print_ints(char *s,int *x)
{
printf("%s : %d,%d,%d,%d\n",s,
x[0],x[1],x[2],x[3]
);
}
#endif
int16_t
get_nr_PL
(
uint8_t
Mod_id
,
uint8_t
CC_id
,
uint8_t
gNB_index
){
PHY_VARS_NR_UE
*
ue
=
PHY_vars_UE_g
[
Mod_id
][
CC_id
];
...
...
@@ -114,18 +91,9 @@ void nr_ue_measurements(PHY_VARS_NR_UE *ue,
unsigned
char
rank_adaptation
,
uint8_t
subframe
)
{
int
aarx
,
aatx
,
eNB_id
=
0
;
//,gain_offset=0;
//int rx_power[NUMBER_OF_CONNECTED_eNB_MAX];
/*#if defined(__x86_64__) || defined(__i386__)
__m128i *dl_ch0_128, *dl_ch1_128;
#elif defined(__arm__)
int16x8_t *dl_ch0_128, *dl_ch1_128get_PL;
#endif*/
int
aarx
,
aatx
,
eNB_id
=
0
;
NR_DL_FRAME_PARMS
*
frame_parms
=
&
ue
->
frame_parms
;
//unsigned int limit, subband;
//int nb_subbands, subband_size, last_subband_size, *dl_ch0, *dl_ch1, N_RB_DL = frame_parms->N_RB_DL;
int
ch_offset
,
rank_tm3_tm4
=
0
;
...
...
@@ -136,19 +104,16 @@ void nr_ue_measurements(PHY_VARS_NR_UE *ue,
ch_offset
=
ue
->
frame_parms
.
ofdm_symbol_size
*
2
;
//printf("testing measurements\n");
// signal measurements
for
(
eNB_id
=
0
;
eNB_id
<
ue
->
n_connected_eNB
;
eNB_id
++
)
{
for
(
aarx
=
0
;
aarx
<
frame_parms
->
nb_antennas_rx
;
aarx
++
)
{
for
(
aatx
=
0
;
aatx
<
frame_parms
->
nb_antenna_ports_gNB
;
aatx
++
)
{
ue
->
measurements
.
rx_spatial_power
[
eNB_id
][
aatx
][
aarx
]
=
(
signal_energy_nodc
(
&
ue
->
pdsch_vars
[
proc
->
thread_id
][
0
]
->
dl_ch_estimates
[
eNB_id
][
ch_offset
],
(
50
*
12
)));
//- ue->measurements.n0_power[aarx];
if
(
ue
->
measurements
.
rx_spatial_power
[
eNB_id
][
aatx
][
aarx
]
<
0
)
ue
->
measurements
.
rx_spatial_power
[
eNB_id
][
aatx
][
aarx
]
=
0
;
//ue->measurements.n0_power[aarx];
ue
->
measurements
.
rx_spatial_power
[
eNB_id
][
aatx
][
aarx
]
=
0
;
ue
->
measurements
.
rx_spatial_power_dB
[
eNB_id
][
aatx
][
aarx
]
=
(
unsigned
short
)
dB_fixed
(
ue
->
measurements
.
rx_spatial_power
[
eNB_id
][
aatx
][
aarx
]);
...
...
@@ -170,16 +135,12 @@ void nr_ue_measurements(PHY_VARS_NR_UE *ue,
}
//eNB_id
//printf("ue measurement addr dlch %p\n", dl_ch);
eNB_id
=
0
;
if
(
ue
->
transmission_mode
[
eNB_id
]
!=
4
&&
ue
->
transmission_mode
[
eNB_id
]
!=
3
)
ue
->
measurements
.
rank
[
eNB_id
]
=
0
;
else
ue
->
measurements
.
rank
[
eNB_id
]
=
rank_tm3_tm4
;
// printf ("tx mode %d\n", ue->transmission_mode[eNB_id]);
// printf ("rank %d\n", ue->PHY_measurements.rank[eNB_id]);
// filter to remove jitter
if
(
ue
->
init_averaging
==
0
)
{
...
...
@@ -189,7 +150,6 @@ void nr_ue_measurements(PHY_VARS_NR_UE *ue,
(
k2
*
((
long
long
int
)(
ue
->
measurements
.
rx_power_tot
[
eNB_id
]))))
>>
10
);
//LOG_I(PHY,"Noise Power Computation: k1 %d k2 %d n0 avg %d n0 tot %d\n", k1, k2, ue->measurements.n0_power_avg,
// ue->measurements.n0_power_tot);
ue
->
measurements
.
n0_power_avg
=
(
int
)
(((
k1
*
((
long
long
int
)
(
ue
->
measurements
.
n0_power_avg
)))
+
(
k2
*
((
long
long
int
)
(
ue
->
measurements
.
n0_power_tot
))))
>>
10
);
...
...
@@ -206,7 +166,6 @@ void nr_ue_measurements(PHY_VARS_NR_UE *ue,
ue
->
measurements
.
wideband_cqi_tot
[
eNB_id
]
=
dB_fixed2
(
ue
->
measurements
.
rx_power_tot
[
eNB_id
],
ue
->
measurements
.
n0_power_tot
);
ue
->
measurements
.
wideband_cqi_avg
[
eNB_id
]
=
dB_fixed2
(
ue
->
measurements
.
rx_power_avg
[
eNB_id
],
ue
->
measurements
.
n0_power_avg
);
ue
->
measurements
.
rx_rssi_dBm
[
eNB_id
]
=
ue
->
measurements
.
rx_power_avg_dB
[
eNB_id
]
-
ue
->
rx_total_gain_dB
;
//#ifdef DEBUG_MEAS_UE
LOG_D
(
PHY
,
"[eNB %d] Subframe %d, RSSI %d dBm, RSSI (digital) %d dB, WBandCQI %d dB, rxPwrAvg %d, n0PwrAvg %d
\n
"
,
eNB_id
,
subframe
,
...
...
@@ -215,7 +174,6 @@ void nr_ue_measurements(PHY_VARS_NR_UE *ue,
ue
->
measurements
.
wideband_cqi_avg
[
eNB_id
],
ue
->
measurements
.
rx_power_avg
[
eNB_id
],
ue
->
measurements
.
n0_power_tot
);
//#endif
}
#if defined(__x86_64__) || defined(__i386__)
...
...
@@ -286,7 +244,7 @@ void nr_ue_rsrp_measurements(PHY_VARS_NR_UE *ue,
if
(
eNB_offset
==
0
)
LOG_I
(
PHY
,
"[UE %d] slot %d R
RC
Measurements (idx %d, Cell id %d) => rsrp: %3.1f dBm/RE (%d)
\n
"
,
LOG_I
(
PHY
,
"[UE %d] slot %d R
SRP
Measurements (idx %d, Cell id %d) => rsrp: %3.1f dBm/RE (%d)
\n
"
,
ue
->
Mod_id
,
slot
,
eNB_offset
,
(
eNB_offset
>
0
)
?
ue
->
measurements
.
adj_cell_id
[
eNB_offset
-
1
]
:
ue
->
frame_parms
.
Nid_cell
,
...
...
openair1/SCHED_NR_UE/phy_procedures_nr_ue.c
View file @
5d16593b
...
...
@@ -270,21 +270,6 @@ void nr_ue_measurement_procedures(uint16_t l, // symbol index of each slot [0
T_INT
((
int
)
ue
->
common_vars
.
freq_offset
));
#endif
}
#if 0
if (l==(6-ue->frame_parms.Ncp)) {
// make sure we have signal from PSS/SSS for N0 measurement
// LOG_I(PHY," l==(6-ue->frame_parms.Ncp) ue_rrc_measurements\n");
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_RRC_MEASUREMENTS, VCD_FUNCTION_IN);
ue_rrc_measurements(ue,
slot,
abstraction_flag);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_RRC_MEASUREMENTS, VCD_FUNCTION_OUT);
}
#endif
// accumulate and filter timing offset estimation every subframe (instead of every frame)
if
((
slot
==
2
)
&&
(
l
==
(
2
-
frame_parms
->
Ncp
)))
{
...
...
@@ -1718,8 +1703,6 @@ int phy_procedures_nrUE_RX(PHY_VARS_NR_UE *ue,
uint8_t
dci_cnt
=
0
;
NR_DL_FRAME_PARMS
*
fp
=
&
ue
->
frame_parms
;
//NR_UE_MAC_INST_t *mac = get_mac_inst(0);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_UE_RX
,
VCD_FUNCTION_IN
);
LOG_D
(
PHY
,
" ****** start RX-Chain for Frame.Slot %d.%d ******
\n
"
,
frame_rx
%
1024
,
nr_slot_rx
);
...
...
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