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
canghaiwuhen
OpenXG-RAN
Commits
d2e6b9f5
Commit
d2e6b9f5
authored
Nov 06, 2020
by
ChiehChun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix indentation, space and warning
parent
40a0ace5
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
113 additions
and
108 deletions
+113
-108
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c
+113
-108
No files found.
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c
View file @
d2e6b9f5
...
...
@@ -465,6 +465,7 @@ uint8_t getN_PRB_DMRS(NR_BWP_Downlink_t *bwp, int numDmrsCdmGrpsNoData) {
return
numDmrsCdmGrpsNoData
*
4
;
}
}
void
nr_store_dlsch_buffer
(
module_id_t
module_id
,
frame_t
frame
,
sub_frame_t
slot
)
{
...
...
@@ -496,6 +497,7 @@ void nr_store_dlsch_buffer(module_id_t module_id,
sched_ctrl
->
rlc_status
[
lcid
].
bytes_in_buffer
);
}
}
void
find_free_CCE
(
module_id_t
module_id
,
sub_frame_t
slot
,
NR_UE_info_t
*
UE_info
,
...
...
@@ -524,6 +526,7 @@ void find_free_CCE(module_id_t module_id,
}
UE_info
->
num_pdcch_cand
[
UE_id
][
cid
]
++
;
}
void
allocate_retransmission
(
module_id_t
module_id
,
uint8_t
*
rballoc_mask
,
int
*
n_rb_sched
,
...
...
@@ -571,9 +574,10 @@ void allocate_retransmission(module_id_t module_id,
if
(
!
rballoc_mask
[
i
])
continue
;
rballoc_mask
[
i
]
=
0
;
n_rb_ret
--
;
n_rb_ret
--
;
}
}
void
pf_dl
(
module_id_t
module_id
,
frame_t
frame
,
sub_frame_t
slot
,
...
...
@@ -584,17 +588,13 @@ void pf_dl(module_id_t module_id,
int
max_num_ue
)
{
const
int
UE_id
=
0
;
NR_UE_sched_ctrl_t
*
sched_ctrl
=
&
UE_info
->
UE_sched_ctrl
[
UE_id
];
const
int
current_harq_pid
=
sched_ctrl
->
current_harq_pid
;
NR_UE_harq_t
*
harq
=
&
sched_ctrl
->
harq_processes
[
current_harq_pid
];
NR_UE_ret_info_t
*
retInfo
=
&
sched_ctrl
->
retInfo
[
current_harq_pid
];
const
uint16_t
bwpSize
=
NRRIV2BW
(
sched_ctrl
->
active_bwp
->
bwp_Common
->
genericParameters
.
locationAndBandwidth
,
275
);
int
rbStart
=
NRRIV2PRBOFFSET
(
sched_ctrl
->
active_bwp
->
bwp_Common
->
genericParameters
.
locationAndBandwidth
,
275
);
/* Loop UE_info->list to check retransmission */
for
(
int
UE_id
=
UE_info
->
list
.
head
;
UE_id
>=
0
;
UE_id
=
UE_info
->
list
.
next
[
UE_id
])
{
NR_UE_sched_ctrl_t
*
sched_ctrl
=
&
UE_info
->
UE_sched_ctrl
[
UE_id
];
const
uint16_t
rnti
=
UE_info
->
rnti
[
UE_id
];
const
int
current_harq_pid
=
sched_ctrl
->
current_harq_pid
;
NR_UE_harq_t
*
harq
=
&
sched_ctrl
->
harq_processes
[
current_harq_pid
];
/* Calculate Throughput */
...
...
@@ -602,7 +602,7 @@ void pf_dl(module_id_t module_id,
if
(
harq
->
round
!=
0
)
{
/* Find a free CCE */
find_free_CCE
(
module_id
,
slot
,
UE_info
,
UE_id
);
find_free_CCE
(
module_id
,
slot
,
UE_info
,
UE_id
);
/* Find PUCCH occasion */
nr_acknack_scheduling
(
module_id
,
...
...
@@ -616,7 +616,7 @@ void pf_dl(module_id_t module_id,
AssertFatal
(
sched_ctrl
->
pucch_sched_idx
>=
0
,
"no uplink slot for PUCCH found!
\n
"
);
/* Allocate retransmission */
allocate_retransmission
(
module_id
,
rballoc_mask
,
&
n_rb_sched
,
UE_info
,
UE_id
);
allocate_retransmission
(
module_id
,
rballoc_mask
,
&
n_rb_sched
,
UE_info
,
UE_id
);
}
else
{
/* Check DL buffer */
...
...
@@ -628,6 +628,12 @@ void pf_dl(module_id_t module_id,
}
}
NR_UE_sched_ctrl_t
*
sched_ctrl
=
&
UE_info
->
UE_sched_ctrl
[
UE_id
];
const
uint16_t
bwpSize
=
NRRIV2BW
(
sched_ctrl
->
active_bwp
->
bwp_Common
->
genericParameters
.
locationAndBandwidth
,
275
);
int
rbStart
=
NRRIV2PRBOFFSET
(
sched_ctrl
->
active_bwp
->
bwp_Common
->
genericParameters
.
locationAndBandwidth
,
275
);
const
int
current_harq_pid
=
sched_ctrl
->
current_harq_pid
;
NR_UE_harq_t
*
harq
=
&
sched_ctrl
->
harq_processes
[
current_harq_pid
];
/* Loop UE_sched to find max coeff and allocate transmission */
//while(n_rb_sched > 0 && UE_sched.head >= 0){
if
(
harq
->
round
==
0
)
{
// temp
...
...
@@ -635,7 +641,7 @@ void pf_dl(module_id_t module_id,
/* Find max coeff from UE_sched*/
/* Find a free CCE */
find_free_CCE
(
module_id
,
slot
,
UE_info
,
UE_id
);
find_free_CCE
(
module_id
,
slot
,
UE_info
,
UE_id
);
/* Find PUCCH occasion */
nr_acknack_scheduling
(
module_id
,
...
...
@@ -690,7 +696,6 @@ void pf_dl(module_id_t module_id,
rballoc_mask
[
rb
+
sched_ctrl
->
rbStart
]
=
0
;
}
}
}
void
nr_simple_dlsch_preprocessor
(
module_id_t
module_id
,
...
...
@@ -727,10 +732,10 @@ void nr_simple_dlsch_preprocessor(module_id_t module_id,
/* Retrieve amount of data to send for this UE */
nr_store_dlsch_buffer
(
module_id
,
frame
,
slot
);
nr_store_dlsch_buffer
(
module_id
,
frame
,
slot
);
/* pf algo */
pf_dl
(
module_id
,
frame
,
slot
,
num_slots_per_tdd
,
pf_dl
(
module_id
,
frame
,
slot
,
num_slots_per_tdd
,
UE_info
,
n_rb_sched
,
rballoc_mask
,
...
...
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