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
8d0cd5b1
Commit
8d0cd5b1
authored
Sep 13, 2019
by
Florian Kaltenberger
Committed by
Florian Kaltenberger
Sep 24, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
the gNB scheduler now schedules both UL and DL
parent
8f1532d2
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
29 additions
and
94 deletions
+29
-94
openair1/SCHED_NR/phy_procedures_nr_gNB.c
openair1/SCHED_NR/phy_procedures_nr_gNB.c
+1
-1
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c
+21
-90
openair2/LAYER2/NR_MAC_gNB/mac_proto.h
openair2/LAYER2/NR_MAC_gNB/mac_proto.h
+3
-1
openair2/NR_PHY_INTERFACE/NR_IF_Module.c
openair2/NR_PHY_INTERFACE/NR_IF_Module.c
+4
-2
No files found.
openair1/SCHED_NR/phy_procedures_nr_gNB.c
View file @
8d0cd5b1
...
...
@@ -252,7 +252,7 @@ void nr_ulsch_procedures(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx, int UE_id
harq_pid
,
0
);
if
(
ret
>
gNB
->
ulsch
[
UE_id
+
1
][
0
]
->
max_ldpc_iterations
)
if
(
ret
>
gNB
->
ulsch
[
UE_id
][
0
]
->
max_ldpc_iterations
)
LOG_I
(
PHY
,
"ULSCH in error
\n
"
);
else
LOG_I
(
PHY
,
"ULSCH received ok
\n
"
);
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c
View file @
8d0cd5b1
...
...
@@ -295,8 +295,11 @@ void copy_nr_ulreq(module_id_t module_idP, frame_t frameP, sub_frame_t slotP)
*/
void
gNB_dlsch_ulsch_scheduler
(
module_id_t
module_idP
,
frame_t
frameP
,
sub_frame_t
slotP
){
frame_t
frame_rxP
,
sub_frame_t
slot_rxP
,
frame_t
frame_txP
,
sub_frame_t
slot_txP
){
protocol_ctxt_t
ctxt
;
int
CC_id
,
i
=
-
1
;
...
...
@@ -308,8 +311,8 @@ void gNB_dlsch_ulsch_scheduler(module_id_t module_idP,
start_meas
(
&
RC
.
nrmac
[
module_idP
]
->
eNB_scheduler
);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_ENB_DLSCH_ULSCH_SCHEDULER
,
VCD_FUNCTION_IN
);
RC
.
nrmac
[
module_idP
]
->
frame
=
frameP
;
RC
.
nrmac
[
module_idP
]
->
slot
=
slotP
;
RC
.
nrmac
[
module_idP
]
->
frame
=
frame
_rx
P
;
RC
.
nrmac
[
module_idP
]
->
slot
=
slot
_rx
P
;
for
(
CC_id
=
0
;
CC_id
<
MAX_NUM_CCs
;
CC_id
++
)
{
...
...
@@ -319,7 +322,7 @@ void gNB_dlsch_ulsch_scheduler(module_id_t module_idP,
memset
(
cc
[
CC_id
].
vrb_map
,
0
,
100
);
memset
(
cc
[
CC_id
].
vrb_map_UL
,
0
,
100
);
clear_nr_nfapi_information
(
RC
.
nrmac
[
module_idP
],
CC_id
,
frame
P
,
slot
P
);
clear_nr_nfapi_information
(
RC
.
nrmac
[
module_idP
],
CC_id
,
frame
_txP
,
slot_tx
P
);
}
// refresh UE list based on UEs dropped by PHY in previous subframe
...
...
@@ -333,16 +336,16 @@ void gNB_dlsch_ulsch_scheduler(module_id_t module_idP,
if
(
nr_is_dci_opportunity
(
search_space
,
coreset
,
frameP
,
slotP
,
frame
_tx
P
,
slot
_tx
P
,
*
cfg
))
nr_schedule_uss_dlsch_phytest
(
module_idP
,
frame
P
,
slot
P
);
nr_schedule_uss_dlsch_phytest
(
module_idP
,
frame
_txP
,
slot_tx
P
);
rnti
=
UE_RNTI
(
module_idP
,
i
);
CC_id
=
UE_PCCID
(
module_idP
,
i
);
//int spf = get_spf(cfg);
if
(((
frame
P
&
127
)
==
0
)
&&
(
slot
P
==
0
))
{
if
(((
frame
_txP
&
127
)
==
0
)
&&
(
slot_tx
P
==
0
))
{
LOG_I
(
MAC
,
"UE rnti %x : %s, PHR %d dB DL CQI %d PUSCH SNR %d PUCCH SNR %d
\n
"
,
rnti
,
...
...
@@ -354,107 +357,35 @@ void gNB_dlsch_ulsch_scheduler(module_id_t module_idP,
(
UE_list
->
UE_sched_ctrl
[
i
].
pucch1_snr
[
CC_id
]
-
128
)
/
2
);
}
RC
.
gNB
[
module_idP
][
CC_id
]
->
pusch_stats_bsr
[
i
][
to_absslot
(
cfg
,
frameP
,
slotP
)]
=
-
63
;
if
(
i
==
UE_list
->
head
)
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME
(
VCD_SIGNAL_DUMPER_VARIABLES_UE0_BSR
,
RC
.
gNB
[
module_idP
][
CC_id
]
->
pusch_stats_bsr
[
i
][
to_absslot
(
cfg
,
frameP
,
slotP
)]);
// increment this, it is cleared when we receive an sdu
RC
.
nrmac
[
module_idP
]
->
UE_list
.
UE_sched_ctrl
[
i
].
ul_inactivity_timer
++
;
RC
.
nrmac
[
module_idP
]
->
UE_list
.
UE_sched_ctrl
[
i
].
cqi_req_timer
++
;
LOG_D
(
MAC
,
"UE %d/%x : ul_inactivity %d, cqi_req %d
\n
"
,
i
,
rnti
,
RC
.
nrmac
[
module_idP
]
->
UE_list
.
UE_sched_ctrl
[
i
].
ul_inactivity_timer
,
RC
.
nrmac
[
module_idP
]
->
UE_list
.
UE_sched_ctrl
[
i
].
cqi_req_timer
);
//check_nr_ul_failure(module_idP, CC_id, i, frameP, subframeP);
if
(
RC
.
nrmac
[
module_idP
]
->
UE_list
.
UE_sched_ctrl
[
i
].
ue_reestablishment_reject_timer
>
0
)
{
RC
.
nrmac
[
module_idP
]
->
UE_list
.
UE_sched_ctrl
[
i
].
ue_reestablishment_reject_timer
++
;
if
(
RC
.
nrmac
[
module_idP
]
->
UE_list
.
UE_sched_ctrl
[
i
].
ue_reestablishment_reject_timer
>=
RC
.
nrmac
[
module_idP
]
->
UE_list
.
UE_sched_ctrl
[
i
].
ue_reestablishment_reject_timer_thres
)
{
RC
.
nrmac
[
module_idP
]
->
UE_list
.
UE_sched_ctrl
[
i
].
ue_reestablishment_reject_timer
=
0
;
for
(
int
ue_id_l
=
0
;
ue_id_l
<
MAX_MOBILES_PER_GNB
;
ue_id_l
++
)
{
if
(
reestablish_rnti_map
[
ue_id_l
][
0
]
==
rnti
)
{
// clear currentC-RNTI from map
reestablish_rnti_map
[
ue_id_l
][
0
]
=
0
;
reestablish_rnti_map
[
ue_id_l
][
1
]
=
0
;
break
;
}
}
// Note: This should not be done in the MAC!
for
(
int
ii
=
0
;
ii
<
MAX_MOBILES_PER_GNB
;
ii
++
)
{
NR_gNB_ULSCH_t
*
ulsch
=
RC
.
gNB
[
module_idP
][
CC_id
]
->
ulsch
[
ii
][
0
];
if
((
ulsch
!=
NULL
)
&&
(
ulsch
->
rnti
==
rnti
)){
LOG_W
(
MAC
,
"TODO: clean_eNb_ulsch UE %x
\n
"
,
rnti
);
clean_gNB_ulsch
(
ulsch
);
}
}
for
(
int
ii
=
0
;
ii
<
MAX_MOBILES_PER_GNB
;
ii
++
)
{
NR_gNB_DLSCH_t
*
dlsch
=
RC
.
gNB
[
module_idP
][
CC_id
]
->
dlsch
[
ii
][
0
];
if
((
dlsch
!=
NULL
)
&&
(
dlsch
->
rnti
==
rnti
)){
LOG_W
(
MAC
,
"TODO: clean_eNb_dlsch UE %x
\n
"
,
rnti
);
clean_gNB_dlsch
(
dlsch
);
}
}
/*
for(int j = 0; j < 10; j++){
nfapi_ul_config_request_body_t *ul_req_tmp = NULL;
ul_req_tmp = &RC.nrmac[module_idP]->UL_req_tmp[CC_id][j].ul_config_request_body;
if(ul_req_tmp){
int pdu_number = ul_req_tmp->number_of_pdus;
for(int pdu_index = pdu_number-1; pdu_index >= 0; pdu_index--){
if(ul_req_tmp->ul_config_pdu_list[pdu_index].ulsch_pdu.ulsch_pdu_rel8.rnti == rnti){
LOG_I(MAC, "remove UE %x from ul_config_pdu_list %d/%d\n", rnti, pdu_index, pdu_number);
if(pdu_index < pdu_number -1){
memcpy(&ul_req_tmp->ul_config_pdu_list[pdu_index], &ul_req_tmp->ul_config_pdu_list[pdu_index+1], (pdu_number-1-pdu_index) * sizeof(nfapi_ul_config_request_pdu_t));
}
ul_req_tmp->number_of_pdus--;
}
}
}
}
rrc_mac_remove_ue(module_idP,rnti);
*/
}
}
//END if (RC.nrmac[module_idP]->UE_list.UE_sched_ctrl[i].ue_reestablishment_reject_timer > 0)
}
//END if (UE_list->active[i])
}
//END for (i = 0; i < MAX_MOBILES_PER_GNB; i++)
PROTOCOL_CTXT_SET_BY_MODULE_ID
(
&
ctxt
,
module_idP
,
ENB_FLAG_YES
,
NOT_A_RNTI
,
frame
P
,
slot
P
,
module_idP
);
PROTOCOL_CTXT_SET_BY_MODULE_ID
(
&
ctxt
,
module_idP
,
ENB_FLAG_YES
,
NOT_A_RNTI
,
frame
_txP
,
slot_tx
P
,
module_idP
);
pdcp_run
(
&
ctxt
);
//rrc_rx_tx(&ctxt, CC_id);
// This schedules MIB
if
((
slot
P
==
0
)
&&
(
frame
P
&
7
)
==
0
){
schedule_nr_mib
(
module_idP
,
frame
P
,
slot
P
);
if
((
slot
_txP
==
0
)
&&
(
frame_tx
P
&
7
)
==
0
){
schedule_nr_mib
(
module_idP
,
frame
_txP
,
slot_tx
P
);
}
// Phytest scheduling
if
(
slotP
==
2
)
nr_schedule_uss_ulsch_phytest
(
module_idP
,
frame
P
,
slot
P
);
if
(
slot
_rx
P
==
2
)
nr_schedule_uss_ulsch_phytest
(
module_idP
,
frame
_rxP
,
slot_rx
P
);
if
(
slotP
==
1
)
nr_schedule_uss_dlsch_phytest
(
module_idP
,
frame
P
,
slot
P
);
if
(
slot
_tx
P
==
1
)
nr_schedule_uss_dlsch_phytest
(
module_idP
,
frame
_txP
,
slot_tx
P
);
/*
// Allocate CCEs for good after scheduling is done
for (CC_id = 0; CC_id < MAX_NUM_CCs; CC_id++)
allocate_CCEs(module_idP, CC_id, subframeP, 0);
*/
stop_meas
(
&
RC
.
nrmac
[
module_idP
]
->
eNB_scheduler
);
*/
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_ENB_DLSCH_ULSCH_SCHEDULER
,
VCD_FUNCTION_OUT
);
}
openair2/LAYER2/NR_MAC_gNB/mac_proto.h
View file @
8d0cd5b1
...
...
@@ -64,7 +64,9 @@ void clear_nr_nfapi_information(gNB_MAC_INST * gNB,
frame_t
frameP
,
sub_frame_t
subframeP
);
void
gNB_dlsch_ulsch_scheduler
(
module_id_t
module_idP
,
frame_t
frameP
,
sub_frame_t
subframeP
);
void
gNB_dlsch_ulsch_scheduler
(
module_id_t
module_idP
,
frame_t
frame_txP
,
sub_frame_t
slot_txP
,
frame_t
frame_rxP
,
sub_frame_t
slot_rxP
);
void
schedule_nr_mib
(
module_id_t
module_idP
,
frame_t
frameP
,
sub_frame_t
subframeP
);
...
...
openair2/NR_PHY_INTERFACE/NR_IF_Module.c
View file @
8d0cd5b1
...
...
@@ -312,6 +312,8 @@ void NR_UL_indication(NR_UL_IND_t *UL_info)
int
spf
=
get_spf
(
cfg
);
gNB_dlsch_ulsch_scheduler
(
module_id
,
UL_info
->
frame
,
UL_info
->
slot
,
(
UL_info
->
frame
+
((
UL_info
->
slot
>
(
spf
-
1
-
sf_ahead
))
?
1
:
0
))
%
1024
,
(
UL_info
->
slot
+
sf_ahead
)
%
spf
);
...
...
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