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
alex037yang
OpenXG-RAN
Commits
96dbf14d
Commit
96dbf14d
authored
Mar 12, 2020
by
Robert Schmidt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rewrite gNB_dlsch_ulsch_scheduler()
parent
c6182d3e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
37 additions
and
59 deletions
+37
-59
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c
+37
-59
No files found.
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c
View file @
96dbf14d
...
@@ -310,90 +310,68 @@ void gNB_dlsch_ulsch_scheduler(module_id_t module_idP,
...
@@ -310,90 +310,68 @@ void gNB_dlsch_ulsch_scheduler(module_id_t module_idP,
//printf("gNB_dlsch_ulsch_scheduler frameRX %d slotRX %d frameTX %d slotTX %d\n",frame_rxP,slot_rxP,frame_txP,slot_txP);
//printf("gNB_dlsch_ulsch_scheduler frameRX %d slotRX %d frameTX %d slotTX %d\n",frame_rxP,slot_rxP,frame_txP,slot_txP);
protocol_ctxt_t
ctxt
;
protocol_ctxt_t
ctxt
;
int
CC_id
,
i
=
-
1
,
UE_id
=
0
;
int
CC_id
,
UE_id
=
0
;
gNB_MAC_INST
*
gNB
=
RC
.
nrmac
[
module_idP
];
gNB_MAC_INST
*
gNB
=
RC
.
nrmac
[
module_idP
];
NR_UE_list_t
*
UE_list
=
&
gNB
->
UE_list
;
NR_UE_list_t
*
UE_list
=
&
gNB
->
UE_list
;
rnti_t
rnti
;
UE_sched_ctrl_t
*
ue_sched_ctl
=
&
UE_list
->
UE_sched_ctrl
[
UE_id
];
UE_sched_ctrl_t
*
ue_sched_ctl
=
&
UE_list
->
UE_sched_ctrl
[
UE_id
];
NR_COMMON_channels_t
*
cc
=
gNB
->
common_channels
;
NR_COMMON_channels_t
*
cc
=
gNB
->
common_channels
;
start_meas
(
&
RC
.
nrmac
[
module_idP
]
->
eNB_scheduler
);
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
);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_ENB_DLSCH_ULSCH_SCHEDULER
,
VCD_FUNCTION_IN
);
// This originally followed the pdcp_run() call, so it might be useless
//PROTOCOL_CTXT_SET_BY_MODULE_ID(&ctxt, module_idP, ENB_FLAG_YES,NOT_A_RNTI, frame_txP, slot_txP,module_idP);
pdcp_run
(
&
ctxt
);
pdcp_run
(
&
ctxt
);
//rrc_rx_tx(&ctxt, CC_id);
//rrc_rx_tx(&ctxt, CC_id);
RC
.
nrmac
[
module_idP
]
->
frame
=
frame_rxP
;
RC
.
nrmac
[
module_idP
]
->
frame
=
frame_rxP
;
RC
.
nrmac
[
module_idP
]
->
slot
=
slot_rxP
;
RC
.
nrmac
[
module_idP
]
->
slot
=
slot_rxP
;
// Check if there are downlink symbols in the slot,
if
(
is_nr_DL_slot
(
cc
->
ServingCellConfigCommon
,
slot_txP
))
{
memset
(
RC
.
nrmac
[
module_idP
]
->
cce_list
[
1
][
0
],
0
,
MAX_NUM_CCE
*
sizeof
(
int
));
memset
(
RC
.
nrmac
[
module_idP
]
->
cce_list
[
1
][
0
],
0
,
MAX_NUM_CCE
*
sizeof
(
int
));
for
(
CC_id
=
0
;
CC_id
<
MAX_NUM_CCs
;
CC_id
++
)
{
for
(
CC_id
=
0
;
CC_id
<
MAX_NUM_CCs
;
CC_id
++
)
{
//mbsfn_status[CC_id] = 0;
// clear vrb_maps
memset
(
cc
[
CC_id
].
vrb_map
,
0
,
100
);
memset
(
cc
[
CC_id
].
vrb_map
,
0
,
100
);
memset
(
cc
[
CC_id
].
vrb_map_UL
,
0
,
100
);
memset
(
cc
[
CC_id
].
vrb_map_UL
,
0
,
100
);
clear_nr_nfapi_information
(
RC
.
nrmac
[
module_idP
],
CC_id
,
frame_txP
,
slot_txP
);
clear_nr_nfapi_information
(
RC
.
nrmac
[
module_idP
],
CC_id
,
frame_txP
,
slot_txP
);
}
}
// refresh UE list based on UEs dropped by PHY in previous subframe
// Check if there are downlink symbols in the slot,
/*
if
(
is_nr_DL_slot
(
cc
->
ServingCellConfigCommon
,
slot_txP
))
{
for (i = 0; i < MAX_MOBILES_PER_GNB; i++) {
// This schedules MIB
if (UE_list->active[i]) {
if
((
slot_txP
==
0
)
&&
(
frame_txP
&
7
)
==
0
)
{
schedule_nr_mib
(
module_idP
,
frame_txP
,
slot_txP
);
nfapi_nr_config_request_t *cfg = &RC.nrmac[module_idP]->config[CC_id];
}
rnti = 0;//UE_RNTI(module_idP, i);
CC_id = 0;//UE_PCCID(module_idP, i);
} //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_txP
,
slot_txP
,
module_idP
);
// This schedules MIB
if
((
slot_txP
==
0
)
&&
(
frame_txP
&
7
)
==
0
){
schedule_nr_mib
(
module_idP
,
frame_txP
,
slot_txP
);
}
// TbD once RACH is available, start ta_timer when UE is connected
if
(
ue_sched_ctl
->
ta_timer
)
ue_sched_ctl
->
ta_timer
--
;
if
(
ue_sched_ctl
->
ta_timer
==
0
)
{
gNB
->
ta_command
=
ue_sched_ctl
->
ta_update
;
/* if time is up, then set the timer to not send it for 5 frames
// regardless of the TA value */
ue_sched_ctl
->
ta_timer
=
100
;
/* reset ta_update */
ue_sched_ctl
->
ta_update
=
31
;
/* MAC CE flag indicating TA length */
gNB
->
ta_len
=
2
;
}
// Phytest scheduling
if
(
get_softmodem_params
()
->
phy_test
&&
slot_txP
==
1
){
nr_schedule_uss_dlsch_phytest
(
module_idP
,
frame_txP
,
slot_txP
,
NULL
);
// resetting ta flag
gNB
->
ta_len
=
0
;
}
/*
// TODO once RACH is available, start ta_timer when UE is connected
// Allocate CCEs for good after scheduling is done
if
(
ue_sched_ctl
->
ta_timer
)
for (CC_id = 0; CC_id < MAX_NUM_CCs; CC_id++)
ue_sched_ctl
->
ta_timer
--
;
allocate_CCEs(module_idP, CC_id, subframeP, 0);
*/
if
(
ue_sched_ctl
->
ta_timer
==
0
)
{
gNB
->
ta_command
=
ue_sched_ctl
->
ta_update
;
/* if time is up, then set the timer to not send it for 5 frames
// regardless of the TA value */
ue_sched_ctl
->
ta_timer
=
100
;
/* reset ta_update */
ue_sched_ctl
->
ta_update
=
31
;
/* MAC CE flag indicating TA length */
gNB
->
ta_len
=
2
;
}
}
//is_nr_DL_slot
if
(
slot_txP
==
1
)
{
//if (get_softmodem_params()->phy_test)
// nr_schedule_uss_dlsch_phytest(module_idP, frame_txP, slot_txP, NULL);
//else
nr_schedule_uss_dlsch_phytest
(
module_idP
,
frame_txP
,
slot_txP
);
if
(
is_nr_UL_slot
(
cc
->
ServingCellConfigCommon
,
slot_rxP
))
{
// resetting ta flag
if
(
get_softmodem_params
()
->
phy_test
&&
slot_rxP
==
8
){
gNB
->
ta_len
=
0
;
nr_schedule_uss_ulsch_phytest
(
module_idP
,
frame_rxP
,
slot_rxP
);
}
}
}
// is_nr_DL_slot
if
(
is_nr_UL_slot
(
cc
->
ServingCellConfigCommon
,
slot_rxP
)
&&
slot_rxP
==
8
)
{
//if (get_softmodem_params()->phy_test)
// nr_schedule_uss_ulsch_phytest(module_idP, frame_rxP, slot_rxP);
//else
nr_schedule_uss_ulsch_phytest
(
module_idP
,
frame_rxP
,
slot_rxP
);
}
}
stop_meas
(
&
RC
.
nrmac
[
module_idP
]
->
eNB_scheduler
);
stop_meas
(
&
RC
.
nrmac
[
module_idP
]
->
eNB_scheduler
);
...
...
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