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
lizhongxiao
OpenXG-RAN
Commits
594fb18c
Commit
594fb18c
authored
Apr 13, 2023
by
rakesh mundlamuri
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
adressing the comments
parent
5143133d
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
33 additions
and
5 deletions
+33
-5
common/utils/nr/nr_common.c
common/utils/nr/nr_common.c
+24
-0
common/utils/nr/nr_common.h
common/utils/nr/nr_common.h
+5
-1
openair2/LAYER2/NR_MAC_gNB/config.c
openair2/LAYER2/NR_MAC_gNB/config.c
+4
-2
openair2/RRC/NR/nr_rrc_config.c
openair2/RRC/NR/nr_rrc_config.c
+0
-2
No files found.
common/utils/nr/nr_common.c
View file @
594fb18c
...
...
@@ -706,3 +706,27 @@ void SLIV2SL(int SLIV,int *S,int *L) {
}
}
int
get_ssb_subcarrier_offset
(
uint32_t
absoluteFrequencySSB
,
uint32_t
absoluteFrequencyPointA
)
{
uint32_t
absolute_diff
=
(
absoluteFrequencySSB
-
absoluteFrequencyPointA
);
const
int
scaling_5khz
=
absoluteFrequencyPointA
<
600000
?
3
:
1
;
return
((
absolute_diff
/
scaling_5khz
)
%
24
);
}
uint32_t
get_ssb_offset_to_pointA
(
uint32_t
absoluteFrequencySSB
,
uint32_t
absoluteFrequencyPointA
,
int
ssbSubcarrierSpacing
,
int
frequency_range
)
{
uint32_t
absolute_diff
=
(
absoluteFrequencySSB
-
absoluteFrequencyPointA
);
const
int
scaling_5khz
=
absoluteFrequencyPointA
<
600000
?
3
:
1
;
int
sco
=
get_ssb_subcarrier_offset
(
absoluteFrequencySSB
,
absoluteFrequencyPointA
);
const
int
scs_scaling
=
frequency_range
==
FR2
?
1
<<
(
ssbSubcarrierSpacing
-
2
)
:
1
<<
ssbSubcarrierSpacing
;
const
int
scaled_abs_diff
=
absolute_diff
/
scaling_5khz
;
const
int
ssb_offset_point_a
=
(
scaled_abs_diff
-
sco
)
/
12
-
10
*
scs_scaling
;
// absoluteFrequencySSB is the central frequency of SSB which is made by 20RBs in total
AssertFatal
(
ssb_offset_point_a
%
scs_scaling
==
0
,
"PRB offset %d can create frequency offset
\n
"
,
ssb_offset_point_a
);
AssertFatal
(
sco
%
scs_scaling
==
0
,
"ssb offset %d can create frequency offset
\n
"
,
sco
);
return
ssb_offset_point_a
;
}
common/utils/nr/nr_common.h
View file @
594fb18c
...
...
@@ -101,7 +101,11 @@ void get_samplerate_and_bw(int mu,
unsigned
int
*
samples_per_frame
,
double
*
tx_bw
,
double
*
rx_bw
);
uint32_t
get_ssb_offset_to_pointA
(
uint32_t
absoluteFrequencySSB
,
uint32_t
absoluteFrequencyPointA
,
int
ssbSubcarrierSpacing
,
int
frequency_range
);
int
get_ssb_subcarrier_offset
(
uint32_t
absoluteFrequencySSB
,
uint32_t
absoluteFrequencyPointA
);
#define CEILIDIV(a,b) ((a+b-1)/b)
#define ROUNDIDIV(a,b) (((a<<1)+b)/(b<<1))
...
...
openair2/LAYER2/NR_MAC_gNB/config.c
View file @
594fb18c
...
...
@@ -352,7 +352,8 @@ void config_common(gNB_MAC_INST *nrmac, int pdsch_AntennaPorts, int pusch_Antenn
// SSB Table Configuration
cfg
->
ssb_table
.
ssb_offset_point_a
.
value
=
get_ssb_offset_to_pointA
(
*
scc
->
downlinkConfigCommon
->
frequencyInfoDL
->
absoluteFrequencySSB
,
cfg
->
ssb_table
.
ssb_offset_point_a
.
value
=
get_ssb_offset_to_pointA
(
*
scc
->
downlinkConfigCommon
->
frequencyInfoDL
->
absoluteFrequencySSB
,
scc
->
downlinkConfigCommon
->
frequencyInfoDL
->
absoluteFrequencyPointA
,
*
scc
->
ssbSubcarrierSpacing
,
frequency_range
);
...
...
@@ -361,7 +362,8 @@ void config_common(gNB_MAC_INST *nrmac, int pdsch_AntennaPorts, int pusch_Antenn
cfg
->
ssb_table
.
ssb_period
.
value
=
*
scc
->
ssb_periodicityServingCell
;
cfg
->
ssb_table
.
ssb_period
.
tl
.
tag
=
NFAPI_NR_CONFIG_SSB_PERIOD_TAG
;
cfg
->
num_tlv
++
;
cfg
->
ssb_table
.
ssb_subcarrier_offset
.
value
=
get_ssb_subcarrier_offset
(
*
scc
->
downlinkConfigCommon
->
frequencyInfoDL
->
absoluteFrequencySSB
,
cfg
->
ssb_table
.
ssb_subcarrier_offset
.
value
=
get_ssb_subcarrier_offset
(
*
scc
->
downlinkConfigCommon
->
frequencyInfoDL
->
absoluteFrequencySSB
,
scc
->
downlinkConfigCommon
->
frequencyInfoDL
->
absoluteFrequencyPointA
);
cfg
->
ssb_table
.
ssb_subcarrier_offset
.
tl
.
tag
=
NFAPI_NR_CONFIG_SSB_SUBCARRIER_OFFSET_TAG
;
cfg
->
num_tlv
++
;
...
...
openair2/RRC/NR/nr_rrc_config.c
View file @
594fb18c
...
...
@@ -1642,8 +1642,6 @@ NR_BCCH_BCH_Message_t *get_new_MIB_NR(const NR_ServingCellConfigCommon_t *scc)
mib
->
message
.
choice
.
mib
->
spare
.
bits_unused
=
7
;
// This makes a spare of 1 bits
AssertFatal
(
scc
->
ssbSubcarrierSpacing
!=
NULL
,
"scc->ssbSubcarrierSpacing is null
\n
"
);
int
band
=
*
scc
->
downlinkConfigCommon
->
frequencyInfoDL
->
frequencyBandList
.
list
.
array
[
0
];
frequency_range_t
frequency_range
=
band
<
100
?
FR1
:
FR2
;
int
ssb_subcarrier_offset
=
31
;
// default value for NSA
if
(
get_softmodem_params
()
->
sa
)
{
ssb_subcarrier_offset
=
get_ssb_subcarrier_offset
(
*
scc
->
downlinkConfigCommon
->
frequencyInfoDL
->
absoluteFrequencySSB
,
...
...
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