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
spbro
OpenXG-RAN
Commits
52f5e071
Commit
52f5e071
authored
Jun 07, 2024
by
Bartosz Podrygajlo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
PUSCH power control without PUSCH power control state
parent
297ef9d1
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
132 additions
and
0 deletions
+132
-0
nfapi/open-nFAPI/nfapi/public_inc/fapi_nr_ue_interface.h
nfapi/open-nFAPI/nfapi/public_inc/fapi_nr_ue_interface.h
+1
-0
openair2/LAYER2/NR_MAC_COMMON/nr_mac.h
openair2/LAYER2/NR_MAC_COMMON/nr_mac.h
+1
-0
openair2/LAYER2/NR_MAC_UE/config_ue.c
openair2/LAYER2/NR_MAC_UE/config_ue.c
+9
-0
openair2/LAYER2/NR_MAC_UE/mac_proto.h
openair2/LAYER2/NR_MAC_UE/mac_proto.h
+13
-0
openair2/LAYER2/NR_MAC_UE/nr_ue_power_procedures.c
openair2/LAYER2/NR_MAC_UE/nr_ue_power_procedures.c
+93
-0
openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c
openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c
+15
-0
No files found.
nfapi/open-nFAPI/nfapi/public_inc/fapi_nr_ue_interface.h
View file @
52f5e071
...
...
@@ -359,6 +359,7 @@ typedef struct
nfapi_nr_ue_ul_beamforming_t
beamforming
;
//OAI specific
int8_t
absolute_delta_PUSCH
;
int16_t
tx_power
;
fapi_nr_tx_request_body_t
tx_request_body
;
}
nfapi_nr_ue_pusch_pdu_t
;
...
...
openair2/LAYER2/NR_MAC_COMMON/nr_mac.h
View file @
52f5e071
...
...
@@ -571,6 +571,7 @@ typedef struct NR_UE_UL_BWP {
uint8_t
mcs_table
;
nr_dci_format_t
dci_format
;
int
max_fb_time
;
long
*
p0_NominalWithGrant
;
}
NR_UE_UL_BWP_t
;
// non-BWP serving cell configuration
...
...
openair2/LAYER2/NR_MAC_UE/config_ue.c
View file @
52f5e071
...
...
@@ -1408,12 +1408,19 @@ static void configure_common_BWP_ul(NR_UE_MAC_INST_t *mac, int bwp_id, NR_BWP_Up
ul_common
->
pusch_ConfigCommon
->
choice
.
setup
->
pusch_TimeDomainAllocationList
,
NR_PUSCH_TimeDomainResourceAllocationList_t
);
UPDATE_IE
(
bwp
->
msg3_DeltaPreamble
,
ul_common
->
pusch_ConfigCommon
->
choice
.
setup
->
msg3_DeltaPreamble
,
long
);
if
(
ul_common
->
pusch_ConfigCommon
->
choice
.
setup
->
p0_NominalWithGrant
)
{
UPDATE_IE
(
bwp
->
p0_NominalWithGrant
,
ul_common
->
pusch_ConfigCommon
->
choice
.
setup
->
p0_NominalWithGrant
,
long
);
}
}
if
(
ul_common
->
pusch_ConfigCommon
->
present
==
NR_SetupRelease_PUSCH_ConfigCommon_PR_release
)
{
asn1cFreeStruc
(
asn_DEF_NR_PUSCH_TimeDomainResourceAllocationList
,
bwp
->
tdaList_Common
);
free
(
bwp
->
msg3_DeltaPreamble
);
bwp
->
msg3_DeltaPreamble
=
NULL
;
free
(
bwp
->
p0_NominalWithGrant
);
bwp
->
p0_NominalWithGrant
=
NULL
;
}
}
else
{
bwp
->
p0_NominalWithGrant
=
NULL
;
}
}
}
...
...
@@ -2133,6 +2140,8 @@ void release_ul_BWP(NR_UE_MAC_INST_t *mac, int index)
asn1cFreeStruc
(
asn_DEF_NR_SRS_Config
,
bwp
->
srs_Config
);
free
(
bwp
->
msg3_DeltaPreamble
);
bwp
->
msg3_DeltaPreamble
=
NULL
;
free
(
bwp
->
p0_NominalWithGrant
);
bwp
->
p0_NominalWithGrant
=
NULL
;
free
(
bwp
);
}
...
...
openair2/LAYER2/NR_MAC_UE/mac_proto.h
View file @
52f5e071
...
...
@@ -219,6 +219,19 @@ int16_t get_pucch_tx_power_ue(NR_UE_MAC_INST_t *mac,
int
subframe_number
,
int
O_uci
,
uint16_t
start_prb
);
int
get_pusch_tx_power_ue
(
NR_UE_MAC_INST_t
*
mac
,
int
num_rb
,
int
start_prb
,
uint16_t
nb_symb_sch
,
uint16_t
nb_dmrs_prb
,
uint16_t
nb_ptrs_prb
,
uint16_t
qm
,
uint16_t
R
,
uint16_t
beta_offset_csi1
,
uint32_t
sum_bits_in_codeblocks
,
int
delta_pusch
,
bool
is_rar_tx_retx
);
int
nr_ue_configure_pucch
(
NR_UE_MAC_INST_t
*
mac
,
int
slot
,
...
...
openair2/LAYER2/NR_MAC_UE/nr_ue_power_procedures.c
View file @
52f5e071
...
...
@@ -358,3 +358,96 @@ static int get_deltatf(uint16_t nb_of_prbs,
}
return
DELTA_TF
;
}
// PUSCH transmission power according to 38.213 7.1
int
get_pusch_tx_power_ue
(
NR_UE_MAC_INST_t
*
mac
,
int
num_rb
,
int
start_prb
,
uint16_t
nb_symb_sch
,
uint16_t
nb_dmrs_prb
,
uint16_t
nb_ptrs_prb
,
uint16_t
qm
,
uint16_t
R
,
uint16_t
beta_offset_csi1
,
uint32_t
sum_bits_in_codeblocks
,
int
delta_pusch
,
bool
is_rar_tx_retx
)
{
NR_UE_UL_BWP_t
*
current_UL_BWP
=
mac
->
current_UL_BWP
;
struct
NR_PUSCH_PowerControl
*
pusch_PowerControl
=
current_UL_BWP
->
pusch_Config
->
pusch_PowerControl
;
AssertFatal
(
current_UL_BWP
&&
pusch_PowerControl
,
"Missing configuration: need UL_BWP to calculate PUSCH tx power
\n
"
);
int
P_O_NOMINAL_PUSCH
;
if
(
!
is_rar_tx_retx
&&
current_UL_BWP
->
p0_NominalWithGrant
)
{
P_O_NOMINAL_PUSCH
=
*
current_UL_BWP
->
p0_NominalWithGrant
;
}
else
{
int
DELTA_PREAMBLE_MSG3
=
0
;
if
(
current_UL_BWP
->
msg3_DeltaPreamble
)
{
DELTA_PREAMBLE_MSG3
=
*
current_UL_BWP
->
msg3_DeltaPreamble
;
}
NR_RACH_ConfigCommon_t
*
nr_rach_ConfigCommon
=
current_UL_BWP
->
rach_ConfigCommon
;
long
preambleReceivedTargetPower
=
nr_rach_ConfigCommon
->
rach_ConfigGeneric
.
preambleReceivedTargetPower
;
int
P_O_PRE
=
preambleReceivedTargetPower
;
P_O_NOMINAL_PUSCH
=
P_O_PRE
+
DELTA_PREAMBLE_MSG3
;
}
int
P_O_UE_PUSCH
=
0
;
if
(
!
is_rar_tx_retx
)
{
// Assume SRI not present in DCI, p0-PUSCH-Set not configured
if
(
pusch_PowerControl
->
p0_AlphaSets
)
{
if
(
pusch_PowerControl
->
p0_AlphaSets
->
list
.
array
[
0
]
->
p0
)
{
P_O_UE_PUSCH
=
*
pusch_PowerControl
->
p0_AlphaSets
->
list
.
array
[
0
]
->
p0
;
}
}
}
int
mu
=
current_UL_BWP
->
scs
;
int
M_pusch_component
=
10
*
log10
((
pow
(
2
,
mu
))
*
num_rb
);
int
P_CMAX
=
nr_get_Pcmax
(
mac
,
2
,
false
,
mac
->
current_UL_BWP
->
scs
,
mac
->
current_UL_BWP
->
BWPSize
,
true
,
1
,
start_prb
);
int
P_O_PUSCH
=
P_O_NOMINAL_PUSCH
+
P_O_UE_PUSCH
;
float
alpha
=
1
.
0
f
;
const
float
alpha_factor_table
[
8
]
=
{
0
.
0
f
,
0
.
4
f
,
0
.
5
f
,
0
.
6
f
,
0
.
7
f
,
0
.
8
f
,
0
.
9
f
,
1
.
0
f
};
if
(
is_rar_tx_retx
)
{
if
(
pusch_PowerControl
->
msg3_Alpha
)
{
alpha
=
alpha_factor_table
[
*
pusch_PowerControl
->
msg3_Alpha
];
}
}
else
{
if
(
pusch_PowerControl
->
p0_AlphaSets
)
{
alpha
=
alpha_factor_table
[
*
pusch_PowerControl
->
p0_AlphaSets
->
list
.
array
[
0
]
->
alpha
];
}
}
float
DELTA_TF
=
0
;
if
(
current_UL_BWP
->
pusch_Config
->
pusch_PowerControl
->
deltaMCS
)
{
int
beta_offset
=
1
;
float
BPRE
;
if
(
sum_bits_in_codeblocks
==
0
)
{
beta_offset
=
beta_offset_csi1
;
BPRE
=
(
qm
*
R
/
beta_offset
)
>>
10
;
}
else
{
const
int
nb_subcarrier_per_rb
=
12
;
const
uint32_t
N_RE
=
nb_subcarrier_per_rb
*
nb_symb_sch
-
nb_dmrs_prb
-
nb_ptrs_prb
;
BPRE
=
sum_bits_in_codeblocks
/
(
float
)(
N_RE
*
num_rb
);
}
DELTA_TF
=
10
*
log10
(
pow
(
2
,
BPRE
*
1
.
25
f
)
*
beta_offset
);
}
// TODO: compute pathoss using correct reference
int16_t
pathloss
=
compute_nr_SSB_PL
(
mac
,
mac
->
ssb_measurements
.
ssb_rsrp_dBm
);
int
f_b_f_c
=
0
;
if
(
current_UL_BWP
->
pusch_Config
->
pusch_PowerControl
->
tpc_Accumulation
)
{
f_b_f_c
=
delta_pusch
;
}
else
{
// TODO: PUSCH power control state
}
return
min
(
P_CMAX
,
P_O_PUSCH
+
M_pusch_component
+
alpha
*
pathloss
+
DELTA_TF
+
f_b_f_c
);
}
openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c
View file @
52f5e071
...
...
@@ -908,6 +908,21 @@ int nr_config_pusch_pdu(NR_UE_MAC_INST_t *mac,
pusch_config_pdu
->
pusch_data
.
tb_size
=
mac
->
ul_harq_info
[
pid
].
TBS
;
}
bool
is_rar_tx_retx
=
get_rnti_type
(
mac
,
rnti
)
==
TYPE_TC_RNTI_
;
pusch_config_pdu
->
tx_power
=
get_pusch_tx_power_ue
(
mac
,
pusch_config_pdu
->
rb_size
,
pusch_config_pdu
->
rb_start
,
pusch_config_pdu
->
nr_of_symbols
,
nb_dmrs_re_per_rb
*
number_dmrs_symbols
,
0
,
//TODO: count PTRS per RB
pusch_config_pdu
->
qam_mod_order
,
pusch_config_pdu
->
target_code_rate
,
pusch_config_pdu
->
pusch_uci
.
beta_offset_csi1
,
pusch_config_pdu
->
pusch_data
.
tb_size
<<
3
,
pusch_config_pdu
->
absolute_delta_PUSCH
,
is_rar_tx_retx
);
pusch_config_pdu
->
ldpcBaseGraph
=
get_BG
(
pusch_config_pdu
->
pusch_data
.
tb_size
<<
3
,
pusch_config_pdu
->
target_code_rate
);
//The MAC entity shall restart retxBSR-Timer upon reception of a grant for transmission of new data on any UL-SCH
...
...
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