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
wangjie
OpenXG-RAN
Commits
73c0c8f1
Commit
73c0c8f1
authored
Dec 05, 2020
by
ChiehChun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change vrb_map_UL to rballoc_mask
parent
3e192e04
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
3 deletions
+11
-3
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
+11
-3
No files found.
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
View file @
73c0c8f1
...
@@ -622,11 +622,19 @@ void nr_simple_ulsch_preprocessor(module_id_t module_id,
...
@@ -622,11 +622,19 @@ void nr_simple_ulsch_preprocessor(module_id_t module_id,
sched_pusch
->
Qm
<<=
1
;
sched_pusch
->
Qm
<<=
1
;
}
}
/*
get first, largest unallocated region
*/
/*
Change vrb_map_UL to rballoc_mask
*/
uint16_t
*
vrb_map_UL
=
uint16_t
*
vrb_map_UL
=
&
RC
.
nrmac
[
module_id
]
->
common_channels
[
CC_id
].
vrb_map_UL
[
sched_slot
*
275
];
&
RC
.
nrmac
[
module_id
]
->
common_channels
[
CC_id
].
vrb_map_UL
[
sched_slot
*
275
];
int
rbStart
=
NRRIV2PRBOFFSET
(
sched_ctrl
->
active_bwp
->
bwp_Common
->
genericParameters
.
locationAndBandwidth
,
275
);
int
rbStart
=
NRRIV2PRBOFFSET
(
sched_ctrl
->
active_bwp
->
bwp_Common
->
genericParameters
.
locationAndBandwidth
,
275
);
const
uint16_t
bwpSize
=
NRRIV2BW
(
sched_ctrl
->
active_ubwp
->
bwp_Common
->
genericParameters
.
locationAndBandwidth
,
275
);
const
uint16_t
bwpSize
=
NRRIV2BW
(
sched_ctrl
->
active_ubwp
->
bwp_Common
->
genericParameters
.
locationAndBandwidth
,
275
);
uint8_t
rballoc_mask
[
bwpSize
];
int
n_rb_sched
=
0
;
for
(
int
i
=
0
;
i
<
bwpSize
;
i
++
)
{
// calculate mask: init with "NOT" vrb_map_UL:
// if any RB in vrb_map_UL is blocked (1), the current RB will be 0
rballoc_mask
[
i
]
=
!
vrb_map_UL
[
i
];
n_rb_sched
+=
rballoc_mask
[
i
];
}
while
(
rbStart
<
bwpSize
&&
vrb_map_UL
[
rbStart
])
rbStart
++
;
while
(
rbStart
<
bwpSize
&&
vrb_map_UL
[
rbStart
])
rbStart
++
;
uint16_t
rbSize
=
4
;
uint16_t
rbSize
=
4
;
...
@@ -646,14 +654,14 @@ void nr_simple_ulsch_preprocessor(module_id_t module_id,
...
@@ -646,14 +654,14 @@ void nr_simple_ulsch_preprocessor(module_id_t module_id,
0
,
0
,
1
/* NrOfLayers */
)
1
/* NrOfLayers */
)
>>
3
;
>>
3
;
}
while
(
rbStart
+
rbSize
<
bwpSize
&&
!
vrb_map_UL
[
rbStart
+
rbSize
]
&&
}
while
(
rbStart
+
rbSize
<
bwpSize
&&
rballoc_mask
[
rbStart
+
rbSize
]
&&
sched_pusch
->
tb_size
<
B
);
sched_pusch
->
tb_size
<
B
);
LOG_D
(
MAC
,
"rbSize %d, TBS %d, est buf %d, sched_ul %d, B %d
\n
"
,
LOG_D
(
MAC
,
"rbSize %d, TBS %d, est buf %d, sched_ul %d, B %d
\n
"
,
rbSize
,
sched_pusch
->
tb_size
,
sched_ctrl
->
estimated_ul_buffer
,
sched_ctrl
->
sched_ul_bytes
,
B
);
rbSize
,
sched_pusch
->
tb_size
,
sched_ctrl
->
estimated_ul_buffer
,
sched_ctrl
->
sched_ul_bytes
,
B
);
/* mark the corresponding RBs as used */
/* mark the corresponding RBs as used */
for
(
int
rb
=
0
;
rb
<
sched_ctrl
->
sched_pusch
.
rbSize
;
rb
++
)
for
(
int
rb
=
0
;
rb
<
sched_ctrl
->
sched_pusch
.
rbSize
;
rb
++
)
vrb_map_UL
[
rb
+
sched_ctrl
->
sched_pusch
.
rbStart
]
=
1
;
rballoc_mask
[
rb
+
sched_ctrl
->
sched_pusch
.
rbStart
]
=
0
;
}
}
void
nr_schedule_ulsch
(
module_id_t
module_id
,
void
nr_schedule_ulsch
(
module_id_t
module_id
,
...
...
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