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
21f92a1f
Commit
21f92a1f
authored
Nov 17, 2023
by
Thomas Schlichter
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gNB: fix and simplify some signal quality and power calculations
parent
39918985
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
9 additions
and
16 deletions
+9
-16
openair1/PHY/INIT/nr_init.c
openair1/PHY/INIT/nr_init.c
+0
-2
openair1/PHY/NR_ESTIMATION/nr_measurements_gNB.c
openair1/PHY/NR_ESTIMATION/nr_measurements_gNB.c
+6
-7
openair1/PHY/NR_TRANSPORT/pucch_rx.c
openair1/PHY/NR_TRANSPORT/pucch_rx.c
+1
-1
openair1/PHY/defs_gNB.h
openair1/PHY/defs_gNB.h
+0
-5
openair1/SCHED_NR/phy_procedures_nr_gNB.c
openair1/SCHED_NR/phy_procedures_nr_gNB.c
+2
-1
No files found.
openair1/PHY/INIT/nr_init.c
View file @
21f92a1f
...
@@ -1113,8 +1113,6 @@ void init_nr_transport(PHY_VARS_gNB *gNB)
...
@@ -1113,8 +1113,6 @@ void init_nr_transport(PHY_VARS_gNB *gNB)
gNB
->
ulsch
[
i
]
=
new_gNB_ulsch
(
gNB
->
max_ldpc_iterations
,
fp
->
N_RB_UL
);
gNB
->
ulsch
[
i
]
=
new_gNB_ulsch
(
gNB
->
max_ldpc_iterations
,
fp
->
N_RB_UL
);
}
}
gNB
->
rx_total_gain_dB
=
130
;
//fp->pucch_config_common.deltaPUCCH_Shift = 1;
//fp->pucch_config_common.deltaPUCCH_Shift = 1;
}
}
...
...
openair1/PHY/NR_ESTIMATION/nr_measurements_gNB.c
View file @
21f92a1f
...
@@ -201,7 +201,7 @@ void gNB_I0_measurements(PHY_VARS_gNB *gNB,int slot, int first_symb,int num_symb
...
@@ -201,7 +201,7 @@ void gNB_I0_measurements(PHY_VARS_gNB *gNB,int slot, int first_symb,int num_symb
}
}
n0_subband_tot_perPRB
/=
frame_parms
->
nb_antennas_rx
;
n0_subband_tot_perPRB
/=
frame_parms
->
nb_antennas_rx
;
measurements
->
n0_subband_power_tot_dB
[
rb
]
=
dB_fixed
(
n0_subband_tot_perPRB
);
measurements
->
n0_subband_power_tot_dB
[
rb
]
=
dB_fixed
(
n0_subband_tot_perPRB
);
measurements
->
n0_subband_power_tot_dBm
[
rb
]
=
measurements
->
n0_subband_power_tot_dB
[
rb
]
-
gNB
->
rx_total_gain_dB
-
dB_fixed
(
frame_parms
->
N_RB_UL
)
;
measurements
->
n0_subband_power_tot_dBm
[
rb
]
=
measurements
->
n0_subband_power_tot_dB
[
rb
]
-
openair0_cfg
[
0
].
rx_gain
[
0
]
;
LOG_D
(
PHY
,
"n0_subband_power_tot_dB[%d] => %d, over %d symbols
\n
"
,
rb
,
measurements
->
n0_subband_power_tot_dB
[
rb
],
nb_symb
[
rb
]);
LOG_D
(
PHY
,
"n0_subband_power_tot_dB[%d] => %d, over %d symbols
\n
"
,
rb
,
measurements
->
n0_subband_power_tot_dB
[
rb
],
nb_symb
[
rb
]);
n0_subband_tot
+=
n0_subband_tot_perPRB
;
n0_subband_tot
+=
n0_subband_tot_perPRB
;
nb_rb
++
;
nb_rb
++
;
...
@@ -231,7 +231,6 @@ void nr_gnb_measurements(PHY_VARS_gNB *gNB,
...
@@ -231,7 +231,6 @@ void nr_gnb_measurements(PHY_VARS_gNB *gNB,
unsigned
short
rx_power_tot_dB
;
unsigned
short
rx_power_tot_dB
;
double
rx_gain
=
openair0_cfg
[
0
].
rx_gain
[
0
];
double
rx_gain
=
openair0_cfg
[
0
].
rx_gain
[
0
];
double
rx_gain_offset
=
openair0_cfg
[
0
].
rx_gain_offset
[
0
];
PHY_MEASUREMENTS_gNB
*
meas
=
&
gNB
->
measurements
;
PHY_MEASUREMENTS_gNB
*
meas
=
&
gNB
->
measurements
;
NR_DL_FRAME_PARMS
*
fp
=
&
gNB
->
frame_parms
;
NR_DL_FRAME_PARMS
*
fp
=
&
gNB
->
frame_parms
;
int
ch_offset
=
fp
->
ofdm_symbol_size
*
symbol
;
int
ch_offset
=
fp
->
ofdm_symbol_size
*
symbol
;
...
@@ -260,21 +259,21 @@ void nr_gnb_measurements(PHY_VARS_gNB *gNB,
...
@@ -260,21 +259,21 @@ void nr_gnb_measurements(PHY_VARS_gNB *gNB,
rx_power_tot
+=
rx_power
[
aarx
];
rx_power_tot
+=
rx_power
[
aarx
];
}
}
rx_power_tot
/=
fp
->
nb_antennas_rx
;
rx_power_tot_dB
=
(
unsigned
short
)
dB_fixed
(
rx_power_tot
);
rx_power_tot_dB
=
(
unsigned
short
)
dB_fixed
(
rx_power_tot
);
rx_power_avg_dB
=
rx_power_tot_dB
;
rx_power_avg_dB
=
rx_power_tot_dB
;
ulsch_measurements
->
wideband_cqi_tot
=
dB_fixed2
(
rx_power_tot
,
meas
->
n0_power_tot
);
ulsch_measurements
->
wideband_cqi_tot
=
rx_power_avg_dB
-
meas
->
n0_subband_power_avg_dB
;
ulsch_measurements
->
rx_rssi_dBm
=
ulsch_measurements
->
rx_rssi_dBm
=
rx_power_avg_dB
-
rx_gain
;
rx_power_avg_dB
+
30
-
10
*
log10
(
pow
(
2
,
30
))
-
(
rx_gain
-
rx_gain_offset
)
-
dB_fixed
(
fp
->
ofdm_symbol_size
);
LOG_D
(
PHY
,
LOG_D
(
PHY
,
"[RNTI %04x] RSSI %d dBm/RE, RSSI (digital) %d dB (N_RB_UL %d), WBand CQI tot %d dB, N0 Power tot %d, RX Power tot %d
\n
"
,
"[RNTI %04x] RSSI %d dBm/RE, RSSI (digital) %d dB
/RE
(N_RB_UL %d), WBand CQI tot %d dB, N0 Power tot %d, RX Power tot %d
\n
"
,
ulsch
->
rnti
,
ulsch
->
rnti
,
ulsch_measurements
->
rx_rssi_dBm
,
ulsch_measurements
->
rx_rssi_dBm
,
rx_power_avg_dB
,
rx_power_avg_dB
,
N_RB_UL
,
N_RB_UL
,
ulsch_measurements
->
wideband_cqi_tot
,
ulsch_measurements
->
wideband_cqi_tot
,
meas
->
n0_
power_tot
,
meas
->
n0_
subband_power_avg_dB
,
rx_power_tot
);
rx_power_tot
);
}
}
openair1/PHY/NR_TRANSPORT/pucch_rx.c
View file @
21f92a1f
...
@@ -1703,7 +1703,7 @@ void nr_decode_pucch2(PHY_VARS_gNB *gNB,
...
@@ -1703,7 +1703,7 @@ void nr_decode_pucch2(PHY_VARS_gNB *gNB,
// TODO this computation is wrong -> to be ignored at MAC for now
// TODO this computation is wrong -> to be ignored at MAC for now
int
SNRtimes10
=
dB_fixed_times10
(
signal_energy_nodc
((
int32_t
*
)
&
rxdataF
[
0
][
soffset
+
(
l2
*
frame_parms
->
ofdm_symbol_size
)
+
re_offset
[
0
]],
int
SNRtimes10
=
dB_fixed_times10
(
signal_energy_nodc
((
int32_t
*
)
&
rxdataF
[
0
][
soffset
+
(
l2
*
frame_parms
->
ofdm_symbol_size
)
+
re_offset
[
0
]],
12
*
pucch_pdu
->
prb_size
))
-
12
*
pucch_pdu
->
prb_size
))
-
(
10
*
gNB
->
measurements
.
n0_
power_tot
_dB
);
(
10
*
gNB
->
measurements
.
n0_
subband_power_avg
_dB
);
int
cqi
,
bit_left
;
int
cqi
,
bit_left
;
if
(
SNRtimes10
<
-
640
)
cqi
=
0
;
if
(
SNRtimes10
<
-
640
)
cqi
=
0
;
else
if
(
SNRtimes10
>
635
)
cqi
=
255
;
else
if
(
SNRtimes10
>
635
)
cqi
=
255
;
...
...
openair1/PHY/defs_gNB.h
View file @
21f92a1f
...
@@ -554,10 +554,6 @@ typedef struct {
...
@@ -554,10 +554,6 @@ typedef struct {
unsigned
int
n0_power
[
MAX_NUM_RU_PER_gNB
];
unsigned
int
n0_power
[
MAX_NUM_RU_PER_gNB
];
//! estimated noise power (dB)
//! estimated noise power (dB)
unsigned
int
n0_power_dB
[
MAX_NUM_RU_PER_gNB
];
unsigned
int
n0_power_dB
[
MAX_NUM_RU_PER_gNB
];
//! total estimated noise power (linear)
unsigned
int
n0_power_tot
;
//! estimated avg noise power (dB)
unsigned
int
n0_power_tot_dB
;
//! estimated avg noise power per RB per RX ant (lin)
//! estimated avg noise power per RB per RX ant (lin)
fourDimArray_t
*
n0_subband_power
;
fourDimArray_t
*
n0_subband_power
;
//! estimated avg noise power per RB per RX ant (dB)
//! estimated avg noise power per RB per RX ant (dB)
...
@@ -597,7 +593,6 @@ typedef struct PHY_VARS_gNB_s {
...
@@ -597,7 +593,6 @@ typedef struct PHY_VARS_gNB_s {
eth_params_t
eth_params_n
;
eth_params_t
eth_params_n
;
/// Ethernet parameters for fronthaul interface
/// Ethernet parameters for fronthaul interface
eth_params_t
eth_params
;
eth_params_t
eth_params
;
int
rx_total_gain_dB
;
int
(
*
nr_start_if
)(
struct
RU_t_s
*
ru
,
struct
PHY_VARS_gNB_s
*
gNB
);
int
(
*
nr_start_if
)(
struct
RU_t_s
*
ru
,
struct
PHY_VARS_gNB_s
*
gNB
);
uint8_t
local_flag
;
uint8_t
local_flag
;
nfapi_nr_config_request_scf_t
gNB_config
;
nfapi_nr_config_request_scf_t
gNB_config
;
...
...
openair1/SCHED_NR/phy_procedures_nr_gNB.c
View file @
21f92a1f
...
@@ -907,7 +907,8 @@ int phy_procedures_gNB_uespec_RX(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx)
...
@@ -907,7 +907,8 @@ int phy_procedures_gNB_uespec_RX(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx)
dB_fixed_x10
(
pusch_vars
->
ulsch_power_tot
),
dB_fixed_x10
(
pusch_vars
->
ulsch_power_tot
),
dB_fixed_x10
(
pusch_vars
->
ulsch_noise_power_tot
),
dB_fixed_x10
(
pusch_vars
->
ulsch_noise_power_tot
),
gNB
->
pusch_thres
);
gNB
->
pusch_thres
);
pusch_vars
->
ulsch_power_tot
=
pusch_vars
->
ulsch_noise_power_tot
;
if
(
pusch_vars
->
ulsch_power_tot
<
pusch_vars
->
ulsch_noise_power_tot
)
pusch_vars
->
ulsch_power_tot
=
pusch_vars
->
ulsch_noise_power_tot
;
pusch_vars
->
DTX
=
1
;
pusch_vars
->
DTX
=
1
;
if
(
stats
)
if
(
stats
)
stats
->
ulsch_stats
.
DTX
++
;
stats
->
ulsch_stats
.
DTX
++
;
...
...
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