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
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
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
OpenXG
OpenXG-RAN
Commits
17a3a796
Commit
17a3a796
authored
May 25, 2022
by
Roberto Louro Magueta
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/develop-SRS-Measurements' into develop-SRS-MIMO
parents
40f2f543
8d02c2c0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
39 additions
and
23 deletions
+39
-23
openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c
openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c
+14
-7
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_srs.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_srs.c
+25
-16
No files found.
openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c
View file @
17a3a796
...
...
@@ -929,15 +929,23 @@ bool nr_ue_periodic_srs_scheduling(module_id_t mod_id, frame_t frame, slot_t slo
bool
srs_scheduled
=
false
;
NR_UE_MAC_INST_t
*
mac
=
get_mac_inst
(
mod_id
);
NR_BWP_Id_t
ul_bwp_id
=
mac
->
UL_BWP_Id
;
NR_SRS_Config_t
*
srs_config
=
NULL
;
if
(
mac
->
cg
&&
mac
->
cg
->
spCellConfig
&&
mac
->
cg
->
spCellConfig
->
spCellConfigDedicated
&&
mac
->
cg
->
spCellConfig
->
spCellConfigDedicated
->
uplinkConfig
&&
mac
->
cg
->
spCellConfig
->
spCellConfigDedicated
->
uplinkConfig
->
initialUplinkBWP
)
{
if
(
ul_bwp_id
>
0
&&
mac
->
ULbwp
[
ul_bwp_id
-
1
])
{
if
(
mac
->
ULbwp
[
ul_bwp_id
-
1
]
->
bwp_Dedicated
&&
mac
->
ULbwp
[
ul_bwp_id
-
1
]
->
bwp_Dedicated
->
srs_Config
)
{
srs_config
=
mac
->
ULbwp
[
ul_bwp_id
-
1
]
->
bwp_Dedicated
->
srs_Config
->
choice
.
setup
;
}
}
else
if
(
mac
->
cg
&&
mac
->
cg
->
spCellConfig
&&
mac
->
cg
->
spCellConfig
->
spCellConfigDedicated
&&
mac
->
cg
->
spCellConfig
->
spCellConfigDedicated
->
uplinkConfig
&&
mac
->
cg
->
spCellConfig
->
spCellConfigDedicated
->
uplinkConfig
->
initialUplinkBWP
)
{
srs_config
=
mac
->
cg
->
spCellConfig
->
spCellConfigDedicated
->
uplinkConfig
->
initialUplinkBWP
->
srs_Config
->
choice
.
setup
;
}
else
{
}
if
(
!
srs_config
)
{
return
false
;
}
...
...
@@ -965,7 +973,6 @@ bool nr_ue_periodic_srs_scheduling(module_id_t mod_id, frame_t frame, slot_t slo
continue
;
}
NR_BWP_Id_t
ul_bwp_id
=
mac
->
UL_BWP_Id
;
NR_BWP_t
ubwp
=
ul_bwp_id
>
0
&&
mac
->
ULbwp
[
ul_bwp_id
-
1
]
?
mac
->
ULbwp
[
ul_bwp_id
-
1
]
->
bwp_Common
->
genericParameters
:
mac
->
scc_SIB
->
uplinkConfigCommon
->
initialUplinkBWP
.
genericParameters
;
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_srs.c
View file @
17a3a796
...
...
@@ -41,15 +41,16 @@ void nr_configure_srs(nfapi_nr_srs_pdu_t *srs_pdu, int module_id, int CC_id, int
NR_UE_info_t
*
UE_info
=
&
nrmac
->
UE_info
;
NR_UE_sched_ctrl_t
*
sched_ctrl
=
&
UE_info
->
UE_sched_ctrl
[
UE_id
];
NR_BWP_t
ubwp
=
sched_ctrl
->
active_ubwp
?
sched_ctrl
->
active_ubwp
->
bwp_Common
->
genericParameters
:
scc
->
uplinkConfigCommon
->
initialUplinkBWP
->
genericParameters
;
const
NR_SIB1_t
*
sib1
=
nrmac
->
common_channels
[
0
].
sib1
?
nrmac
->
common_channels
[
0
].
sib1
->
message
.
choice
.
c1
->
choice
.
systemInformationBlockType1
:
NULL
;
NR_BWP_t
*
genericParameters
=
get_ul_bwp_genericParameters
(
sched_ctrl
->
active_ubwp
,
scc
,
sib1
);
srs_pdu
->
rnti
=
UE_info
->
rnti
[
UE_id
];
srs_pdu
->
handle
=
0
;
srs_pdu
->
bwp_size
=
NRRIV2BW
(
ubwp
.
locationAndBandwidth
,
MAX_BWP_SIZE
);;
srs_pdu
->
bwp_start
=
NRRIV2PRBOFFSET
(
ubwp
.
locationAndBandwidth
,
MAX_BWP_SIZE
);;
srs_pdu
->
subcarrier_spacing
=
ubwp
.
subcarrierSpacing
;
srs_pdu
->
bwp_size
=
NRRIV2BW
(
genericParameters
->
locationAndBandwidth
,
MAX_BWP_SIZE
);;
srs_pdu
->
bwp_start
=
NRRIV2PRBOFFSET
(
genericParameters
->
locationAndBandwidth
,
MAX_BWP_SIZE
);;
srs_pdu
->
subcarrier_spacing
=
genericParameters
->
subcarrierSpacing
;
srs_pdu
->
cyclic_prefix
=
0
;
srs_pdu
->
num_ant_ports
=
srs_resource
->
nrofSRS_Ports
;
srs_pdu
->
num_symbols
=
srs_resource
->
resourceMapping
.
nrofSymbols
;
...
...
@@ -131,13 +132,20 @@ void nr_schedule_srs(int module_id, frame_t frame) {
}
NR_SRS_Config_t
*
srs_config
=
NULL
;
if
(
cg
&&
cg
->
spCellConfig
&&
cg
->
spCellConfig
->
spCellConfigDedicated
&&
cg
->
spCellConfig
->
spCellConfigDedicated
->
uplinkConfig
&&
cg
->
spCellConfig
->
spCellConfigDedicated
->
uplinkConfig
->
initialUplinkBWP
)
{
if
(
sched_ctrl
->
active_ubwp
)
{
if
(
sched_ctrl
->
active_ubwp
->
bwp_Dedicated
&&
sched_ctrl
->
active_ubwp
->
bwp_Dedicated
->
srs_Config
)
{
srs_config
=
sched_ctrl
->
active_ubwp
->
bwp_Dedicated
->
srs_Config
->
choice
.
setup
;
}
}
else
if
(
cg
&&
cg
->
spCellConfig
&&
cg
->
spCellConfig
->
spCellConfigDedicated
&&
cg
->
spCellConfig
->
spCellConfigDedicated
->
uplinkConfig
&&
cg
->
spCellConfig
->
spCellConfigDedicated
->
uplinkConfig
->
initialUplinkBWP
)
{
srs_config
=
cg
->
spCellConfig
->
spCellConfigDedicated
->
uplinkConfig
->
initialUplinkBWP
->
srs_Config
->
choice
.
setup
;
}
else
{
}
if
(
!
srs_config
)
{
continue
;
}
...
...
@@ -167,14 +175,15 @@ void nr_schedule_srs(int module_id, frame_t frame) {
continue
;
}
NR_BWP_t
ubwp
=
sched_ctrl
->
active_ubwp
?
sched_ctrl
->
active_ubwp
->
bwp_Common
->
genericParameters
:
scc
->
uplinkConfigCommon
->
initialUplinkBWP
->
genericParameters
;
const
NR_SIB1_t
*
sib1
=
nrmac
->
common_channels
[
0
].
sib1
?
nrmac
->
common_channels
[
0
].
sib1
->
message
.
choice
.
c1
->
choice
.
systemInformationBlockType1
:
NULL
;
NR_BWP_t
*
genericParameters
=
get_ul_bwp_genericParameters
(
sched_ctrl
->
active_ubwp
,
scc
,
sib1
);
uint16_t
period
=
srs_period
[
srs_resource
->
resourceType
.
choice
.
periodic
->
periodicityAndOffset_p
.
present
];
uint16_t
offset
=
get_nr_srs_offset
(
srs_resource
->
resourceType
.
choice
.
periodic
->
periodicityAndOffset_p
);
int
n_slots_frame
=
nr_slots_per_frame
[
ubwp
.
subcarrierSpacing
];
int
n_slots_frame
=
nr_slots_per_frame
[
genericParameters
->
subcarrierSpacing
];
// Check if UE will transmit the SRS in this frame
if
(
((
frame
-
offset
/
n_slots_frame
)
*
n_slots_frame
)
%
period
==
0
)
{
...
...
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