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
39fddbba
Commit
39fddbba
authored
Aug 22, 2023
by
francescomani
Committed by
Laurent THOMAS
Jan 14, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
review and formatting
parent
ca0d4a82
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
43 additions
and
32 deletions
+43
-32
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c
+15
-12
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c
+6
-2
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
+4
-4
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
+18
-14
No files found.
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c
View file @
39fddbba
...
...
@@ -1358,14 +1358,14 @@ static void nr_generate_Msg2(module_id_t module_idP,
dci_pdu
->
powerControlOffsetSS
=
1
;
dci_pdu_rel15_t
dci_payload
;
dci_payload
.
frequency_domain_assignment
.
val
=
PRBalloc_to_locationandbandwidth0
(
pdsch_pdu_rel15
->
rbSize
,
pdsch_pdu_rel15
->
rbStart
-
alloc_start
,
rbStop
-
alloc_start
);
LOG_D
(
NR_MAC
,
"Msg2 rbSize.rbStart.BWPsize %d.%d.%ld
\n
"
,
pdsch_pdu_rel15
->
rbSize
,
AssertFatal
(
pdsch_pdu_rel15
->
rbStart
>=
alloc_start
,
"Start of allocated PRBs %d cannot be smaller than allowed allocation start %d
\n
"
,
pdsch_pdu_rel15
->
rbStart
,
BWPSize
);
alloc_start
);
dci_payload
.
frequency_domain_assignment
.
val
=
PRBalloc_to_locationandbandwidth0
(
pdsch_pdu_rel15
->
rbSize
,
pdsch_pdu_rel15
->
rbStart
-
alloc_start
,
rbStop
-
alloc_start
);
LOG_D
(
NR_MAC
,
"Msg2 rbSize.rbStart.BWPsize %d.%d.%ld
\n
"
,
pdsch_pdu_rel15
->
rbSize
,
pdsch_pdu_rel15
->
rbStart
,
BWPSize
);
dci_payload
.
time_domain_assignment
.
val
=
time_domain_assignment
;
dci_payload
.
vrb_to_prb_mapping
.
val
=
0
;
...
...
@@ -1573,9 +1573,12 @@ static void prepare_dl_pdus(gNB_MAC_INST *nr_mac,
int
alloc_start
=
0
;
int
alloc_stop
=
0
;
get_start_stop_allocation
(
nr_mac
,
&
ra
->
sc_info
,
dl_bwp
,
ss
,
&
alloc_start
,
&
alloc_stop
);
dci_payload
.
frequency_domain_assignment
.
val
=
PRBalloc_to_locationandbandwidth0
(
pdsch_pdu_rel15
->
rbSize
,
pdsch_pdu_rel15
->
rbStart
-
alloc_start
,
alloc_stop
-
alloc_start
);
AssertFatal
(
pdsch_pdu_rel15
->
rbStart
>=
alloc_start
,
"Start of allocated PRBs %d cannot be smaller than allowed allocation start %d
\n
"
,
pdsch_pdu_rel15
->
rbStart
,
alloc_start
);
dci_payload
.
frequency_domain_assignment
.
val
=
PRBalloc_to_locationandbandwidth0
(
pdsch_pdu_rel15
->
rbSize
,
pdsch_pdu_rel15
->
rbStart
-
alloc_start
,
alloc_stop
-
alloc_start
);
dci_payload
.
format_indicator
=
1
;
dci_payload
.
time_domain_assignment
.
val
=
time_domain_assignment
;
...
...
@@ -1757,7 +1760,7 @@ static void nr_generate_Msg4(module_id_t module_idP,
// increase PRBs until we get to max size or TBS is bigger than MAC PDU size
do
{
if
(
rbSize
<
(
rbStop
-
rbStart
)
)
if
(
rbSize
<
rbStop
-
rbStart
)
rbSize
++
;
else
mcsIndex
++
;
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c
View file @
39fddbba
...
...
@@ -394,8 +394,8 @@ void get_start_stop_allocation(gNB_MAC_INST *mac,
// TS 38.214 Section 5.1.2.2.2
*
rbStop
=
dl_bwp
->
BWPSize
;
*
rbStart
=
0
;
// start wrt BWPstart
if
(
ss
->
searchSpaceType
->
present
==
NR_SearchSpace__searchSpaceType_PR_common
&&
ss
->
searchSpaceType
->
choice
.
common
->
dci_Format0_0_AndFormat1_0
)
{
if
(
ss
->
searchSpaceType
->
present
==
NR_SearchSpace__searchSpaceType_PR_common
&&
ss
->
searchSpaceType
->
choice
.
common
->
dci_Format0_0_AndFormat1_0
)
{
if
(
mac
->
cset0_bwp_size
!=
0
)
{
*
rbStart
=
mac
->
cset0_bwp_start
;
*
rbStop
=
*
rbStart
+
mac
->
cset0_bwp_size
;
...
...
@@ -1164,6 +1164,10 @@ void nr_schedule_ue_spec(module_id_t module_id,
int
rbStop
=
0
;
int
rbStart
=
0
;
get_start_stop_allocation
(
gNB_mac
,
&
UE
->
sc_info
,
current_BWP
,
sched_ctrl
->
search_space
,
&
rbStart
,
&
rbStop
);
AssertFatal
(
pdsch_pdu
->
rbStart
>=
rbStart
,
"Start of allocated PRBs %d cannot be smaller than allowed allocation start %d
\n
"
,
pdsch_pdu
->
rbStart
,
rbStart
);
dci_payload
.
frequency_domain_assignment
.
val
=
PRBalloc_to_locationandbandwidth0
(
pdsch_pdu
->
rbSize
,
pdsch_pdu
->
rbStart
-
rbStart
,
rbStop
-
rbStart
);
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
View file @
39fddbba
...
...
@@ -693,10 +693,10 @@ void config_uldci(const NR_UE_ServingCell_Info_t *sc_info,
// when DCI format 0_0 is used in any common search space
// the size of the initial UL bandwidth part shall be used
// 38.214 section 6.1.2.2.2
const
uint16_t
alloc_size
=
(
ss
->
searchSpaceType
->
present
==
NR_SearchSpace__searchSpaceType_PR_common
&&
ss
->
searchSpaceType
->
choice
.
common
->
dci_Format0_0_AndFormat1_0
)
?
sc_info
->
initial_ul_BWPSize
:
ul_bwp
->
BWPSize
;
const
uint16_t
alloc_size
=
(
ss
->
searchSpaceType
->
present
==
NR_SearchSpace__searchSpaceType_PR_common
&&
ss
->
searchSpaceType
->
choice
.
common
->
dci_Format0_0_AndFormat1_0
)
?
sc_info
->
initial_ul_BWPSize
:
ul_bwp
->
BWPSize
;
dci_pdu_rel15
->
frequency_domain_assignment
.
val
=
PRBalloc_to_locationandbandwidth0
(
pusch_pdu
->
rb_size
,
pusch_pdu
->
rb_start
,
alloc_size
);
dci_pdu_rel15
->
time_domain_assignment
.
val
=
time_domain_assignment
;
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
View file @
39fddbba
...
...
@@ -1502,10 +1502,10 @@ static bool allocate_ul_retransmission(gNB_MAC_INST *nrmac,
// when DCI format 0_0 is used in any common search space
// the size of the initial UL bandwidth part shall be used
// 38.214 section 6.1.2.2.2
const
uint16_t
bwpSize
=
(
ss
->
searchSpaceType
->
present
==
NR_SearchSpace__searchSpaceType_PR_common
&&
ss
->
searchSpaceType
->
choice
.
common
->
dci_Format0_0_AndFormat1_0
)
?
UE
->
sc_info
.
initial_ul_BWPSize
:
ul_bwp
->
BWPSize
;
const
uint16_t
bwpSize
=
(
ss
->
searchSpaceType
->
present
==
NR_SearchSpace__searchSpaceType_PR_common
&&
ss
->
searchSpaceType
->
choice
.
common
->
dci_Format0_0_AndFormat1_0
)
?
UE
->
sc_info
.
initial_ul_BWPSize
:
ul_bwp
->
BWPSize
;
const
uint8_t
nrOfLayers
=
retInfo
->
nrOfLayers
;
LOG_D
(
NR_MAC
,
"retInfo->time_domain_allocation = %d, tda = %d
\n
"
,
retInfo
->
time_domain_allocation
,
tda
);
LOG_D
(
NR_MAC
,
"tbs %d
\n
"
,
retInfo
->
tb_size
);
...
...
@@ -1672,10 +1672,10 @@ static void pf_ul(module_id_t module_id,
// the size of the initial UL bandwidth part shall be used
// 38.214 section 6.1.2.2.2
NR_SearchSpace_t
*
ss
=
sched_ctrl
->
search_space
;
const
uint16_t
bwpSize
=
(
ss
->
searchSpaceType
->
present
==
NR_SearchSpace__searchSpaceType_PR_common
&&
ss
->
searchSpaceType
->
choice
.
common
->
dci_Format0_0_AndFormat1_0
)
?
UE
->
sc_info
.
initial_ul_BWPSize
:
current_BWP
->
BWPSize
;
const
uint16_t
bwpSize
=
(
ss
->
searchSpaceType
->
present
==
NR_SearchSpace__searchSpaceType_PR_common
&&
ss
->
searchSpaceType
->
choice
.
common
->
dci_Format0_0_AndFormat1_0
)
?
UE
->
sc_info
.
initial_ul_BWPSize
:
current_BWP
->
BWPSize
;
NR_sched_pusch_t
*
sched_pusch
=
&
sched_ctrl
->
sched_pusch
;
const
NR_mac_dir_stats_t
*
stats
=
&
UE
->
mac_stats
.
ul
;
...
...
@@ -1743,7 +1743,9 @@ static void pf_ul(module_id_t module_id,
/* if no data, pre-allocate 5RB */
/* Find a free CCE */
int
CCEIndex
=
get_cce_index
(
nrmac
,
CC_id
,
slot
,
UE
->
rnti
,
CC_id
,
slot
,
UE
->
rnti
,
&
sched_ctrl
->
aggregation_level
,
ss
,
sched_ctrl
->
coreset
,
...
...
@@ -1841,7 +1843,9 @@ static void pf_ul(module_id_t module_id,
NR_UE_sched_ctrl_t
*
sched_ctrl
=
&
iterator
->
UE
->
UE_sched_ctrl
;
NR_SearchSpace_t
*
ss
=
sched_ctrl
->
search_space
;
int
CCEIndex
=
get_cce_index
(
nrmac
,
CC_id
,
slot
,
iterator
->
UE
->
rnti
,
CC_id
,
slot
,
iterator
->
UE
->
rnti
,
&
sched_ctrl
->
aggregation_level
,
ss
,
sched_ctrl
->
coreset
,
...
...
@@ -1874,10 +1878,10 @@ static void pf_ul(module_id_t module_id,
// when DCI format 0_0 is used in any common search space
// the size of the initial UL bandwidth part shall be used
// 38.214 section 6.1.2.2.2
const
uint16_t
bwpSize
=
(
ss
->
searchSpaceType
->
present
==
NR_SearchSpace__searchSpaceType_PR_common
&&
ss
->
searchSpaceType
->
choice
.
common
->
dci_Format0_0_AndFormat1_0
)
?
iterator
->
UE
->
sc_info
.
initial_ul_BWPSize
:
current_BWP
->
BWPSize
;
const
uint16_t
bwpSize
=
(
ss
->
searchSpaceType
->
present
==
NR_SearchSpace__searchSpaceType_PR_common
&&
ss
->
searchSpaceType
->
choice
.
common
->
dci_Format0_0_AndFormat1_0
)
?
iterator
->
UE
->
sc_info
.
initial_ul_BWPSize
:
current_BWP
->
BWPSize
;
while
(
rbStart
<
bwpSize
&&
(
rballoc_mask
[
rbStart
]
&
slbitmap
)
!=
slbitmap
)
rbStart
++
;
sched_pusch
->
rbStart
=
rbStart
;
...
...
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