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
zzha zzha
OpenXG-RAN
Commits
2ffceb33
Commit
2ffceb33
authored
May 21, 2021
by
francescomani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
function for SR periodicity in mac common
parent
dbf3b724
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
63 additions
and
67 deletions
+63
-67
openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c
openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c
+60
-0
openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.h
openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.h
+2
-0
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c
+1
-63
openair2/LAYER2/NR_MAC_gNB/mac_proto.h
openair2/LAYER2/NR_MAC_gNB/mac_proto.h
+0
-4
No files found.
openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c
View file @
2ffceb33
...
...
@@ -3537,6 +3537,66 @@ void get_type0_PDCCH_CSS_config_parameters(NR_Type0_PDCCH_CSS_config_t *type0_PD
}
void
find_period_offest_SR
(
NR_SchedulingRequestResourceConfig_t
*
SchedulingReqRec
,
int
*
period
,
int
*
offset
)
{
NR_SchedulingRequestResourceConfig__periodicityAndOffset_PR
P_O
=
SchedulingReqRec
->
periodicityAndOffset
->
present
;
switch
(
P_O
){
case
NR_SchedulingRequestResourceConfig__periodicityAndOffset_PR_sl1
:
*
period
=
1
;
*
offset
=
SchedulingReqRec
->
periodicityAndOffset
->
choice
.
sl1
;
break
;
case
NR_SchedulingRequestResourceConfig__periodicityAndOffset_PR_sl2
:
*
period
=
2
;
*
offset
=
SchedulingReqRec
->
periodicityAndOffset
->
choice
.
sl2
;
break
;
case
NR_SchedulingRequestResourceConfig__periodicityAndOffset_PR_sl4
:
*
period
=
4
;
*
offset
=
SchedulingReqRec
->
periodicityAndOffset
->
choice
.
sl4
;
break
;
case
NR_SchedulingRequestResourceConfig__periodicityAndOffset_PR_sl5
:
*
period
=
5
;
*
offset
=
SchedulingReqRec
->
periodicityAndOffset
->
choice
.
sl5
;
break
;
case
NR_SchedulingRequestResourceConfig__periodicityAndOffset_PR_sl8
:
*
period
=
8
;
*
offset
=
SchedulingReqRec
->
periodicityAndOffset
->
choice
.
sl8
;
break
;
case
NR_SchedulingRequestResourceConfig__periodicityAndOffset_PR_sl10
:
*
period
=
10
;
*
offset
=
SchedulingReqRec
->
periodicityAndOffset
->
choice
.
sl10
;
break
;
case
NR_SchedulingRequestResourceConfig__periodicityAndOffset_PR_sl16
:
*
period
=
16
;
*
offset
=
SchedulingReqRec
->
periodicityAndOffset
->
choice
.
sl16
;
break
;
case
NR_SchedulingRequestResourceConfig__periodicityAndOffset_PR_sl20
:
*
period
=
20
;
*
offset
=
SchedulingReqRec
->
periodicityAndOffset
->
choice
.
sl20
;
break
;
case
NR_SchedulingRequestResourceConfig__periodicityAndOffset_PR_sl40
:
*
period
=
40
;
*
offset
=
SchedulingReqRec
->
periodicityAndOffset
->
choice
.
sl40
;
break
;
case
NR_SchedulingRequestResourceConfig__periodicityAndOffset_PR_sl80
:
*
period
=
80
;
*
offset
=
SchedulingReqRec
->
periodicityAndOffset
->
choice
.
sl80
;
break
;
case
NR_SchedulingRequestResourceConfig__periodicityAndOffset_PR_sl160
:
*
period
=
160
;
*
offset
=
SchedulingReqRec
->
periodicityAndOffset
->
choice
.
sl160
;
break
;
case
NR_SchedulingRequestResourceConfig__periodicityAndOffset_PR_sl320
:
*
period
=
320
;
*
offset
=
SchedulingReqRec
->
periodicityAndOffset
->
choice
.
sl320
;
break
;
case
NR_SchedulingRequestResourceConfig__periodicityAndOffset_PR_sl640
:
*
period
=
640
;
*
offset
=
SchedulingReqRec
->
periodicityAndOffset
->
choice
.
sl640
;
break
;
default:
AssertFatal
(
1
==
0
,
"No periodicityAndOffset resources found in schedulingrequestresourceconfig"
);
}
}
uint16_t
compute_pucch_prb_size
(
uint8_t
format
,
uint8_t
nr_prbs
,
uint16_t
O_tot
,
...
...
openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.h
View file @
2ffceb33
...
...
@@ -150,6 +150,8 @@ uint16_t compute_pucch_prb_size(uint8_t format,
int16_t
get_N_RA_RB
(
int
delta_f_RA_PRACH
,
int
delta_f_PUSCH
);
void
find_period_offest_SR
(
NR_SchedulingRequestResourceConfig_t
*
SchedulingReqRec
,
int
*
period
,
int
*
offset
);
bool
set_dl_ptrs_values
(
NR_PTRS_DownlinkConfig_t
*
ptrs_config
,
uint16_t
rbSize
,
uint8_t
mcsIndex
,
uint8_t
mcsTable
,
uint8_t
*
K_ptrs
,
uint8_t
*
L_ptrs
,
uint8_t
*
portIndex
,
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c
View file @
2ffceb33
...
...
@@ -1387,7 +1387,7 @@ void nr_sr_reporting(int Mod_idP, frame_t SFN, sub_frame_t slot)
int
SR_period
;
int
SR_offset
;
periodicity__SR
R
(
SchedulingRequestResourceConfig
,
&
SR_period
,
&
SR_offset
);
find_period_offest_S
R
(
SchedulingRequestResourceConfig
,
&
SR_period
,
&
SR_offset
);
// convert to int to avoid underflow of uint
int
sfn_sf
=
SFN
*
n_slots_frame
+
slot
;
if
((
sfn_sf
-
SR_offset
)
%
SR_period
!=
0
)
...
...
@@ -1456,65 +1456,3 @@ void nr_sr_reporting(int Mod_idP, frame_t SFN, sub_frame_t slot)
}
}
void
periodicity__SRR
(
NR_SchedulingRequestResourceConfig_t
*
SchedulingReqRec
,
int
*
period
,
int
*
offset
)
{
NR_SchedulingRequestResourceConfig__periodicityAndOffset_PR
P_O
=
SchedulingReqRec
->
periodicityAndOffset
->
present
;
switch
(
P_O
){
case
NR_SchedulingRequestResourceConfig__periodicityAndOffset_PR_sl1
:
*
period
=
1
;
*
offset
=
SchedulingReqRec
->
periodicityAndOffset
->
choice
.
sl1
;
break
;
case
NR_SchedulingRequestResourceConfig__periodicityAndOffset_PR_sl2
:
*
period
=
2
;
*
offset
=
SchedulingReqRec
->
periodicityAndOffset
->
choice
.
sl2
;
break
;
case
NR_SchedulingRequestResourceConfig__periodicityAndOffset_PR_sl4
:
*
period
=
4
;
*
offset
=
SchedulingReqRec
->
periodicityAndOffset
->
choice
.
sl4
;
break
;
case
NR_SchedulingRequestResourceConfig__periodicityAndOffset_PR_sl5
:
*
period
=
5
;
*
offset
=
SchedulingReqRec
->
periodicityAndOffset
->
choice
.
sl5
;
break
;
case
NR_SchedulingRequestResourceConfig__periodicityAndOffset_PR_sl8
:
*
period
=
8
;
*
offset
=
SchedulingReqRec
->
periodicityAndOffset
->
choice
.
sl8
;
break
;
case
NR_SchedulingRequestResourceConfig__periodicityAndOffset_PR_sl10
:
*
period
=
10
;
*
offset
=
SchedulingReqRec
->
periodicityAndOffset
->
choice
.
sl10
;
break
;
case
NR_SchedulingRequestResourceConfig__periodicityAndOffset_PR_sl16
:
*
period
=
16
;
*
offset
=
SchedulingReqRec
->
periodicityAndOffset
->
choice
.
sl16
;
break
;
case
NR_SchedulingRequestResourceConfig__periodicityAndOffset_PR_sl20
:
*
period
=
20
;
*
offset
=
SchedulingReqRec
->
periodicityAndOffset
->
choice
.
sl20
;
break
;
case
NR_SchedulingRequestResourceConfig__periodicityAndOffset_PR_sl40
:
*
period
=
40
;
*
offset
=
SchedulingReqRec
->
periodicityAndOffset
->
choice
.
sl40
;
break
;
case
NR_SchedulingRequestResourceConfig__periodicityAndOffset_PR_sl80
:
*
period
=
80
;
*
offset
=
SchedulingReqRec
->
periodicityAndOffset
->
choice
.
sl80
;
break
;
case
NR_SchedulingRequestResourceConfig__periodicityAndOffset_PR_sl160
:
*
period
=
160
;
*
offset
=
SchedulingReqRec
->
periodicityAndOffset
->
choice
.
sl160
;
break
;
case
NR_SchedulingRequestResourceConfig__periodicityAndOffset_PR_sl320
:
*
period
=
320
;
*
offset
=
SchedulingReqRec
->
periodicityAndOffset
->
choice
.
sl320
;
break
;
case
NR_SchedulingRequestResourceConfig__periodicityAndOffset_PR_sl640
:
*
period
=
640
;
*
offset
=
SchedulingReqRec
->
periodicityAndOffset
->
choice
.
sl640
;
break
;
default:
AssertFatal
(
1
==
0
,
"No periodicityAndOffset resources found in schedulingrequestresourceconfig"
);
}
}
openair2/LAYER2/NR_MAC_gNB/mac_proto.h
View file @
2ffceb33
...
...
@@ -416,8 +416,4 @@ bool nr_find_nb_rb(uint16_t Qm,
void
nr_sr_reporting
(
int
Mod_idP
,
frame_t
frameP
,
sub_frame_t
slotP
);
void
periodicity__SRR
(
NR_SchedulingRequestResourceConfig_t
*
SchedulingReqRecconf
,
int
*
period
,
int
*
offset
);
#endif
/*__LAYER2_NR_MAC_PROTO_H__*/
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