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
a8405595
Commit
a8405595
authored
Mar 10, 2022
by
Robert Schmidt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implement PUSCH RBs according to PHR
parent
72bf1b1d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
0 deletions
+36
-0
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
+36
-0
No files found.
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
View file @
a8405595
...
...
@@ -881,6 +881,38 @@ static bool nr_UE_is_to_be_scheduled(const NR_ServingCellConfigCommon_t *scc,
return
has_data
||
sched_ctrl
->
SR
||
high_inactivity
;
}
int
estimate_nr_ue_tx_power
(
int
mu
,
uint32_t
tbs
,
int
rb
)
{
/* TODO: delta_mcs? */
const
int
bw_factor
=
10
*
log10
(
rb
<<
mu
);
return
bw_factor
;
}
int
nr_ue_max_rbSize_phr
(
int
mu
,
const
NR_UE_sched_ctrl_t
*
sched_ctrl
,
uint16_t
minRb
,
uint16_t
*
maxRb
,
uint8_t
*
mcs
)
{
AssertFatal
(
*
maxRb
>=
minRb
,
"illegal maxRb %d < minRb %d
\n
"
,
*
maxRb
,
minRb
);
AssertFatal
(
*
mcs
>=
0
&&
*
mcs
<=
28
,
"illegal MCS %d
\n
"
,
*
mcs
);
const
int
ph
=
sched_ctrl
->
ph
;
//const int pcmax = sched_ctrl->pcmax;
int
tx_power
=
estimate_nr_ue_tx_power
(
mu
,
/* unused tbs */
0
,
*
maxRb
);
while
(
ph
<
tx_power
&&
*
maxRb
>=
minRb
)
{
(
*
maxRb
)
--
;
tx_power
=
estimate_nr_ue_tx_power
(
mu
,
/* unused tbs */
0
,
*
maxRb
);
}
while
(
ph
<
tx_power
&&
*
mcs
>
6
)
{
(
*
mcs
)
--
;
tx_power
=
estimate_nr_ue_tx_power
(
mu
,
/* unused tbs */
0
,
*
maxRb
);
}
if
(
ph
<
tx_power
)
LOG_W
(
NR_MAC
,
"PH %d < tx_power %d (RBs %d, MCS %d)
\n
"
,
ph
,
tx_power
,
*
maxRb
,
*
mcs
);
return
tx_power
;
}
static
bool
allocate_ul_retransmission
(
gNB_MAC_INST
*
nrmac
,
frame_t
frame
,
sub_frame_t
slot
,
...
...
@@ -1348,6 +1380,10 @@ void pf_ul(module_id_t module_id,
else
LOG_D
(
NR_MAC
,
"allocating UL data for RNTI %04x (rbStsart %d, min_rb %d, bwpSize %d)
\n
"
,
iterator
->
UE
->
rnti
,
rbStart
,
min_rb
,
bwpSize
);
/* reduce max_rbSize according to PHR */
const
int
mu
=
scc
->
uplinkConfigCommon
->
initialUplinkBWP
->
genericParameters
.
subcarrierSpacing
;
const
int
tx_power
=
nr_ue_max_rbSize_phr
(
mu
,
sched_ctrl
,
min_rbSize
,
&
max_rbSize
,
&
sched_pusch
->
mcs
);
/* Calculate the current scheduling bytes and the necessary RBs */
const
int
B
=
cmax
(
sched_ctrl
->
estimated_ul_buffer
-
sched_ctrl
->
sched_ul_bytes
,
0
);
uint16_t
rbSize
=
0
;
...
...
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