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
5344e5ee
Commit
5344e5ee
authored
Jan 28, 2024
by
Raymond Knopp
Committed by
francescomani
Feb 22, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
power control changes for deltaMCS mode.
parent
c599e172
Changes
8
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
134 additions
and
35 deletions
+134
-35
openair2/GNB_APP/gnb_config.c
openair2/GNB_APP/gnb_config.c
+5
-2
openair2/GNB_APP/gnb_paramdef.h
openair2/GNB_APP/gnb_paramdef.h
+10
-0
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
+3
-2
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c
+1
-1
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
+94
-26
openair2/LAYER2/NR_MAC_gNB/mac_proto.h
openair2/LAYER2/NR_MAC_gNB/mac_proto.h
+1
-1
openair2/LAYER2/NR_MAC_gNB/main.c
openair2/LAYER2/NR_MAC_gNB/main.c
+11
-3
openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h
openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h
+9
-0
No files found.
openair2/GNB_APP/gnb_config.c
View file @
5344e5ee
...
@@ -1240,11 +1240,14 @@ void RCconfig_nr_macrlc(configmodule_interface_t *cfg)
...
@@ -1240,11 +1240,14 @@ void RCconfig_nr_macrlc(configmodule_interface_t *cfg)
config
.
do_CSIRS
=
*
GNBParamList
.
paramarray
[
0
][
GNB_DO_CSIRS_IDX
].
iptr
;
config
.
do_CSIRS
=
*
GNBParamList
.
paramarray
[
0
][
GNB_DO_CSIRS_IDX
].
iptr
;
config
.
do_SRS
=
*
GNBParamList
.
paramarray
[
0
][
GNB_DO_SRS_IDX
].
iptr
;
config
.
do_SRS
=
*
GNBParamList
.
paramarray
[
0
][
GNB_DO_SRS_IDX
].
iptr
;
config
.
force_256qam_off
=
*
GNBParamList
.
paramarray
[
0
][
GNB_FORCE256QAMOFF_IDX
].
iptr
;
config
.
force_256qam_off
=
*
GNBParamList
.
paramarray
[
0
][
GNB_FORCE256QAMOFF_IDX
].
iptr
;
config
.
force_UL256qam_off
=
*
GNBParamList
.
paramarray
[
0
][
GNB_FORCEUL256QAMOFF_IDX
].
iptr
;
config
.
use_deltaMCS
=
*
GNBParamList
.
paramarray
[
0
][
GNB_USE_DELTA_MCS_IDX
].
iptr
;
LOG_I
(
GNB_APP
,
LOG_I
(
GNB_APP
,
"CSI-RS %d, SRS %d, 256 QAM %s
\n
"
,
"CSI-RS %d, SRS %d, 256 QAM %s
, delta_MCS %s
\n
"
,
config
.
do_CSIRS
,
config
.
do_CSIRS
,
config
.
do_SRS
,
config
.
do_SRS
,
config
.
force_256qam_off
?
"force off"
:
"may be on"
);
config
.
force_256qam_off
?
"force off"
:
"may be on"
,
config
.
use_deltaMCS
?
"on"
:
"off"
);
NR_ServingCellConfigCommon_t
*
scc
=
get_scc_config
(
cfg
,
config
.
minRXTXTIME
);
NR_ServingCellConfigCommon_t
*
scc
=
get_scc_config
(
cfg
,
config
.
minRXTXTIME
);
//xer_fprint(stdout, &asn_DEF_NR_ServingCellConfigCommon, scc);
//xer_fprint(stdout, &asn_DEF_NR_ServingCellConfigCommon, scc);
...
...
openair2/GNB_APP/gnb_paramdef.h
View file @
5344e5ee
...
@@ -128,6 +128,10 @@ typedef enum {
...
@@ -128,6 +128,10 @@ typedef enum {
#define GNB_CONFIG_STRING_FORCE256QAMOFF "force_256qam_off"
#define GNB_CONFIG_STRING_FORCE256QAMOFF "force_256qam_off"
#define GNB_CONFIG_STRING_ENABLE_SDAP "enable_sdap"
#define GNB_CONFIG_STRING_ENABLE_SDAP "enable_sdap"
#define GNB_CONFIG_STRING_DRBS "drbs"
#define GNB_CONFIG_STRING_DRBS "drbs"
#define GNB_CONFIG_STRING_USE_DELTA_MCS "use_deltaMCS"
#define GNB_CONFIG_HLP_USE_DELTA_MCS "Use deltaMCS-based power headroom reporting in PUSCH-Config"
#define GNB_CONFIG_HLP_FORCEUL256QAMOFF "suppress activation of UL 256 QAM despite UE support"
#define GNB_CONFIG_STRING_FORCEUL256QAMOFF "force_UL256qam_off"
#define GNB_CONFIG_STRING_GNB_DU_ID "gNB_DU_ID"
#define GNB_CONFIG_STRING_GNB_DU_ID "gNB_DU_ID"
#define GNB_CONFIG_STRING_GNB_CU_UP_ID "gNB_CU_UP_ID"
#define GNB_CONFIG_STRING_GNB_CU_UP_ID "gNB_CU_UP_ID"
...
@@ -173,6 +177,8 @@ typedef enum {
...
@@ -173,6 +177,8 @@ typedef enum {
{GNB_CONFIG_STRING_DRBS, GNB_CONFIG_HLP_STRING_DRBS, 0, .iptr=NULL, .defintval=1, TYPE_INT, 0}, \
{GNB_CONFIG_STRING_DRBS, GNB_CONFIG_HLP_STRING_DRBS, 0, .iptr=NULL, .defintval=1, TYPE_INT, 0}, \
{GNB_CONFIG_STRING_GNB_DU_ID, GNB_CONFIG_HLP_GNB_DU_ID, 0, .u64ptr=NULL, .defint64val=1, TYPE_UINT64, 0}, \
{GNB_CONFIG_STRING_GNB_DU_ID, GNB_CONFIG_HLP_GNB_DU_ID, 0, .u64ptr=NULL, .defint64val=1, TYPE_UINT64, 0}, \
{GNB_CONFIG_STRING_GNB_CU_UP_ID, GNB_CONFIG_HLP_GNB_CU_UP_ID, 0, .u64ptr=NULL, .defint64val=1, TYPE_UINT64, 0}, \
{GNB_CONFIG_STRING_GNB_CU_UP_ID, GNB_CONFIG_HLP_GNB_CU_UP_ID, 0, .u64ptr=NULL, .defint64val=1, TYPE_UINT64, 0}, \
{GNB_CONFIG_STRING_USE_DELTA_MCS, GNB_CONFIG_HLP_USE_DELTA_MCS, 0, .iptr=NULL, .defintval=1, TYPE_INT, 0}, \
{GNB_CONFIG_STRING_FORCEUL256QAMOFF, GNB_CONFIG_HLP_FORCEUL256QAMOFF, 0, .iptr=NULL, .defintval=0, TYPE_INT, 0}, \
}
}
// clang-format on
// clang-format on
...
@@ -207,6 +213,8 @@ typedef enum {
...
@@ -207,6 +213,8 @@ typedef enum {
#define GNB_DRBS 27
#define GNB_DRBS 27
#define GNB_GNB_DU_ID_IDX 28
#define GNB_GNB_DU_ID_IDX 28
#define GNB_GNB_CU_UP_ID_IDX 29
#define GNB_GNB_CU_UP_ID_IDX 29
#define GNB_USE_DELTA_MCS_IDX 30
#define GNB_FORCEUL256QAMOFF_IDX 31
#define TRACKING_AREA_CODE_OKRANGE {0x0001,0xFFFD}
#define TRACKING_AREA_CODE_OKRANGE {0x0001,0xFFFD}
#define GNBPARAMS_CHECK { \
#define GNBPARAMS_CHECK { \
...
@@ -224,6 +232,8 @@ typedef enum {
...
@@ -224,6 +232,8 @@ typedef enum {
{ .s5 = { NULL } }, \
{ .s5 = { NULL } }, \
{ .s5 = { NULL } }, \
{ .s5 = { NULL } }, \
{ .s5 = { NULL } }, \
{ .s5 = { NULL } }, \
{ .s5 = { NULL } }, \
{ .s5 = { NULL } }, \
}
}
/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
View file @
5344e5ee
...
@@ -2580,9 +2580,10 @@ void mac_remove_nr_ue(gNB_MAC_INST *nr_mac, rnti_t rnti)
...
@@ -2580,9 +2580,10 @@ void mac_remove_nr_ue(gNB_MAC_INST *nr_mac, rnti_t rnti)
delete_nr_ue_data
(
UE
,
nr_mac
->
common_channels
,
&
UE_info
->
uid_allocator
);
delete_nr_ue_data
(
UE
,
nr_mac
->
common_channels
,
&
UE_info
->
uid_allocator
);
}
}
uint8_t
nr_get_tpc
(
int
target
,
uint8_t
cqi
,
int
incr
)
{
uint8_t
nr_get_tpc
(
int
target
,
uint8_t
cqi
,
int
incr
,
int
tx_power
)
{
// al values passed to this function are x10
// al values passed to this function are x10
int
snrx10
=
(
cqi
*
5
)
-
640
;
int
snrx10
=
(
cqi
*
5
)
-
640
-
(
tx_power
*
10
);
LOG_D
(
NR_MAC
,
"tpc : target %d, cqi %d, snrx10 %d, tx_power %d
\n
"
,
target
,
((
int
)
cqi
*
5
)
-
640
,
snrx10
,
tx_power
);
if
(
snrx10
>
target
+
incr
)
return
0
;
// decrease 1dB
if
(
snrx10
>
target
+
incr
)
return
0
;
// decrease 1dB
if
(
snrx10
<
target
-
(
3
*
incr
))
return
3
;
// increase 3dB
if
(
snrx10
<
target
-
(
3
*
incr
))
return
3
;
// increase 3dB
if
(
snrx10
<
target
-
incr
)
return
2
;
// increase 1dB
if
(
snrx10
<
target
-
incr
)
return
2
;
// increase 1dB
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c
View file @
5344e5ee
...
@@ -1043,7 +1043,7 @@ void handle_nr_uci_pucch_0_1(module_id_t mod_id,
...
@@ -1043,7 +1043,7 @@ void handle_nr_uci_pucch_0_1(module_id_t mod_id,
// tpc (power control) only if we received AckNack
// tpc (power control) only if we received AckNack
if
(
uci_01
->
harq
.
harq_confidence_level
==
0
)
if
(
uci_01
->
harq
.
harq_confidence_level
==
0
)
sched_ctrl
->
tpc1
=
nr_get_tpc
(
nrmac
->
pucch_target_snrx10
,
uci_01
->
ul_cqi
,
30
);
sched_ctrl
->
tpc1
=
nr_get_tpc
(
nrmac
->
pucch_target_snrx10
,
uci_01
->
ul_cqi
,
30
,
0
);
else
else
sched_ctrl
->
tpc1
=
3
;
sched_ctrl
->
tpc1
=
3
;
sched_ctrl
->
pucch_snrx10
=
uci_01
->
ul_cqi
*
5
-
640
;
sched_ctrl
->
pucch_snrx10
=
uci_01
->
ul_cqi
*
5
-
640
;
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
View file @
5344e5ee
This diff is collapsed.
Click to expand it.
openair2/LAYER2/NR_MAC_gNB/mac_proto.h
View file @
5344e5ee
...
@@ -272,7 +272,7 @@ NR_pusch_dmrs_t get_ul_dmrs_params(const NR_ServingCellConfigCommon_t *scc,
...
@@ -272,7 +272,7 @@ NR_pusch_dmrs_t get_ul_dmrs_params(const NR_ServingCellConfigCommon_t *scc,
const
NR_tda_info_t
*
tda_info
,
const
NR_tda_info_t
*
tda_info
,
const
int
Layers
);
const
int
Layers
);
uint8_t
nr_get_tpc
(
int
target
,
uint8_t
cqi
,
int
incr
);
uint8_t
nr_get_tpc
(
int
target
,
uint8_t
cqi
,
int
incr
,
int
tx_power
);
int
get_spf
(
nfapi_nr_config_request_scf_t
*
cfg
);
int
get_spf
(
nfapi_nr_config_request_scf_t
*
cfg
);
...
...
openair2/LAYER2/NR_MAC_gNB/main.c
View file @
5344e5ee
...
@@ -156,15 +156,23 @@ size_t dump_mac_stats(gNB_MAC_INST *gNB, char *output, size_t strlen, bool reset
...
@@ -156,15 +156,23 @@ size_t dump_mac_stats(gNB_MAC_INST *gNB, char *output, size_t strlen, bool reset
for
(
int
i
=
1
;
i
<
gNB
->
ul_bler
.
harq_round_max
;
i
++
)
for
(
int
i
=
1
;
i
<
gNB
->
ul_bler
.
harq_round_max
;
i
++
)
output
+=
snprintf
(
output
,
end
-
output
,
"/%"
PRIu64
,
stats
->
ul
.
rounds
[
i
]);
output
+=
snprintf
(
output
,
end
-
output
,
"/%"
PRIu64
,
stats
->
ul
.
rounds
[
i
]);
char
deltaMCS_str
[
100
]
=
"
\0
"
;
if
(
UE
->
current_UL_BWP
.
pusch_Config
&&
UE
->
current_UL_BWP
.
pusch_Config
->
pusch_PowerControl
->
deltaMCS
)
{
sprintf
(
deltaMCS_str
,
"deltaMCS %d
\n
"
,
UE
->
mac_stats
.
deltaMCS
);
}
output
+=
snprintf
(
output
,
output
+=
snprintf
(
output
,
end
-
output
,
end
-
output
,
", ulsch_errors %"
PRIu64
", ulsch_DTX %d, BLER %.5f MCS (%d) %d
\n
"
,
", ulsch_errors %"
PRIu64
", ulsch_DTX %d, BLER %.5f MCS (%d) %d
(Qm %d %s dB) NPRB %d SNR %d.%d dB
\n
"
,
stats
->
ul
.
errors
,
stats
->
ul
.
errors
,
stats
->
ulsch_DTX
,
stats
->
ulsch_DTX
,
sched_ctrl
->
ul_bler_stats
.
bler
,
sched_ctrl
->
ul_bler_stats
.
bler
,
UE
->
current_UL_BWP
.
mcs_table
,
UE
->
current_UL_BWP
.
mcs_table
,
sched_ctrl
->
ul_bler_stats
.
mcs
);
sched_ctrl
->
ul_bler_stats
.
mcs
,
nr_get_Qm_ul
(
sched_ctrl
->
ul_bler_stats
.
mcs
,
UE
->
current_UL_BWP
.
mcs_table
),
deltaMCS_str
,
UE
->
mac_stats
.
NPRB
,
sched_ctrl
->
pusch_snrx10
/
10
,
sched_ctrl
->
pusch_snrx10
%
10
);
output
+=
snprintf
(
output
,
output
+=
snprintf
(
output
,
end
-
output
,
end
-
output
,
"UE %04x: MAC: TX %14"
PRIu64
" RX %14"
PRIu64
" bytes
\n
"
,
"UE %04x: MAC: TX %14"
PRIu64
" RX %14"
PRIu64
" bytes
\n
"
,
...
...
openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h
View file @
5344e5ee
...
@@ -135,6 +135,8 @@ typedef struct nr_mac_config_t {
...
@@ -135,6 +135,8 @@ typedef struct nr_mac_config_t {
int
do_CSIRS
;
int
do_CSIRS
;
int
do_SRS
;
int
do_SRS
;
bool
force_256qam_off
;
bool
force_256qam_off
;
bool
force_UL256qam_off
;
bool
use_deltaMCS
;
//int pusch_TargetSNRx10;
//int pusch_TargetSNRx10;
//int pucch_TargetSNRx10;
//int pucch_TargetSNRx10;
}
nr_mac_config_t
;
}
nr_mac_config_t
;
...
@@ -407,6 +409,7 @@ typedef struct NR_sched_pusch {
...
@@ -407,6 +409,7 @@ typedef struct NR_sched_pusch {
int
time_domain_allocation
;
int
time_domain_allocation
;
NR_tda_info_t
tda_info
;
NR_tda_info_t
tda_info
;
NR_pusch_dmrs_t
dmrs_info
;
NR_pusch_dmrs_t
dmrs_info
;
int
phr_txpower_calc
;
}
NR_sched_pusch_t
;
}
NR_sched_pusch_t
;
typedef
struct
NR_sched_srs
{
typedef
struct
NR_sched_srs
{
...
@@ -575,6 +578,9 @@ typedef struct {
...
@@ -575,6 +578,9 @@ typedef struct {
/// PHR info: power headroom level (dB)
/// PHR info: power headroom level (dB)
int
ph
;
int
ph
;
/// PHR info: power headroom level (dB) for 1 PRB
int
ph0
;
/// PHR info: nominal UE transmit power levels (dBm)
/// PHR info: nominal UE transmit power levels (dBm)
int
pcmax
;
int
pcmax
;
...
@@ -673,6 +679,9 @@ typedef struct NR_mac_stats {
...
@@ -673,6 +679,9 @@ typedef struct NR_mac_stats {
int
cumul_rsrp
;
int
cumul_rsrp
;
uint8_t
num_rsrp_meas
;
uint8_t
num_rsrp_meas
;
char
srs_stats
[
50
];
// Statistics may differ depending on SRS usage
char
srs_stats
[
50
];
// Statistics may differ depending on SRS usage
int
pusch_snrx10
;
int
deltaMCS
;
int
NPRB
;
}
NR_mac_stats_t
;
}
NR_mac_stats_t
;
typedef
struct
NR_bler_options
{
typedef
struct
NR_bler_options
{
...
...
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