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
canghaiwuhen
OpenXG-RAN
Commits
1843440c
Commit
1843440c
authored
Dec 10, 2020
by
Francesco Mani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
code cleanup
parent
05df1be5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
109 additions
and
172 deletions
+109
-172
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c
+89
-114
openair2/RRC/NR/rrc_gNB_reconfig.c
openair2/RRC/NR/rrc_gNB_reconfig.c
+20
-58
No files found.
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c
View file @
1843440c
...
...
@@ -582,134 +582,109 @@ uint16_t compute_pucch_prb_size(uint8_t format,
}
void
nr_sr_reporting
(
int
Mod_idp
,
int
UE_id
,
sub_frame_t
slot
,
int
n_slots_frame
,
frame_t
SFN
,
int
*
PucchID
){
// for the SR functions/Imad/
void
nr_sr_reporting
(
int
Mod_idp
,
int
UE_id
,
sub_frame_t
slot
,
int
n_slots_frame
,
frame_t
SFN
,
int
*
PucchID
){
// is the slot is the same as sub-frame like it depends on the SCS (if it's 30 KHz then the subframe is 2 slots.
NR_UE_info_t
*
UE_info
=
&
RC
.
nrmac
[
Mod_idp
]
->
UE_info
;
NR_sched_pucch
*
curr_pucch
;
NR_SchedulingRequestResourceConfig_t
*
SchedulingRequestResourceConfig
;
NR_CellGroupConfig_t
*
secondaryCellGroup
=
UE_info
->
secondaryCellGroup
[
UE_id
];
NR_SchedulingRequestConfig_t
*
schedulingRequestConfig
=
secondaryCellGroup
->
mac_CellGroupConfig
->
schedulingRequestConfig
;
NR_BWP_Uplink_t
*
uwp
=
secondaryCellGroup
->
spCellConfig
->
spCellConfigDedicated
->
uplinkConfig
->
uplinkBWP_ToAddModList
->
list
.
array
[
0
];
NR_PUCCH_Config_t
*
pucch_Config
=
uwp
->
bwp_Dedicated
->
pucch_Config
->
choice
.
setup
;
NR_UE_info_t
*
UE_info
=
&
RC
.
nrmac
[
Mod_idp
]
->
UE_info
;
NR_sched_pucch
*
curr_pucch
;
NR_SchedulingRequestResourceConfig_t
*
SchedulingRequestResourceConfig
;
NR_CellGroupConfig_t
*
secondaryCellGroup
=
UE_info
->
secondaryCellGroup
[
UE_id
];
//NR_SchedulingRequestConfig_t *schedulingRequestConfig = secondaryCellGroup->mac_CellGroupConfig->schedulingRequestConfig;
NR_BWP_Uplink_t
*
uwp
=
secondaryCellGroup
->
spCellConfig
->
spCellConfigDedicated
->
uplinkConfig
->
uplinkBWP_ToAddModList
->
list
.
array
[
0
];
NR_PUCCH_Config_t
*
pucch_Config
=
uwp
->
bwp_Dedicated
->
pucch_Config
->
choice
.
setup
;
AssertFatal
(
pucch_Config
->
schedulingRequestResourceToAddModList
->
list
.
count
>
0
,
"NO SR configuration available"
);
for
(
int
SR_resource_id
=
0
;
SR_resource_id
<
pucch_Config
->
schedulingRequestResourceToAddModList
->
list
.
count
;
SR_resource_id
++
)
{
SchedulingRequestResourceConfig
=
pucch_Config
->
schedulingRequestResourceToAddModList
->
list
.
array
[
SR_resource_id
];
// to makesure later of the index.
NR_SchedulingRequestResourceId_t
schedulingRequestResourceId
=
SchedulingRequestResourceConfig
->
schedulingRequestResourceId
;
NR_SchedulingRequestId_t
schedulingRequest_ID
=
SchedulingRequestResourceConfig
->
schedulingRequestID
;
NR_PUCCH_ResourceId_t
*
PucchResourceId
=
SchedulingRequestResourceConfig
->
resource
;
for
(
int
SRConfig
=
0
;
SRConfig
<
schedulingRequestConfig
->
schedulingRequestToAddModList
->
list
.
count
;
SRConfig
++
){
NR_SchedulingRequestToAddMod_t
*
SchedulingRequestToAddMod
=
schedulingRequestConfig
->
schedulingRequestToAddModList
->
list
.
array
[
SRConfig
];
if
(
SchedulingRequestToAddMod
->
schedulingRequestId
==
schedulingRequest_ID
){
long
*
prohibitTimer
=
SchedulingRequestToAddMod
->
sr_ProhibitTimer
;}
}
for
(
int
SR_resource_id
=
0
;
SR_resource_id
<
pucch_Config
->
schedulingRequestResourceToAddModList
->
list
.
count
;
SR_resource_id
++
){
SchedulingRequestResourceConfig
=
pucch_Config
->
schedulingRequestResourceToAddModList
->
list
.
array
[
SR_resource_id
];
// to makesure later of the index.
//NR_SchedulingRequestResourceId_t schedulingRequestResourceId = SchedulingRequestResourceConfig->schedulingRequestResourceId;
//NR_SchedulingRequestId_t schedulingRequest_ID = SchedulingRequestResourceConfig->schedulingRequestID;
NR_PUCCH_ResourceId_t
*
PucchResourceId
=
SchedulingRequestResourceConfig
->
resource
;
int
SR_period
;
int
SR_offset
;
// not sure about the offset here.
// let's assume we retrieved the SCS and assign the periodicity based on that.
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
){
// not sure about SR_offset yet.
curr_pucch
=
&
UE_info
->
UE_sched_ctrl
[
UE_id
].
sched_pucch
[
slot
][
0
];
curr_pucch
->
sr_flag
=
true
;
curr_pucch
->
frame
=
SFN
;
curr_pucch
->
ul_slot
=
slot
;
*
PucchID
=
*
PucchResourceId
;
/*for (int SRConfig =0; SRConfig<schedulingRequestConfig->schedulingRequestToAddModList->list.count;SRConfig++){
NR_SchedulingRequestToAddMod_t *SchedulingRequestToAddMod = schedulingRequestConfig->schedulingRequestToAddModList->list.array[SRConfig];
if(SchedulingRequestToAddMod->schedulingRequestId == schedulingRequest_ID)
long *prohibitTimer = SchedulingRequestToAddMod->sr_ProhibitTimer;
}*/
LOG_I
(
MAC
,
"Scheduling Request identified for frame %d slot %d with %d SR bit
\n
"
,
SFN
,
slot
,
curr_pucch
->
sr_flag
);
}
}
}
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
){
// not sure about SR_offset yet.
curr_pucch
=
&
UE_info
->
UE_sched_ctrl
[
UE_id
].
sched_pucch
[
slot
][
0
];
curr_pucch
->
sr_flag
=
true
;
curr_pucch
->
frame
=
SFN
;
curr_pucch
->
ul_slot
=
slot
;
*
PucchID
=
*
PucchResourceId
;
LOG_I
(
MAC
,
"Scheduling Request identified for frame %d slot %d with %d SR bit
\n
"
,
SFN
,
slot
,
curr_pucch
->
sr_flag
);
}
}
}
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"
);
}
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/RRC/NR/rrc_gNB_reconfig.c
View file @
1843440c
...
...
@@ -121,7 +121,16 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco
ASN_SEQUENCE_ADD
(
&
secondaryCellGroup
->
rlc_BearerToAddModList
->
list
,
RLC_BearerConfig
);
secondaryCellGroup
->
mac_CellGroupConfig
=
calloc
(
1
,
sizeof
(
*
secondaryCellGroup
->
mac_CellGroupConfig
));
secondaryCellGroup
->
mac_CellGroupConfig
->
drx_Config
=
NULL
;
secondaryCellGroup
->
mac_CellGroupConfig
->
schedulingRequestConfig
=
NULL
;
secondaryCellGroup
->
mac_CellGroupConfig
->
schedulingRequestConfig
=
calloc
(
1
,
sizeof
(
*
secondaryCellGroup
->
mac_CellGroupConfig
->
schedulingRequestConfig
));
secondaryCellGroup
->
mac_CellGroupConfig
->
schedulingRequestConfig
->
schedulingRequestToAddModList
=
calloc
(
1
,
sizeof
(
*
secondaryCellGroup
->
mac_CellGroupConfig
->
schedulingRequestConfig
->
schedulingRequestToAddModList
));
NR_SchedulingRequestToAddMod_t
*
SchedulingRequestConf
=
calloc
(
1
,
sizeof
(
*
SchedulingRequestConf
));
SchedulingRequestConf
->
schedulingRequestId
=
0
;
//Could be changed
*
SchedulingRequestConf
->
sr_ProhibitTimer
=
NR_SchedulingRequestToAddMod__sr_ProhibitTimer_ms8
;
//could be changed
SchedulingRequestConf
->
sr_TransMax
=
NR_SchedulingRequestToAddMod__sr_TransMax_n32
;
;
//could be changed
ASN_SEQUENCE_ADD
(
&
secondaryCellGroup
->
mac_CellGroupConfig
->
schedulingRequestConfig
->
schedulingRequestToAddModList
->
list
,
SchedulingRequestConf
);
secondaryCellGroup
->
mac_CellGroupConfig
->
schedulingRequestConfig
->
schedulingRequestToReleaseList
=
NULL
;
secondaryCellGroup
->
mac_CellGroupConfig
->
bsr_Config
=
calloc
(
1
,
sizeof
(
*
secondaryCellGroup
->
mac_CellGroupConfig
->
bsr_Config
));
secondaryCellGroup
->
mac_CellGroupConfig
->
bsr_Config
->
periodicBSR_Timer
=
NR_BSR_Config__periodicBSR_Timer_sf80
;
secondaryCellGroup
->
mac_CellGroupConfig
->
bsr_Config
->
retxBSR_Timer
=
NR_BSR_Config__retxBSR_Timer_sf320
;
...
...
@@ -969,65 +978,18 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco
pucchfmt2
->
nrofSlots
=
NULL
;
pucchfmt2
->
pi2BPSK
=
NULL
;
pucchfmt2
->
simultaneousHARQ_ACK_CSI
=
NULL
;
pucch_Config
->
schedulingRequestResourceToAddModList
=
NULL
;
pucch_Config
->
schedulingRequestResourceToReleaseList
=
NULL
;
// for scheduling requestresource
pucch_Config
->
schedulingRequestResourceToAddModList
=
calloc
(
1
,
sizeof
(
*
pucch_Config
->
schedulingRequestResourceToAddModList
));
NR_SchedulingRequestResourceConfig_t
*
schedulingRequestResourceConfig
=
calloc
(
1
,
sizeof
(
*
schedulingRequestResourceConfig
));
schedulingRequestResourceConfig
->
schedulingRequestResourceId
=
0
;
schedulingRequestResourceConfig
->
schedulingRequestID
=
0
;
schedulingRequestResourceConfig
->
periodicityAndOffset
->
present
=
NR_SchedulingRequestResourceConfig__periodicityAndOffset_PR_sl10
;
//could be changed
schedulingRequestResourceConfig
->
periodicityAndOffset
->
choice
.
sl320
=
7
;
*
schedulingRequestResourceConfig
->
resource
=
1
;
ASN_SEQUENCE_ADD
(
&
pucch_Config
->
schedulingRequestResourceToAddModList
->
list
,
schedulingRequestResourceConfig
);
// for schedulingrequestconfig
secondaryCellGroup
->
mac_CellGroupConfig
->
schedulingRequestConfig
=
calloc
(
1
,
sizeof
(
*
secondaryCellGroup
->
mac_CellGroupConfig
->
schedulingRequestConfig
));
secondaryCellGroup
->
mac_CellGroupConfig
->
schedulingRequestConfig
->
schedulingRequestToAddModList
=
calloc
(
1
,
sizeof
(
*
secondaryCellGroup
->
mac_CellGroupConfig
->
schedulingRequestConfig
->
schedulingRequestToAddModList
));
secondaryCellGroup
->
mac_CellGroupConfig
->
schedulingRequestConfig
->
schedulingRequestToReleaseList
=
calloc
(
1
,
sizeof
(
*
secondaryCellGroup
->
mac_CellGroupConfig
->
schedulingRequestConfig
->
schedulingRequestToReleaseList
));
NR_SchedulingRequestToAddMod_t
*
SchedulingRequestConf
=
calloc
(
1
,
sizeof
(
*
SchedulingRequestConf
));
SchedulingRequestConf
->
schedulingRequestId
=
0
;
//Could be changed
*
SchedulingRequestConf
->
sr_ProhibitTimer
=
NR_SchedulingRequestToAddMod__sr_ProhibitTimer_ms8
;
//could be changed
SchedulingRequestConf
->
sr_TransMax
=
NR_SchedulingRequestToAddMod__sr_TransMax_n32
;
;
//could be changed
ASN_SEQUENCE_ADD
(
&
secondaryCellGroup
->
mac_CellGroupConfig
->
schedulingRequestConfig
->
schedulingRequestToAddModList
->
list
,
SchedulingRequestConf
);
// for scheduling requestresource
pucch_Config
->
schedulingRequestResourceToAddModList
=
calloc
(
1
,
sizeof
(
*
pucch_Config
->
schedulingRequestResourceToAddModList
));
NR_SchedulingRequestResourceConfig_t
*
schedulingRequestResourceConfig
=
calloc
(
1
,
sizeof
(
*
schedulingRequestResourceConfig
));
schedulingRequestResourceConfig
->
schedulingRequestResourceId
=
0
;
schedulingRequestResourceConfig
->
schedulingRequestID
=
0
;
schedulingRequestResourceConfig
->
periodicityAndOffset
->
present
=
NR_SchedulingRequestResourceConfig__periodicityAndOffset_PR_sl10
;
//could be changed
schedulingRequestResourceConfig
->
periodicityAndOffset
->
choice
.
sl320
=
7
;
*
schedulingRequestResourceConfig
->
resource
=
1
;
ASN_SEQUENCE_ADD
(
&
pucch_Config
->
schedulingRequestResourceToAddModList
->
list
,
schedulingRequestResourceConfig
);
pucch_Config
->
schedulingRequestResourceToReleaseList
=
NULL
;
pucch_Config
->
multi_CSI_PUCCH_ResourceList
=
NULL
;
pucch_Config
->
dl_DataToUL_ACK
=
calloc
(
1
,
sizeof
(
*
pucch_Config
->
dl_DataToUL_ACK
));
...
...
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