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
905fb9b6
Commit
905fb9b6
authored
Feb 05, 2024
by
Jaroslava Fiedlerova
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/fix_computing_ssb_subcarrier_offset' into integration_2024_w05
parents
8d572cec
00f7ba61
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
38 additions
and
18 deletions
+38
-18
common/utils/nr/nr_common.c
common/utils/nr/nr_common.c
+26
-12
common/utils/nr/nr_common.h
common/utils/nr/nr_common.h
+1
-1
openair1/PHY/INIT/nr_parms.c
openair1/PHY/INIT/nr_parms.c
+4
-2
openair2/LAYER2/NR_MAC_COMMON/nr_mac.h
openair2/LAYER2/NR_MAC_COMMON/nr_mac.h
+1
-1
openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c
openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c
+2
-0
openair2/LAYER2/NR_MAC_gNB/config.c
openair2/LAYER2/NR_MAC_gNB/config.c
+2
-1
openair2/RRC/NR/nr_rrc_config.c
openair2/RRC/NR/nr_rrc_config.c
+2
-1
No files found.
common/utils/nr/nr_common.c
View file @
905fb9b6
...
...
@@ -755,11 +755,25 @@ void SLIV2SL(int SLIV,int *S,int *L) {
}
}
int
get_ssb_subcarrier_offset
(
uint32_t
absoluteFrequencySSB
,
uint32_t
absoluteFrequencyPointA
)
int
get_ssb_subcarrier_offset
(
uint32_t
absoluteFrequencySSB
,
uint32_t
absoluteFrequencyPointA
,
int
scs
)
{
uint32_t
absolute_diff
=
(
absoluteFrequencySSB
-
absoluteFrequencyPointA
);
const
int
scaling_5khz
=
absoluteFrequencyPointA
<
600000
?
3
:
1
;
return
((
absolute_diff
/
scaling_5khz
)
%
24
);
// for FR1 k_SSB expressed in terms of 15kHz SCS
// for FR2 k_SSB expressed in terms of the subcarrier spacing provided by the higher-layer parameter subCarrierSpacingCommon
// absoluteFrequencySSB and absoluteFrequencyPointA are ARFCN
// NR-ARFCN delta frequency is 5kHz if f < 3 GHz, 15kHz for other FR1 freq and 60kHz for FR2
const
uint32_t
absolute_diff
=
absoluteFrequencySSB
-
absoluteFrequencyPointA
;
int
scaling
=
1
;
if
(
absoluteFrequencyPointA
<
600000
)
// correspond to 3GHz
scaling
=
3
;
if
(
scs
>
2
)
// FR2
scaling
<<=
(
scs
-
2
);
int
sco_limit
=
scs
==
1
?
24
:
12
;
int
subcarrier_offset
=
(
absolute_diff
/
scaling
)
%
sco_limit
;
// 30kHz is the only case where k_SSB is expressed in terms of a different SCS (15kHz)
// the assertion is to avoid having an offset of half a subcarrier
if
(
scs
==
1
)
AssertFatal
(
subcarrier_offset
%
2
==
0
,
"ssb offset %d invalid for scs %d
\n
"
,
subcarrier_offset
,
scs
);
return
subcarrier_offset
;
}
uint32_t
get_ssb_offset_to_pointA
(
uint32_t
absoluteFrequencySSB
,
...
...
@@ -767,16 +781,16 @@ uint32_t get_ssb_offset_to_pointA(uint32_t absoluteFrequencySSB,
int
ssbSubcarrierSpacing
,
int
frequency_range
)
{
// offset to pointA is expressed in terms of 15kHz SCS for FR1 and 60kHz for FR2
// only difference wrt NR-ARFCN is delta frequency 5kHz if f < 3 GHz for ARFCN
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
);
const
int
scaling
=
frequency_range
==
FR2
?
1
<<
(
ssbSubcarrierSpacing
-
2
)
:
1
<<
ssbSubcarrierSpacing
;
const
int
scaled_abs_diff
=
absolute_diff
/
(
scaling_5khz
*
scaling
);
// absoluteFrequencySSB is the central frequency of SSB which is made by 20RBs in total
const
int
ssb_offset_point_a
=
((
scaled_abs_diff
/
12
)
-
10
)
*
scaling
;
// Offset to point A needs to be divisible by scaling
AssertFatal
(
ssb_offset_point_a
%
scaling
==
0
,
"PRB offset %d not valid for scs %d
\n
"
,
ssb_offset_point_a
,
ssbSubcarrierSpacing
);
return
ssb_offset_point_a
;
}
...
...
common/utils/nr/nr_common.h
View file @
905fb9b6
...
...
@@ -202,7 +202,7 @@ 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
);
int
get_ssb_subcarrier_offset
(
uint32_t
absoluteFrequencySSB
,
uint32_t
absoluteFrequencyPointA
,
int
scs
);
int
get_delay_idx
(
int
delay
,
int
max_delay_comp
);
void
freq2time
(
uint16_t
ofdm_symbol_size
,
...
...
openair1/PHY/INIT/nr_parms.c
View file @
905fb9b6
...
...
@@ -347,10 +347,12 @@ int nr_init_frame_parms_ue(NR_DL_FRAME_PARMS *fp,
fp
->
freq_range
=
(
fp
->
dl_CarrierFreq
<
6e9
)
?
nr_FR1
:
nr_FR2
;
uint8_t
sco
=
0
;
if
(((
fp
->
freq_range
==
nr_FR1
)
&&
(
config
->
ssb_table
.
ssb_subcarrier_offset
<
24
))
||
((
fp
->
freq_range
==
nr_FR2
)
&&
(
config
->
ssb_table
.
ssb_subcarrier_offset
<
12
))
)
{
if
(((
fp
->
freq_range
==
nr_FR1
)
&&
(
config
->
ssb_table
.
ssb_subcarrier_offset
<
24
))
||
((
fp
->
freq_range
==
nr_FR2
)
&&
(
config
->
ssb_table
.
ssb_subcarrier_offset
<
12
))
)
{
if
(
fp
->
freq_range
==
nr_FR1
)
sco
=
config
->
ssb_table
.
ssb_subcarrier_offset
>>
config
->
ssb_config
.
scs_common
;
else
sco
=
config
->
ssb_table
.
ssb_subcarrier_offset
;
}
fp
->
ssb_start_subcarrier
=
(
12
*
config
->
ssb_table
.
ssb_offset_point_a
+
sco
);
...
...
openair2/LAYER2/NR_MAC_COMMON/nr_mac.h
View file @
905fb9b6
...
...
@@ -480,7 +480,7 @@ typedef struct Type0_PDCCH_CSS_config_s {
uint32_t
search_space_frame_period
;
// in slots
uint32_t
ssb_length
;
uint32_t
ssb_index
;
u
int32_t
cset_start_rb
;
int32_t
cset_start_rb
;
NR_SubcarrierSpacing_t
scs_pdcch
;
bool
active
;
}
NR_Type0_PDCCH_CSS_config_t
;
...
...
openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c
View file @
905fb9b6
...
...
@@ -4443,6 +4443,8 @@ void get_type0_PDCCH_CSS_config_parameters(NR_Type0_PDCCH_CSS_config_t *type0_PD
type0_PDCCH_CSS_config
->
n_0
=
((
uint32_t
)(
big_o
*
(
1
<<
scs_pdcch
))
+
(
uint32_t
)(
type0_PDCCH_CSS_config
->
ssb_index
*
big_m
))
%
num_slot_per_frame
;
type0_PDCCH_CSS_config
->
cset_start_rb
=
ssb_offset_point_a
-
type0_PDCCH_CSS_config
->
rb_offset
;
AssertFatal
(
type0_PDCCH_CSS_config
->
cset_start_rb
>=
0
,
"Invalid CSET0 start PRB %d SSB offset point A %d RB offset %d
\n
"
,
type0_PDCCH_CSS_config
->
cset_start_rb
,
ssb_offset_point_a
,
type0_PDCCH_CSS_config
->
rb_offset
);
}
void
fill_coresetZero
(
NR_ControlResourceSet_t
*
coreset0
,
NR_Type0_PDCCH_CSS_config_t
*
type0_PDCCH_CSS_config
)
...
...
openair2/LAYER2/NR_MAC_gNB/config.c
View file @
905fb9b6
...
...
@@ -639,7 +639,8 @@ static void config_common(gNB_MAC_INST *nrmac, nr_pdsch_AntennaPorts_t pdsch_Ant
cfg
->
num_tlv
++
;
cfg
->
ssb_table
.
ssb_subcarrier_offset
.
value
=
get_ssb_subcarrier_offset
(
*
scc
->
downlinkConfigCommon
->
frequencyInfoDL
->
absoluteFrequencySSB
,
scc
->
downlinkConfigCommon
->
frequencyInfoDL
->
absoluteFrequencyPointA
);
scc
->
downlinkConfigCommon
->
frequencyInfoDL
->
absoluteFrequencyPointA
,
*
scc
->
ssbSubcarrierSpacing
);
AssertFatal
(
cfg
->
ssb_table
.
ssb_subcarrier_offset
.
value
<
16
,
"cannot handle ssb_subcarrier_offset %d resulting from Point A %ld SSB %ld: please increase dl_absoluteFrequencyPointA "
...
...
openair2/RRC/NR/nr_rrc_config.c
View file @
905fb9b6
...
...
@@ -1768,7 +1768,8 @@ NR_BCCH_BCH_Message_t *get_new_MIB_NR(const NR_ServingCellConfigCommon_t *scc)
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
,
scc
->
downlinkConfigCommon
->
frequencyInfoDL
->
absoluteFrequencyPointA
);
scc
->
downlinkConfigCommon
->
frequencyInfoDL
->
absoluteFrequencyPointA
,
*
scc
->
ssbSubcarrierSpacing
);
}
mib
->
message
.
choice
.
mib
->
ssb_SubcarrierOffset
=
ssb_subcarrier_offset
&
15
;
...
...
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