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
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
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
OpenXG
OpenXG-RAN
Commits
d5419a27
Commit
d5419a27
authored
Apr 21, 2022
by
Robert Schmidt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Correct check for free symbols for PUSCH/PDSCH allocation
parent
9fcc9431
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
25 deletions
+20
-25
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c
+8
-11
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
+12
-14
No files found.
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c
View file @
d5419a27
...
...
@@ -571,8 +571,8 @@ bool allocate_dl_retransmission(module_id_t module_id,
rbStart
+=
rbSize
;
/* last iteration rbSize was not enough, skip it */
rbSize
=
0
;
while
(
rbStart
<
bwpSize
&&
!
(
rballoc_mask
[
rbStart
]
&
SL_to_bitmap
(
ps
->
startSymbolIndex
,
ps
->
nrOfSymbols
))
)
const
int
slbitmap
=
SL_to_bitmap
(
ps
->
startSymbolIndex
,
ps
->
nrOfSymbols
);
while
(
rbStart
<
bwpSize
&&
(
rballoc_mask
[
rbStart
]
&
slbitmap
)
!=
slbitmap
)
rbStart
++
;
if
(
rbStart
>=
bwpSize
)
{
...
...
@@ -581,7 +581,7 @@ bool allocate_dl_retransmission(module_id_t module_id,
}
while
(
rbStart
+
rbSize
<
bwpSize
&&
(
rballoc_mask
[
rbStart
+
rbSize
]
&
SL_to_bitmap
(
ps
->
startSymbolIndex
,
ps
->
nrOfSymbols
))
&&
(
rballoc_mask
[
rbStart
+
rbSize
]
&
slbitmap
)
==
slbitmap
&&
rbSize
<
retInfo
->
rbSize
)
rbSize
++
;
}
...
...
@@ -614,12 +614,11 @@ bool allocate_dl_retransmission(module_id_t module_id,
ps
->
nrOfLayers
,
sched_ctrl
,
&
temp_ps
);
while
(
rbStart
<
bwpSize
&&
!
(
rballoc_mask
[
rbStart
]
&
SL_to_bitmap
(
temp_ps
.
startSymbolIndex
,
temp_ps
.
nrOfSymbols
))
)
const
uint16_t
slbitmap
=
SL_to_bitmap
(
temp_ps
.
startSymbolIndex
,
temp_ps
.
nrOfSymbols
);
while
(
rbStart
<
bwpSize
&&
(
rballoc_mask
[
rbStart
]
&
slbitmap
)
!=
slbitmap
)
rbStart
++
;
while
(
rbStart
+
rbSize
<
bwpSize
&&
(
rballoc_mask
[
rbStart
+
rbSize
]
&
SL_to_bitmap
(
temp_ps
.
startSymbolIndex
,
temp_ps
.
nrOfSymbols
)))
while
(
rbStart
+
rbSize
<
bwpSize
&&
(
rballoc_mask
[
rbStart
+
rbSize
]
&
slbitmap
)
==
slbitmap
)
rbSize
++
;
uint32_t
new_tbs
;
...
...
@@ -929,14 +928,12 @@ void pf_dl(module_id_t module_id,
const
uint16_t
slbitmap
=
SL_to_bitmap
(
ps
->
startSymbolIndex
,
ps
->
nrOfSymbols
);
// Freq-demain allocation
while
(
rbStart
<
bwpSize
&&
!
(
rballoc_mask
[
rbStart
]
&
slbitmap
))
while
(
rbStart
<
bwpSize
&&
(
rballoc_mask
[
rbStart
]
&
slbitmap
)
!=
slbitmap
)
rbStart
++
;
uint16_t
max_rbSize
=
1
;
while
(
rbStart
+
max_rbSize
<
bwpSize
&&
(
rballoc_mask
[
rbStart
+
max_rbSize
]
&
slbitmap
))
while
(
rbStart
+
max_rbSize
<
bwpSize
&&
(
rballoc_mask
[
rbStart
+
max_rbSize
]
&
slbitmap
)
==
slbitmap
)
max_rbSize
++
;
sched_pdsch
->
Qm
=
nr_get_Qm_dl
(
sched_pdsch
->
mcs
,
ps
->
mcsTableIdx
);
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
View file @
d5419a27
...
...
@@ -1002,8 +1002,8 @@ bool allocate_ul_retransmission(module_id_t module_id,
}
/* Check the resource is enough for retransmission */
while
(
rbStart
<
bwpSize
&&
!
(
rballoc_mask
[
rbStart
]
&
SL_to_bitmap
(
ps
->
startSymbolIndex
,
ps
->
nrOfSymbols
))
)
const
uint16_t
slbitmap
=
SL_to_bitmap
(
ps
->
startSymbolIndex
,
ps
->
nrOfSymbols
);
while
(
rbStart
<
bwpSize
&&
(
rballoc_mask
[
rbStart
]
&
slbitmap
)
!=
slbitmap
)
rbStart
++
;
if
(
rbStart
+
retInfo
->
rbSize
>
bwpSize
)
{
LOG_W
(
NR_MAC
,
"cannot allocate retransmission of UE %d/RNTI %04x: no resources (rbStart %d, retInfo->rbSize %d, bwpSize %d
\n
"
,
UE_id
,
UE_info
->
rnti
[
UE_id
],
rbStart
,
retInfo
->
rbSize
,
bwpSize
);
...
...
@@ -1023,12 +1023,11 @@ bool allocate_ul_retransmission(module_id_t module_id,
&
temp_ps
);
/* the retransmission will use a different time domain allocation, check
* that we have enough resources */
while
(
rbStart
<
bwpSize
&&
!
(
rballoc_mask
[
rbStart
]
&
SL_to_bitmap
(
temp_ps
.
startSymbolIndex
,
temp_ps
.
nrOfSymbols
))
)
const
uint16_t
slbitmap
=
SL_to_bitmap
(
temp_ps
.
startSymbolIndex
,
temp_ps
.
nrOfSymbols
);
while
(
rbStart
<
bwpSize
&&
(
rballoc_mask
[
rbStart
]
&
slbitmap
)
!=
slbitmap
)
rbStart
++
;
int
rbSize
=
0
;
while
(
rbStart
+
rbSize
<
bwpSize
&&
(
rballoc_mask
[
rbStart
+
rbSize
]
&
SL_to_bitmap
(
temp_ps
.
startSymbolIndex
,
temp_ps
.
nrOfSymbols
)))
while
(
rbStart
+
rbSize
<
bwpSize
&&
(
rballoc_mask
[
rbStart
+
rbSize
]
&
slbitmap
)
==
slbitmap
)
rbSize
++
;
uint32_t
new_tbs
;
uint16_t
new_rbSize
;
...
...
@@ -1260,8 +1259,8 @@ void pf_ul(module_id_t module_id,
}
LOG_D
(
NR_MAC
,
"Looking for min_rb %d RBs, starting at %d
\n
"
,
min_rb
,
rbStart
);
while
(
rbStart
<
bwpSize
&&
!
(
rballoc_mask
[
rbStart
]
&
SL_to_bitmap
(
ps
->
startSymbolIndex
,
ps
->
nrOfSymbols
))
)
const
uint16_t
slbitmap
=
SL_to_bitmap
(
ps
->
startSymbolIndex
,
ps
->
nrOfSymbols
);
while
(
rbStart
<
bwpSize
&&
(
rballoc_mask
[
rbStart
]
&
slbitmap
)
!=
slbitmap
)
rbStart
++
;
if
(
rbStart
+
min_rb
>=
bwpSize
)
{
LOG_W
(
NR_MAC
,
"cannot allocate continuous UL data for UE %d/RNTI %04x: no resources (rbStart %d, min_rb %d, bwpSize %d
\n
"
,
...
...
@@ -1294,7 +1293,7 @@ void pf_ul(module_id_t module_id,
/* Mark the corresponding RBs as used */
n_rb_sched
-=
sched_pusch
->
rbSize
;
for
(
int
rb
=
0
;
rb
<
sched_ctrl
->
sched_pusch
.
rbSize
;
rb
++
)
rballoc_mask
[
rb
+
sched_ctrl
->
sched_pusch
.
rbStart
]
^=
SL_to_bitmap
(
ps
->
startSymbolIndex
,
ps
->
nrOfSymbols
)
;
rballoc_mask
[
rb
+
sched_ctrl
->
sched_pusch
.
rbStart
]
^=
slbitmap
;
continue
;
}
...
...
@@ -1398,13 +1397,12 @@ void pf_ul(module_id_t module_id,
}
update_ul_ue_R_Qm
(
sched_pusch
,
ps
);
while
(
rbStart
<
bwpSize
&&
!
(
rballoc_mask
[
rbStart
]
&
SL_to_bitmap
(
ps
->
startSymbolIndex
,
ps
->
nrOfSymbols
))
)
const
uint16_t
slbitmap
=
SL_to_bitmap
(
ps
->
startSymbolIndex
,
ps
->
nrOfSymbols
);
while
(
rbStart
<
bwpSize
&&
(
rballoc_mask
[
rbStart
]
&
slbitmap
)
!=
slbitmap
)
rbStart
++
;
sched_pusch
->
rbStart
=
rbStart
;
uint16_t
max_rbSize
=
1
;
while
(
rbStart
+
max_rbSize
<
bwpSize
&&
(
rballoc_mask
[
rbStart
+
max_rbSize
]
&&
SL_to_bitmap
(
ps
->
startSymbolIndex
,
ps
->
nrOfSymbols
)))
while
(
rbStart
+
max_rbSize
<
bwpSize
&&
(
rballoc_mask
[
rbStart
+
max_rbSize
]
&
slbitmap
)
==
slbitmap
)
max_rbSize
++
;
if
(
rbStart
+
min_rb
>=
bwpSize
)
{
...
...
@@ -1445,7 +1443,7 @@ void pf_ul(module_id_t module_id,
n_rb_sched
-=
sched_pusch
->
rbSize
;
for
(
int
rb
=
0
;
rb
<
sched_ctrl
->
sched_pusch
.
rbSize
;
rb
++
)
rballoc_mask
[
rb
+
sched_ctrl
->
sched_pusch
.
rbStart
]
^=
SL_to_bitmap
(
ps
->
startSymbolIndex
,
ps
->
nrOfSymbols
)
;
rballoc_mask
[
rb
+
sched_ctrl
->
sched_pusch
.
rbStart
]
^=
slbitmap
;
}
}
...
...
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