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
promise
OpenXG-RAN
Commits
8719e67d
Commit
8719e67d
authored
Nov 07, 2020
by
Robert Schmidt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
PUCCH scheduling: allocate in UL_tti_req_ahead
parent
28ff0e1f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
50 additions
and
42 deletions
+50
-42
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c
+50
-42
No files found.
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c
View file @
8719e67d
...
...
@@ -334,53 +334,61 @@ void nr_schedule_pucch(int Mod_idP,
int
nr_ulmix_slots
,
frame_t
frameP
,
sub_frame_t
slotP
)
{
uint16_t
O_csi
,
O_ack
,
O_uci
;
uint8_t
O_sr
=
0
;
// no SR in PUCCH implemented for now
NR_ServingCellConfigCommon_t
*
scc
=
RC
.
nrmac
[
Mod_idP
]
->
common_channels
->
ServingCellConfigCommon
;
NR_UE_info_t
*
UE_info
=
&
RC
.
nrmac
[
Mod_idP
]
->
UE_info
;
AssertFatal
(
UE_info
->
active
[
UE_id
],
"Cannot find UE_id %d is not active
\n
"
,
UE_id
);
NR_CellGroupConfig_t
*
secondaryCellGroup
=
UE_info
->
secondaryCellGroup
[
UE_id
];
int
bwp_id
=
1
;
NR_BWP_Uplink_t
*
ubwp
=
secondaryCellGroup
->
spCellConfig
->
spCellConfigDedicated
->
uplinkConfig
->
uplinkBWP_ToAddModList
->
list
.
array
[
bwp_id
-
1
];
nfapi_nr_ul_tti_request_t
*
UL_tti_req
=
&
RC
.
nrmac
[
Mod_idP
]
->
UL_tti_req
[
0
];
NR_sched_pucch
*
curr_pucch
;
for
(
int
k
=
0
;
k
<
nr_ulmix_slots
;
k
++
)
{
for
(
int
l
=
0
;
l
<
2
;
l
++
)
{
curr_pucch
=
&
UE_info
->
UE_sched_ctrl
[
UE_id
].
sched_pucch
[
k
][
l
];
O_ack
=
curr_pucch
->
dai_c
;
O_csi
=
curr_pucch
->
csi_bits
;
O_uci
=
O_ack
+
O_csi
+
O_sr
;
if
((
O_uci
>
0
)
&&
(
frameP
==
curr_pucch
->
frame
)
&&
(
slotP
==
curr_pucch
->
ul_slot
))
{
UL_tti_req
->
SFN
=
curr_pucch
->
frame
;
UL_tti_req
->
Slot
=
curr_pucch
->
ul_slot
;
UL_tti_req
->
pdus_list
[
UL_tti_req
->
n_pdus
].
pdu_type
=
NFAPI_NR_UL_CONFIG_PUCCH_PDU_TYPE
;
UL_tti_req
->
pdus_list
[
UL_tti_req
->
n_pdus
].
pdu_size
=
sizeof
(
nfapi_nr_pucch_pdu_t
);
nfapi_nr_pucch_pdu_t
*
pucch_pdu
=
&
UL_tti_req
->
pdus_list
[
UL_tti_req
->
n_pdus
].
pucch_pdu
;
memset
(
pucch_pdu
,
0
,
sizeof
(
nfapi_nr_pucch_pdu_t
));
UL_tti_req
->
n_pdus
+=
1
;
LOG_D
(
MAC
,
"Scheduling pucch reception for frame %d slot %d with (%d, %d, %d) (SR ACK, CSI) bits
\n
"
,
frameP
,
slotP
,
O_sr
,
O_ack
,
curr_pucch
->
csi_bits
);
NR_sched_pucch
*
curr_pucch
=
&
UE_info
->
UE_sched_ctrl
[
UE_id
].
sched_pucch
[
k
][
l
];
const
uint16_t
O_ack
=
curr_pucch
->
dai_c
;
const
uint16_t
O_csi
=
curr_pucch
->
csi_bits
;
const
uint8_t
O_sr
=
0
;
// no SR in PUCCH implemented for now
if
(
O_ack
+
O_csi
+
O_sr
==
0
||
frameP
!=
curr_pucch
->
frame
||
slotP
!=
curr_pucch
->
ul_slot
)
continue
;
nfapi_nr_ul_tti_request_t
*
future_ul_tti_req
=
&
RC
.
nrmac
[
Mod_idP
]
->
UL_tti_req_ahead
[
0
][
curr_pucch
->
ul_slot
];
AssertFatal
(
future_ul_tti_req
->
SFN
==
curr_pucch
->
frame
&&
future_ul_tti_req
->
Slot
==
curr_pucch
->
ul_slot
,
"future UL_tti_req's frame.slot %d.%d does not match PUCCH %d.%d
\n
"
,
future_ul_tti_req
->
SFN
,
future_ul_tti_req
->
Slot
,
curr_pucch
->
frame
,
curr_pucch
->
ul_slot
);
future_ul_tti_req
->
pdus_list
[
future_ul_tti_req
->
n_pdus
].
pdu_type
=
NFAPI_NR_UL_CONFIG_PUCCH_PDU_TYPE
;
future_ul_tti_req
->
pdus_list
[
future_ul_tti_req
->
n_pdus
].
pdu_size
=
sizeof
(
nfapi_nr_pucch_pdu_t
);
nfapi_nr_pucch_pdu_t
*
pucch_pdu
=
&
future_ul_tti_req
->
pdus_list
[
future_ul_tti_req
->
n_pdus
].
pucch_pdu
;
memset
(
pucch_pdu
,
0
,
sizeof
(
nfapi_nr_pucch_pdu_t
));
future_ul_tti_req
->
n_pdus
+=
1
;
LOG_D
(
MAC
,
"%4d.%2d Scheduling pucch reception in %4d.%2d: bits SR %d, ACK %d, CSI %d, k %d l %d
\n
"
,
frameP
,
slotP
,
curr_pucch
->
frame
,
curr_pucch
->
ul_slot
,
O_sr
,
O_ack
,
O_csi
,
k
,
l
);
NR_ServingCellConfigCommon_t
*
scc
=
RC
.
nrmac
[
Mod_idP
]
->
common_channels
->
ServingCellConfigCommon
;
nr_configure_pucch
(
pucch_pdu
,
scc
,
ubwp
,
UE_info
->
UE_sched_ctrl
[
UE_id
].
active_
ubwp
,
UE_info
->
rnti
[
UE_id
],
curr_pucch
->
resource_indicator
,
O_csi
,
O_ack
,
O_sr
);
memset
((
void
*
)
&
UE_info
->
UE_sched_ctrl
[
UE_id
].
sched_pucch
[
k
][
l
],
memset
(
&
UE_info
->
UE_sched_ctrl
[
UE_id
].
sched_pucch
[
k
][
l
],
0
,
sizeof
(
NR_sched_pucch
));
}
}
}
}
bool
is_xlsch_in_slot
(
uint64_t
bitmap
,
sub_frame_t
slot
)
{
...
...
@@ -512,8 +520,6 @@ void gNB_dlsch_ulsch_scheduler(module_id_t module_idP,
nr_schedule_ulsch
(
module_idP
,
frame
,
slot
,
num_slots_per_tdd
,
nr_ulmix_slots
,
ulsch_in_slot_bitmap
);
}
nr_schedule_pusch
(
module_idP
,
frame
,
slot
);
if
(
UE_info
->
active
[
UE_id
]
&&
(
is_xlsch_in_slot
(
dlsch_in_slot_bitmap
,
slot
%
num_slots_per_tdd
))
&&
slot
<
10
)
{
...
...
@@ -526,6 +532,8 @@ void gNB_dlsch_ulsch_scheduler(module_id_t module_idP,
if
(
UE_info
->
active
[
UE_id
])
nr_schedule_pucch
(
module_idP
,
UE_id
,
nr_ulmix_slots
,
frame
,
slot
);
nr_schedule_pusch
(
module_idP
,
frame
,
slot
);
stop_meas
(
&
RC
.
nrmac
[
module_idP
]
->
eNB_scheduler
);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_gNB_DLSCH_ULSCH_SCHEDULER
,
VCD_FUNCTION_OUT
);
...
...
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