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
spbro
OpenXG-RAN
Commits
ce7d6cc3
Commit
ce7d6cc3
authored
Jun 05, 2023
by
francescomani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
review
parent
5480522a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
23 deletions
+31
-23
common/utils/nr/nr_common.h
common/utils/nr/nr_common.h
+8
-0
openair2/GNB_APP/gnb_config.c
openair2/GNB_APP/gnb_config.c
+23
-23
No files found.
common/utils/nr/nr_common.h
View file @
ce7d6cc3
...
...
@@ -59,6 +59,14 @@ typedef struct nr_bandentry_s {
uint8_t
deltaf_raster
;
}
nr_bandentry_t
;
typedef
struct
{
int
band
;
int
scs_index
;
int
first_gscn
;
int
step_gscn
;
int
last_gscn
;
}
sync_raster_t
;
typedef
enum
frequency_range_e
{
FR1
=
0
,
FR2
...
...
openair2/GNB_APP/gnb_config.c
View file @
ce7d6cc3
...
...
@@ -94,10 +94,10 @@
extern
uint16_t
sf_ahead
;
int
macrlc_has_f1
=
0
;
// synchronization raster per band tables
// synchronization raster per band tables
(Rel.15)
// (38.101-1 Table 5.4.3.3-1 and 38.101-2 Table 5.4.3.3-1)
// band nb, sub-carrier spacing index, Range of
GSCN
(First, Step size, Last)
const
uint32_t
sync_raster
[
37
][
5
]
=
{
// band nb, sub-carrier spacing index, Range of
gscn
(First, Step size, Last)
const
sync_raster_t
sync_raster
[
]
=
{
{
1
,
0
,
5279
,
1
,
5419
},
{
2
,
0
,
4829
,
1
,
4969
},
{
3
,
0
,
4517
,
1
,
4693
},
...
...
@@ -1119,51 +1119,51 @@ void config_security(gNB_RRC_INST *rrc)
// Section 5.4.3 of 38.101-1 and -2
void
check_ssb_raster
(
uint64_t
freq
,
int
band
,
int
scs
)
{
int
start_
GSCN
=
0
,
step_GSCN
=
0
,
end_GSCN
=
0
;
for
(
int
i
=
0
;
i
<
sizeof
(
sync_raster
)
/
20
;
i
++
)
{
if
(
sync_raster
[
i
]
[
0
]
==
band
&&
sync_raster
[
i
]
[
1
]
==
scs
)
{
start_
GSCN
=
sync_raster
[
i
][
2
]
;
step_
GSCN
=
sync_raster
[
i
][
3
]
;
end_
GSCN
=
sync_raster
[
i
][
4
]
;
int
start_
gscn
=
0
,
step_gscn
=
0
,
end_gscn
=
0
;
for
(
int
i
=
0
;
i
<
sizeof
(
sync_raster
)
/
sizeof
(
sync_raster_t
)
;
i
++
)
{
if
(
sync_raster
[
i
]
.
band
==
band
&&
sync_raster
[
i
]
.
scs_index
==
scs
)
{
start_
gscn
=
sync_raster
[
i
].
first_gscn
;
step_
gscn
=
sync_raster
[
i
].
step_gscn
;
end_
gscn
=
sync_raster
[
i
].
last_gscn
;
break
;
}
}
AssertFatal
(
start_
GSCN
!=
0
,
"Couldn't find band %d with SCS %d
\n
"
,
band
,
scs
);
int
GSCN
;
if
(
freq
<
=
3000000000
)
{
AssertFatal
(
start_
gscn
!=
0
,
"Couldn't find band %d with SCS %d
\n
"
,
band
,
scs
);
int
gscn
;
if
(
freq
<
3000000000
)
{
int
N
=
0
;
int
M
=
0
;
for
(
int
k
=
0
;
k
<
3
;
k
++
)
{
M
=
(
k
<<
1
)
+
1
;
if
((
freq
-
M
*
50000
)
%
1200000
)
{
if
((
freq
-
M
*
50000
)
%
1200000
==
0
)
{
N
=
(
freq
-
M
*
50000
)
/
1200000
;
break
;
}
}
AssertFatal
(
N
!=
0
,
"SSB frequency %lu Hz not on the synchronization raster (N * 1200kHz + M * 50 kHz)
\n
"
,
freq
);
GSCN
=
(
3
*
N
)
+
(
M
-
3
)
/
2
;
gscn
=
(
3
*
N
)
+
(
M
-
3
)
/
2
;
}
else
if
(
freq
<
=
24250000000
)
{
else
if
(
freq
<
24250000000
)
{
AssertFatal
((
freq
-
3000000000
)
%
1440000
==
0
,
"SSB frequency %lu Hz not on the synchronization raster (3000 MHz + N * 1.44 MHz)
\n
"
,
freq
);
GSCN
=
((
freq
-
3000000000
)
/
1440000
)
+
7499
;
gscn
=
((
freq
-
3000000000
)
/
1440000
)
+
7499
;
}
else
{
AssertFatal
((
freq
-
24250080000
)
%
17280000
==
0
,
"SSB frequency %lu Hz not on the synchronization raster (24250.08 MHz + N * 17.28 MHz)
\n
"
,
freq
);
GSCN
=
((
freq
-
24250080000
)
/
17280000
)
+
22256
;
gscn
=
((
freq
-
24250080000
)
/
17280000
)
+
22256
;
}
AssertFatal
(
GSCN
>=
start_GSCN
&&
GSCN
<=
end_GSCN
,
AssertFatal
(
gscn
>=
start_gscn
&&
gscn
<=
end_gscn
,
"GSCN %d corresponding to SSB frequency %lu does not belong to GSCN range for band %d
\n
"
,
GSCN
,
freq
,
band
);
int
rel_
GSCN
=
GSCN
-
start_GSCN
;
AssertFatal
(
rel_
GSCN
%
step_GSCN
==
0
,
gscn
,
freq
,
band
);
int
rel_
gscn
=
gscn
-
start_gscn
;
AssertFatal
(
rel_
gscn
%
step_gscn
==
0
,
"GSCN %d corresponding to SSB freqyency %lu not in accordance with GSCN step for band %d
\n
"
,
GSCN
,
freq
,
band
);
gscn
,
freq
,
band
);
}
void
RCconfig_NRRRC
(
MessageDef
*
msg_p
,
uint32_t
i
,
gNB_RRC_INST
*
rrc
)
...
...
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