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
Michael Black
OpenXG-RAN
Commits
2f3ce42d
Commit
2f3ce42d
authored
May 12, 2022
by
luis_pereira87
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve code readability in fix_scd function
parent
9f51b3f8
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
39 additions
and
36 deletions
+39
-36
openair2/GNB_APP/gnb_config.c
openair2/GNB_APP/gnb_config.c
+39
-36
No files found.
openair2/GNB_APP/gnb_config.c
View file @
2f3ce42d
...
...
@@ -489,43 +489,44 @@ void fix_scd(NR_ServingCellConfig_t *scd) {
// Check for DL PTRS parameters validity
for
(
int
bwp_i
=
0
;
bwp_i
<
scd
->
downlinkBWP_ToAddModList
->
list
.
count
;
bwp_i
++
)
{
if
(
scd
->
downlinkBWP_ToAddModList
->
list
.
array
[
bwp_i
]
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
->
dmrs_DownlinkForPDSCH_MappingTypeA
->
choice
.
setup
->
phaseTrackingRS
)
{
NR_DMRS_DownlinkConfig_t
*
dmrs_dl_config
=
scd
->
downlinkBWP_ToAddModList
->
list
.
array
[
bwp_i
]
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
->
dmrs_DownlinkForPDSCH_MappingTypeA
->
choice
.
setup
;
if
(
dmrs_dl_config
->
phaseTrackingRS
)
{
// If any of the frequencyDensity values are not set or are out of bounds, PTRS is assumed to be not present
for
(
int
i
=
scd
->
downlinkBWP_ToAddModList
->
list
.
array
[
bwp_i
]
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
->
dmrs_DownlinkForPDSCH_MappingTypeA
->
choice
.
setup
->
phaseTrackingRS
->
choice
.
setup
->
frequencyDensity
->
list
.
count
-
1
;
i
>=
0
;
i
--
)
{
if
((
*
scd
->
downlinkBWP_ToAddModList
->
list
.
array
[
bwp_i
]
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
->
dmrs_DownlinkForPDSCH_MappingTypeA
->
choice
.
setup
->
phaseTrackingRS
->
choice
.
setup
->
frequencyDensity
->
list
.
array
[
i
]
<
1
)
||
(
*
scd
->
downlinkBWP_ToAddModList
->
list
.
array
[
bwp_i
]
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
->
dmrs_DownlinkForPDSCH_MappingTypeA
->
choice
.
setup
->
phaseTrackingRS
->
choice
.
setup
->
frequencyDensity
->
list
.
array
[
i
]
>
276
))
{
for
(
int
i
=
dmrs_dl_config
->
phaseTrackingRS
->
choice
.
setup
->
frequencyDensity
->
list
.
count
-
1
;
i
>=
0
;
i
--
)
{
if
((
*
dmrs_dl_config
->
phaseTrackingRS
->
choice
.
setup
->
frequencyDensity
->
list
.
array
[
i
]
<
1
)
||
(
*
dmrs_dl_config
->
phaseTrackingRS
->
choice
.
setup
->
frequencyDensity
->
list
.
array
[
i
]
>
276
))
{
LOG_I
(
GNB_APP
,
"DL PTRS frequencyDensity %d not set. Assuming PTRS not present!
\n
"
,
i
);
free
(
scd
->
downlinkBWP_ToAddModList
->
list
.
array
[
bwp_i
]
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
->
dmrs_DownlinkForPDSCH_MappingTypeA
->
choice
.
setup
->
phaseTrackingRS
);
scd
->
downlinkBWP_ToAddModList
->
list
.
array
[
bwp_i
]
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
->
dmrs_DownlinkForPDSCH_MappingTypeA
->
choice
.
setup
->
phaseTrackingRS
=
NULL
;
free
(
dmrs_dl_config
->
phaseTrackingRS
);
dmrs_dl_config
->
phaseTrackingRS
=
NULL
;
break
;
}
}
}
if
(
scd
->
downlinkBWP_ToAddModList
->
list
.
array
[
bwp_i
]
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
->
dmrs_DownlinkForPDSCH_MappingTypeA
->
choice
.
setup
->
phaseTrackingRS
)
{
if
(
dmrs_dl_config
->
phaseTrackingRS
)
{
// If any of the timeDensity values are not set or are out of bounds, PTRS is assumed to be not present
for
(
int
i
=
scd
->
downlinkBWP_ToAddModList
->
list
.
array
[
bwp_i
]
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
->
dmrs_DownlinkForPDSCH_MappingTypeA
->
choice
.
setup
->
phaseTrackingRS
->
choice
.
setup
->
timeDensity
->
list
.
count
-
1
;
i
>=
0
;
i
--
)
{
if
((
*
scd
->
downlinkBWP_ToAddModList
->
list
.
array
[
bwp_i
]
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
->
dmrs_DownlinkForPDSCH_MappingTypeA
->
choice
.
setup
->
phaseTrackingRS
->
choice
.
setup
->
timeDensity
->
list
.
array
[
i
]
<
0
)
||
(
*
scd
->
downlinkBWP_ToAddModList
->
list
.
array
[
bwp_i
]
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
->
dmrs_DownlinkForPDSCH_MappingTypeA
->
choice
.
setup
->
phaseTrackingRS
->
choice
.
setup
->
timeDensity
->
list
.
array
[
i
]
>
29
))
{
for
(
int
i
=
dmrs_dl_config
->
phaseTrackingRS
->
choice
.
setup
->
timeDensity
->
list
.
count
-
1
;
i
>=
0
;
i
--
)
{
if
((
*
dmrs_dl_config
->
phaseTrackingRS
->
choice
.
setup
->
timeDensity
->
list
.
array
[
i
]
<
0
)
||
(
*
dmrs_dl_config
->
phaseTrackingRS
->
choice
.
setup
->
timeDensity
->
list
.
array
[
i
]
>
29
))
{
LOG_I
(
GNB_APP
,
"DL PTRS timeDensity %d not set. Assuming PTRS not present!
\n
"
,
i
);
free
(
scd
->
downlinkBWP_ToAddModList
->
list
.
array
[
bwp_i
]
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
->
dmrs_DownlinkForPDSCH_MappingTypeA
->
choice
.
setup
->
phaseTrackingRS
);
scd
->
downlinkBWP_ToAddModList
->
list
.
array
[
bwp_i
]
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
->
dmrs_DownlinkForPDSCH_MappingTypeA
->
choice
.
setup
->
phaseTrackingRS
=
NULL
;
free
(
dmrs_dl_config
->
phaseTrackingRS
);
dmrs_dl_config
->
phaseTrackingRS
=
NULL
;
break
;
}
}
}
if
(
scd
->
downlinkBWP_ToAddModList
->
list
.
array
[
bwp_i
]
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
->
dmrs_DownlinkForPDSCH_MappingTypeA
->
choice
.
setup
->
phaseTrackingRS
)
{
if
(
*
scd
->
downlinkBWP_ToAddModList
->
list
.
array
[
bwp_i
]
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
->
dmrs_DownlinkForPDSCH_MappingTypeA
->
choice
.
setup
->
phaseTrackingRS
->
choice
.
setup
->
resourceElementOffset
>
2
)
{
if
(
dmrs_dl_config
->
phaseTrackingRS
)
{
if
(
*
dmrs_dl_config
->
phaseTrackingRS
->
choice
.
setup
->
resourceElementOffset
>
2
)
{
LOG_I
(
GNB_APP
,
"Freeing DL PTRS resourceElementOffset
\n
"
);
free
(
scd
->
downlinkBWP_ToAddModList
->
list
.
array
[
bwp_i
]
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
->
dmrs_DownlinkForPDSCH_MappingTypeA
->
choice
.
setup
->
phaseTrackingRS
->
choice
.
setup
->
resourceElementOffset
);
scd
->
downlinkBWP_ToAddModList
->
list
.
array
[
bwp_i
]
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
->
dmrs_DownlinkForPDSCH_MappingTypeA
->
choice
.
setup
->
phaseTrackingRS
->
choice
.
setup
->
resourceElementOffset
=
NULL
;
free
(
dmrs_dl_config
->
phaseTrackingRS
->
choice
.
setup
->
resourceElementOffset
);
dmrs_dl_config
->
phaseTrackingRS
->
choice
.
setup
->
resourceElementOffset
=
NULL
;
}
if
(
*
scd
->
downlinkBWP_ToAddModList
->
list
.
array
[
bwp_i
]
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
->
dmrs_DownlinkForPDSCH_MappingTypeA
->
choice
.
setup
->
phaseTrackingRS
->
choice
.
setup
->
epre_Ratio
>
1
)
{
if
(
*
dmrs_dl_config
->
phaseTrackingRS
->
choice
.
setup
->
epre_Ratio
>
1
)
{
LOG_I
(
GNB_APP
,
"Freeing DL PTRS epre_Ratio
\n
"
);
free
(
scd
->
downlinkBWP_ToAddModList
->
list
.
array
[
bwp_i
]
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
->
dmrs_DownlinkForPDSCH_MappingTypeA
->
choice
.
setup
->
phaseTrackingRS
->
choice
.
setup
->
epre_Ratio
);
scd
->
downlinkBWP_ToAddModList
->
list
.
array
[
bwp_i
]
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
->
dmrs_DownlinkForPDSCH_MappingTypeA
->
choice
.
setup
->
phaseTrackingRS
->
choice
.
setup
->
epre_Ratio
=
NULL
;
free
(
dmrs_dl_config
->
phaseTrackingRS
->
choice
.
setup
->
epre_Ratio
);
dmrs_dl_config
->
phaseTrackingRS
->
choice
.
setup
->
epre_Ratio
=
NULL
;
}
}
}
...
...
@@ -533,38 +534,40 @@ void fix_scd(NR_ServingCellConfig_t *scd) {
// Check for UL PTRS parameters validity
for
(
int
bwp_i
=
0
;
bwp_i
<
scd
->
uplinkConfig
->
uplinkBWP_ToAddModList
->
list
.
count
;
bwp_i
++
)
{
if
(
scd
->
uplinkConfig
->
uplinkBWP_ToAddModList
->
list
.
array
[
bwp_i
]
->
bwp_Dedicated
->
pusch_Config
->
choice
.
setup
->
dmrs_UplinkForPUSCH_MappingTypeB
->
choice
.
setup
->
phaseTrackingRS
)
{
NR_DMRS_UplinkConfig_t
*
dmrs_ul_config
=
scd
->
uplinkConfig
->
uplinkBWP_ToAddModList
->
list
.
array
[
bwp_i
]
->
bwp_Dedicated
->
pusch_Config
->
choice
.
setup
->
dmrs_UplinkForPUSCH_MappingTypeB
->
choice
.
setup
;
if
(
dmrs_ul_config
->
phaseTrackingRS
)
{
// If any of the frequencyDensity values are not set or are out of bounds, PTRS is assumed to be not present
for
(
int
i
=
scd
->
uplinkConfig
->
uplinkBWP_ToAddModList
->
list
.
array
[
bwp_i
]
->
bwp_Dedicated
->
pusch_Config
->
choice
.
setup
->
dmrs_UplinkForPUSCH_MappingTypeB
->
choice
.
setup
->
phaseTrackingRS
->
choice
.
setup
->
transformPrecoderDisabled
->
frequencyDensity
->
list
.
count
-
1
;
i
>=
0
;
i
--
)
{
if
((
*
scd
->
uplinkConfig
->
uplinkBWP_ToAddModList
->
list
.
array
[
bwp_i
]
->
bwp_Dedicated
->
pusch_Config
->
choice
.
setup
->
dmrs_UplinkForPUSCH_MappingTypeB
->
choice
.
setup
->
phaseTrackingRS
->
choice
.
setup
->
transformPrecoderDisabled
->
frequencyDensity
->
list
.
array
[
i
]
<
1
)
||
(
*
scd
->
uplinkConfig
->
uplinkBWP_ToAddModList
->
list
.
array
[
bwp_i
]
->
bwp_Dedicated
->
pusch_Config
->
choice
.
setup
->
dmrs_UplinkForPUSCH_MappingTypeB
->
choice
.
setup
->
phaseTrackingRS
->
choice
.
setup
->
transformPrecoderDisabled
->
frequencyDensity
->
list
.
array
[
i
]
>
276
))
{
for
(
int
i
=
dmrs_ul_config
->
phaseTrackingRS
->
choice
.
setup
->
transformPrecoderDisabled
->
frequencyDensity
->
list
.
count
-
1
;
i
>=
0
;
i
--
)
{
if
((
*
dmrs_ul_config
->
phaseTrackingRS
->
choice
.
setup
->
transformPrecoderDisabled
->
frequencyDensity
->
list
.
array
[
i
]
<
1
)
||
(
*
dmrs_ul_config
->
phaseTrackingRS
->
choice
.
setup
->
transformPrecoderDisabled
->
frequencyDensity
->
list
.
array
[
i
]
>
276
))
{
LOG_I
(
GNB_APP
,
"UL PTRS frequencyDensity %d not set. Assuming PTRS not present!
\n
"
,
i
);
free
(
scd
->
uplinkConfig
->
uplinkBWP_ToAddModList
->
list
.
array
[
bwp_i
]
->
bwp_Dedicated
->
pusch_Config
->
choice
.
setup
->
dmrs_UplinkForPUSCH_MappingTypeB
->
choice
.
setup
->
phaseTrackingRS
);
scd
->
uplinkConfig
->
uplinkBWP_ToAddModList
->
list
.
array
[
bwp_i
]
->
bwp_Dedicated
->
pusch_Config
->
choice
.
setup
->
dmrs_UplinkForPUSCH_MappingTypeB
->
choice
.
setup
->
phaseTrackingRS
=
NULL
;
free
(
dmrs_ul_config
->
phaseTrackingRS
);
dmrs_ul_config
->
phaseTrackingRS
=
NULL
;
break
;
}
}
}
if
(
scd
->
uplinkConfig
->
uplinkBWP_ToAddModList
->
list
.
array
[
bwp_i
]
->
bwp_Dedicated
->
pusch_Config
->
choice
.
setup
->
dmrs_UplinkForPUSCH_MappingTypeB
->
choice
.
setup
->
phaseTrackingRS
)
{
if
(
dmrs_ul_config
->
phaseTrackingRS
)
{
// If any of the timeDensity values are not set or are out of bounds, PTRS is assumed to be not present
for
(
int
i
=
scd
->
uplinkConfig
->
uplinkBWP_ToAddModList
->
list
.
array
[
bwp_i
]
->
bwp_Dedicated
->
pusch_Config
->
choice
.
setup
->
dmrs_UplinkForPUSCH_MappingTypeB
->
choice
.
setup
->
phaseTrackingRS
->
choice
.
setup
->
transformPrecoderDisabled
->
timeDensity
->
list
.
count
-
1
;
i
>=
0
;
i
--
)
{
if
((
*
scd
->
uplinkConfig
->
uplinkBWP_ToAddModList
->
list
.
array
[
bwp_i
]
->
bwp_Dedicated
->
pusch_Config
->
choice
.
setup
->
dmrs_UplinkForPUSCH_MappingTypeB
->
choice
.
setup
->
phaseTrackingRS
->
choice
.
setup
->
transformPrecoderDisabled
->
timeDensity
->
list
.
array
[
i
]
<
0
)
||
(
*
scd
->
uplinkConfig
->
uplinkBWP_ToAddModList
->
list
.
array
[
bwp_i
]
->
bwp_Dedicated
->
pusch_Config
->
choice
.
setup
->
dmrs_UplinkForPUSCH_MappingTypeB
->
choice
.
setup
->
phaseTrackingRS
->
choice
.
setup
->
transformPrecoderDisabled
->
timeDensity
->
list
.
array
[
i
]
>
29
))
{
for
(
int
i
=
dmrs_ul_config
->
phaseTrackingRS
->
choice
.
setup
->
transformPrecoderDisabled
->
timeDensity
->
list
.
count
-
1
;
i
>=
0
;
i
--
)
{
if
((
*
dmrs_ul_config
->
phaseTrackingRS
->
choice
.
setup
->
transformPrecoderDisabled
->
timeDensity
->
list
.
array
[
i
]
<
0
)
||
(
*
dmrs_ul_config
->
phaseTrackingRS
->
choice
.
setup
->
transformPrecoderDisabled
->
timeDensity
->
list
.
array
[
i
]
>
29
))
{
LOG_I
(
GNB_APP
,
"UL PTRS timeDensity %d not set. Assuming PTRS not present!
\n
"
,
i
);
free
(
scd
->
uplinkConfig
->
uplinkBWP_ToAddModList
->
list
.
array
[
bwp_i
]
->
bwp_Dedicated
->
pusch_Config
->
choice
.
setup
->
dmrs_UplinkForPUSCH_MappingTypeB
->
choice
.
setup
->
phaseTrackingRS
);
scd
->
uplinkConfig
->
uplinkBWP_ToAddModList
->
list
.
array
[
bwp_i
]
->
bwp_Dedicated
->
pusch_Config
->
choice
.
setup
->
dmrs_UplinkForPUSCH_MappingTypeB
->
choice
.
setup
->
phaseTrackingRS
=
NULL
;
free
(
dmrs_ul_config
->
phaseTrackingRS
);
dmrs_ul_config
->
phaseTrackingRS
=
NULL
;
break
;
}
}
}
if
(
scd
->
uplinkConfig
->
uplinkBWP_ToAddModList
->
list
.
array
[
bwp_i
]
->
bwp_Dedicated
->
pusch_Config
->
choice
.
setup
->
dmrs_UplinkForPUSCH_MappingTypeB
->
choice
.
setup
->
phaseTrackingRS
)
{
if
(
dmrs_ul_config
->
phaseTrackingRS
)
{
// Check for UL PTRS parameters validity
if
(
*
scd
->
uplinkConfig
->
uplinkBWP_ToAddModList
->
list
.
array
[
bwp_i
]
->
bwp_Dedicated
->
pusch_Config
->
choice
.
setup
->
dmrs_UplinkForPUSCH_MappingTypeB
->
choice
.
setup
->
phaseTrackingRS
->
choice
.
setup
->
transformPrecoderDisabled
->
resourceElementOffset
>
2
)
{
if
(
*
dmrs_ul_config
->
phaseTrackingRS
->
choice
.
setup
->
transformPrecoderDisabled
->
resourceElementOffset
>
2
)
{
LOG_I
(
GNB_APP
,
"Freeing UL PTRS resourceElementOffset
\n
"
);
free
(
scd
->
uplinkConfig
->
uplinkBWP_ToAddModList
->
list
.
array
[
bwp_i
]
->
bwp_Dedicated
->
pusch_Config
->
choice
.
setup
->
dmrs_UplinkForPUSCH_MappingTypeB
->
choice
.
setup
->
phaseTrackingRS
->
choice
.
setup
->
transformPrecoderDisabled
->
resourceElementOffset
);
scd
->
uplinkConfig
->
uplinkBWP_ToAddModList
->
list
.
array
[
bwp_i
]
->
bwp_Dedicated
->
pusch_Config
->
choice
.
setup
->
dmrs_UplinkForPUSCH_MappingTypeB
->
choice
.
setup
->
phaseTrackingRS
->
choice
.
setup
->
transformPrecoderDisabled
->
resourceElementOffset
=
NULL
;
free
(
dmrs_ul_config
->
phaseTrackingRS
->
choice
.
setup
->
transformPrecoderDisabled
->
resourceElementOffset
);
dmrs_ul_config
->
phaseTrackingRS
->
choice
.
setup
->
transformPrecoderDisabled
->
resourceElementOffset
=
NULL
;
}
}
...
...
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