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
eb45cb86
Commit
eb45cb86
authored
Jan 19, 2021
by
Robert Schmidt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Only check for SR at beginning of frame (slot 0)
parent
e6033d24
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
21 deletions
+35
-21
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c
+3
-2
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c
+32
-19
No files found.
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c
View file @
eb45cb86
...
...
@@ -417,8 +417,9 @@ void gNB_dlsch_ulsch_scheduler(module_id_t module_idP,
schedule_nr_prach
(
module_idP
,
f
,
s
);
}
// This schedule SR
nr_sr_reporting
(
module_idP
,
frame
,
slot
);
// Schedule SR: check in slot 0 for the whole frame
if
(
slot
==
0
)
nr_sr_reporting
(
module_idP
,
frame
,
slot
);
// Schedule CSI measurement reporting: check in slot 0 for the whole frame
if
(
slot
==
0
)
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c
View file @
eb45cb86
...
...
@@ -764,30 +764,43 @@ void nr_sr_reporting(int Mod_idP, frame_t SFN, sub_frame_t slot)
int
SR_period
;
int
SR_offset
;
periodicity__SRR
(
SchedulingRequestResourceConfig
,
&
SR_period
,
&
SR_offset
);
//for (int SRslot=0;SRslot<n_slots_frame;j++){
if
(((
SFN
*
n_slots_frame
)
+
slot
-
SR_offset
)
%
SR_period
==
0
){
NR_PUCCH_ResourceId_t
*
PucchResourceId
=
SchedulingRequestResourceConfig
->
resource
;
const
int
num_SRs
=
n_slots_frame
/
SR_period
;
AssertFatal
(
num_SRs
<=
2
,
"cannot handle more than 2 SRs per frame, but have %d!
\n
"
,
num_SRs
);
const
bool
SR_even
=
!
(
n_slots_frame
%
SR_period
);
AssertFatal
(
SR_even
,
"cannot handle SR periodicity not evenly dividing number of slots
\n
"
);
// first condition: SR every frame; second condition: less than every frame
if
(
!
(
SR_period
<
n_slots_frame
||
SFN
%
(
SR_period
/
n_slots_frame
)
==
SR_offset
/
n_slots_frame
))
return
;
NR_PUCCH_ResourceId_t
*
PucchResourceId
=
SchedulingRequestResourceConfig
->
resource
;
int
found
=
-
1
;
pucchresset
=
pucch_Config
->
resourceSetToAddModList
->
list
.
array
[
0
];
// set with formats 0,1
int
n_list
=
pucchresset
->
resourceList
.
list
.
count
;
for
(
int
i
=
0
;
i
<
n_list
;
i
++
)
{
if
(
*
pucchresset
->
resourceList
.
list
.
array
[
i
]
==
*
PucchResourceId
)
found
=
i
;
}
AssertFatal
(
found
>-
1
,
"SR resource not found among PUCCH resources"
);
curr_pucch
=
&
UE_info
->
UE_sched_ctrl
[
UE_id
].
sched_pucch
[
0
];
for
(
int
i
=
0
;
i
<
num_SRs
;
++
i
)
{
curr_pucch
=
&
UE_info
->
UE_sched_ctrl
[
UE_id
].
sched_pucch
[
i
];
curr_pucch
->
sr_flag
=
true
;
curr_pucch
->
frame
=
SFN
;
curr_pucch
->
ul_slot
=
slot
;
int
found
=
-
1
;
pucchresset
=
pucch_Config
->
resourceSetToAddModList
->
list
.
array
[
0
];
// set with formats 0,1
int
n_list
=
pucchresset
->
resourceList
.
list
.
count
;
for
(
int
i
=
0
;
i
<
n_list
;
i
++
)
{
if
(
*
pucchresset
->
resourceList
.
list
.
array
[
i
]
==
*
PucchResourceId
)
found
=
i
;
}
AssertFatal
(
found
>-
1
,
"SR resource not found among PUCCH resources"
);
curr_pucch
->
ul_slot
=
(
i
*
SR_period
+
SR_offset
)
%
n_slots_frame
;
// first, start on slot 0
curr_pucch
->
resource_indicator
=
found
;
LOG_I
(
MAC
,
"Scheduling Request identified for frame %d slot %d with %d SR bit
\n
"
,
SFN
,
slot
,
curr_pucch
->
sr_flag
);
LOG_D
(
MAC
,
"Scheduling Request for %4d.%2d with SR bit %d sched_pucch %d resource %d
\n
"
,
curr_pucch
->
frame
,
curr_pucch
->
ul_slot
,
curr_pucch
->
sr_flag
,
i
,
curr_pucch
->
resource_indicator
);
}
}
}
...
...
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