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
81873616
Commit
81873616
authored
4 years ago
by
Robert Schmidt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Schedule UE periodically every 10 frames in UL
parent
800330e4
x2_handle_sctp_shutdown
512-dataplane-bug-in-l2nfapi_nos1
FR2_NSA
NRUE_usedlschparallel
NR_2port_CSIRS
NR_CSIRS_tomerge
NR_F1C_F1U_extensions
NR_RRCReconfiguration_BWP
NR_UE_PUCCH_bugfixes
NR_UE_SA
NR_UE_SSB_meas
NR_UE_rework_test
NR_UE_reworking_UCI_procedures
NR_cleanup_PUCCH_resources
NR_gNB_initial_MIB_fix
NR_multiplexing_HARQ_CSI_PUCCH
NR_new_ul_antennaports
NR_phytest_bugfixes
NR_reworking_UL_antennaports
NR_scheduling_CSIRS
NR_scheduling_request
RFquality
Test_SA_5GREC
add-ru-docker-image
avxllr
bandwidth-testing
benetel_dpdk20
bugfix-nr-t-reordering
bugfix_gnb_rt_stats_html
ci-add-sabox-support
ci-fix-module-ul-iperf
ci_benetel_longrun_limits
ci_fix_iperf_for_module
ci_hotfix_module_ue_ip_address
ci_improve_module_ctl
ci_nsa_2x2_implem
ci_nsa_benetel
ci_nsa_fixes
ci_nsa_pipes_improve
ci_nsa_test_integration_2021_wk19
ci_nsa_traces
ci_nsa_uplink
ci_sa_rfsim_test
ci_solve_ul_for_module
ci_test_5GREC
ci_test_nsa_2x2
ci_test_nsa_fix_quectel_nic
ci_test_nsa_on_develop
ci_testinfra_as_code
ci_update_build_nasmesh
code-cleanup-20210716
debug-UL-5GRECORDS
debug_UL_signal
develop
develop-CCE
develop-NR_SA_F1AP_5GRECORDS
develop-NR_SA_F1AP_5GRECORDS-abs
develop-NR_SA_F1AP_5GRECORDS-hs
develop-NR_SA_F1AP_5GRECORDS-hs1
develop-NR_SA_F1AP_5GRECORDS-lts
develop-NR_SA_F1AP_5GRECORDS-lts-wf
develop-NR_SA_F1AP_5GRECORDS_100M
develop-NR_SA_F1AP_5GRECORDS_lfq_0607
develop-NSA_SA_fixes
develop-aw2sori
develop-wf-du
develop_fpga_ldpc
dongzhanyi-zte-develop1
episys-merge
fedora-gen-kernel-fix
fix-check
fix-compile
fix-lte-ue-modem-in-docker-container
fix-physim-deploy
fix-physim-run-script-on-cluster
fix-retransmission-rbg
fix_nr_ulsim
flexran-rtc-repo-is-public
hack-bch-no-sched-sf-0
integration_2021_wk18_a
integration_2021_wk18_b
integration_2021_wk19
integration_2021_wk20_a
integration_2021_wk22
integration_2021_wk23
integration_2021_wk27
integration_2021_wk28
integration_2021_wk30
integration_2021_wk30_b
ldpc_offload_t1
migrate-vm-pipeline-to-bionic
nfapi_nr_arch_mod
nr-dl-mimo-2layer
nr-dmrs-fixes
nr-pdcp-small-bugfixes
nr_improve_chanest
nr_ue_remove_high_speed_flag
oairu
phy-asan-fixes
physim-deploy-handle-error-cases
prb_based_dl_channel_estimation
rh_ci_test_benetel
rh_ci_test_nsa
rh_ci_test_rfsim_sa
scs_60_iisc
test-5GREC
test-nsa-benetel
wf_testc
2021.w30
2021.w29
2021.w28
2021.w27
2021.w26
2021.w25
2021.w24
2021.w23
2021.w22
2021.w20
2021.w19
2021.w18_b
2021.w18_a
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
42 additions
and
4 deletions
+42
-4
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
+39
-4
openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h
openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h
+3
-0
No files found.
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
View file @
81873616
...
...
@@ -745,6 +745,34 @@ long get_K2(const NR_BWP_Uplink_t *ubwp, int time_domain_assignment, int mu) {
return
3
;
}
bool
nr_UE_is_to_be_scheduled
(
module_id_t
mod_id
,
int
CC_id
,
int
UE_id
,
frame_t
frame
,
sub_frame_t
slot
)
{
const
NR_ServingCellConfigCommon_t
*
scc
=
RC
.
nrmac
[
mod_id
]
->
common_channels
->
ServingCellConfigCommon
;
const
uint8_t
slots_per_frame
[
5
]
=
{
10
,
20
,
40
,
80
,
160
};
const
int
n
=
slots_per_frame
[
*
scc
->
ssbSubcarrierSpacing
];
const
int
now
=
frame
*
n
+
slot
;
const
struct
gNB_MAC_INST_s
*
nrmac
=
RC
.
nrmac
[
mod_id
];
const
NR_UE_sched_ctrl_t
*
sched_ctrl
=
&
nrmac
->
UE_info
.
UE_sched_ctrl
[
UE_id
];
const
int
last_ul_sched
=
sched_ctrl
->
last_ul_frame
*
n
+
sched_ctrl
->
last_ul_slot
;
const
int
diff
=
(
now
-
last_ul_sched
+
1024
*
n
)
%
(
1024
*
n
);
/* UE is to be scheduled if
* (1) we think the UE has more bytes awaiting than what we scheduled
* (2) there is a scheduling request
* (3) or we did not schedule it in more than 10 frames */
const
bool
has_data
=
sched_ctrl
->
estimated_ul_buffer
>
sched_ctrl
->
sched_ul_bytes
;
const
bool
high_inactivity
=
diff
>=
10
*
n
;
LOG_D
(
MAC
,
"%4d.%2d UL inactivity %d slots has_data %d SR %d
\n
"
,
frame
,
slot
,
diff
,
has_data
,
sched_ctrl
->
SR
);
return
has_data
||
sched_ctrl
->
SR
||
high_inactivity
;
}
int
next_list_entry_looped
(
NR_list_t
*
list
,
int
UE_id
)
{
if
(
UE_id
<
0
)
...
...
@@ -924,12 +952,16 @@ void pf_ul(module_id_t module_id,
continue
;
}
if
(
sched_ctrl
->
estimated_ul_buffer
-
sched_ctrl
->
sched_ul_bytes
<=
0
&&
!
sched_ctrl
->
SR
)
const
int
B
=
max
(
0
,
sched_ctrl
->
estimated_ul_buffer
-
sched_ctrl
->
sched_ul_bytes
);
/* preprocessor computed sched_frame/sched_slot */
const
bool
do_sched
=
nr_UE_is_to_be_scheduled
(
module_id
,
0
,
UE_id
,
sched_pusch
->
frame
,
sched_pusch
->
slot
);
if
(
B
==
0
&&
!
do_sched
)
continue
;
/* Schedule UE
if there is a SR
and no data (otherwise, will be scheduled
* ba
d
ed on data to transmit) */
if
(
sched_ctrl
->
estimated_ul_buffer
-
sched_ctrl
->
sched_ul_bytes
<=
0
&&
sched_ctrl
->
SR
)
{
/* Schedule UE
on SR or UL inactivity
and no data (otherwise, will be scheduled
* ba
s
ed on data to transmit) */
if
(
B
==
0
&&
do_sched
)
{
/* if no data, pre-allocate 5RB */
bool
freeCCE
=
find_free_CCE
(
module_id
,
slot
,
UE_id
);
if
(
!
freeCCE
)
{
...
...
@@ -1212,6 +1244,7 @@ void nr_schedule_ulsch(module_id_t module_id, frame_t frame, sub_frame_t slot)
for
(
int
UE_id
=
UE_list
->
head
;
UE_id
>=
0
;
UE_id
=
UE_list
->
next
[
UE_id
])
{
NR_UE_sched_ctrl_t
*
sched_ctrl
=
&
UE_info
->
UE_sched_ctrl
[
UE_id
];
UE_info
->
mac_stats
[
UE_id
].
ulsch_current_bytes
=
0
;
/* dynamic PUSCH values (RB alloc, MCS, hence R, Qm, TBS) that change in
* every TTI are pre-populated by the preprocessor and used below */
NR_sched_pusch_t
*
sched_pusch
=
&
sched_ctrl
->
sched_pusch
;
...
...
@@ -1276,6 +1309,8 @@ void nr_schedule_ulsch(module_id_t module_id, frame_t frame, sub_frame_t slot)
cur_harq
->
ndi
);
}
UE_info
->
mac_stats
[
UE_id
].
ulsch_current_bytes
=
sched_pusch
->
tb_size
;
sched_ctrl
->
last_ul_frame
=
sched_pusch
->
frame
;
sched_ctrl
->
last_ul_slot
=
sched_pusch
->
slot
;
LOG_D
(
MAC
,
"%4d.%2d RNTI %04x UL sched %4d.%2d start %2d RBS %3d startSymbol %2d nb_symbol %2d MCS %2d TBS %4d HARQ PID %2d round %d NDI %d est %6d sched %6d est BSR %6d
\n
"
,
...
...
This diff is collapsed.
Click to expand it.
openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h
View file @
81873616
...
...
@@ -545,6 +545,9 @@ typedef struct {
NR_pdsch_semi_static_t
pdsch_semi_static
;
/// Sched PDSCH: scheduling decisions, copied into HARQ and cleared every TTI
NR_sched_pdsch_t
sched_pdsch
;
/// For UL synchronization: store last UL scheduling grant
frame_t
last_ul_frame
;
sub_frame_t
last_ul_slot
;
/// total amount of data awaiting for this UE
uint32_t
num_total_bytes
;
...
...
This diff is collapsed.
Click to expand it.
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