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
122e18d0
Commit
122e18d0
authored
Nov 09, 2020
by
cig
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Common function to check the frequency channel raster
parent
7e1ac1fa
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
13 deletions
+13
-13
openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c
openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c
+13
-13
No files found.
openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c
View file @
122e18d0
...
...
@@ -1744,6 +1744,15 @@ uint16_t config_bandwidth(int mu, int nb_rb, int nr_band)
}
void
get_delta_arfcn
(
int
i
,
uint32_t
nrarfcn
,
uint64_t
N_OFFs
){
uint32_t
delta_arfcn
=
nrarfcn
-
N_OFFs
;
if
(
delta_arfcn
%
(
nr_bandtable
[
i
].
step_size
)
!=
0
)
AssertFatal
(
1
==
0
,
"nrarfcn %u is not on the channel raster for step size %lu"
,
nrarfcn
,
nr_bandtable
[
i
].
step_size
);
}
uint32_t
to_nrarfcn
(
int
nr_bandP
,
uint64_t
dl_CarrierFreq
,
uint8_t
scs_index
,
...
...
@@ -1751,7 +1760,7 @@ uint32_t to_nrarfcn(int nr_bandP,
{
uint64_t
dl_CarrierFreq_by_1k
=
dl_CarrierFreq
/
1000
;
int
bw_kHz
=
bw
/
1000
;
uint32_t
nrarfcn
,
delta_arfcn
;
uint32_t
nrarfcn
;
int
i
=
get_nr_table_idx
(
nr_bandP
,
scs_index
);
LOG_I
(
MAC
,
"Searching for nr band %d DL Carrier frequency %llu bw %u
\n
"
,
nr_bandP
,(
long
long
unsigned
int
)
dl_CarrierFreq
,
bw
);
...
...
@@ -1783,16 +1792,12 @@ uint32_t to_nrarfcn(int nr_bandP,
// This is equation before Table 5.4.2.1-1 in 38101-1-f30
// F_REF=F_REF_Offs + deltaF_Global(N_REF-NREF_REF_Offs)
nrarfcn
=
(((
dl_CarrierFreq_by_1k
-
F_REF_Offs_khz
)
/
deltaFglobal
)
+
N_REF_Offs
);
delta_arfcn
=
nrarfcn
-
nr_bandtable
[
i
].
N_OFFs_DL
;
if
(
delta_arfcn
%
(
nr_bandtable
[
i
].
step_size
)
!=
0
)
AssertFatal
(
1
==
0
,
"dl_CarrierFreq %lu corresponds to %u which is not on the raster for step size %lu"
,
dl_CarrierFreq
,
nrarfcn
,
nr_bandtable
[
i
].
step_size
);
get_delta_arfcn
(
i
,
nrarfcn
,
nr_bandtable
[
i
].
N_OFFs_DL
);
return
nrarfcn
;
}
// This function computes the
frequency from the NR-ARFCN according to 5.4.2.1.
of 3GPP TS 38.104
// This function computes the
RF reference frequency from the NR-ARFCN according to 5.4.2.1
of 3GPP TS 38.104
// this function applies to both DL and UL
uint64_t
from_nrarfcn
(
int
nr_bandP
,
uint8_t
scs_index
,
...
...
@@ -1801,8 +1806,6 @@ uint64_t from_nrarfcn(int nr_bandP,
int
deltaFglobal
=
5
;
uint32_t
N_REF_Offs
=
0
;
uint64_t
F_REF_Offs_khz
=
0
;
int
scs_khz
=
15
<<
scs_index
;
uint32_t
delta_arfcn
;
int32_t
delta_duplex
;
uint64_t
N_OFFs
,
frequency
,
freq_min
;
int
i
=
get_nr_table_idx
(
nr_bandP
,
scs_index
);
...
...
@@ -1841,10 +1844,7 @@ uint64_t from_nrarfcn(int nr_bandP,
LOG_D
(
MAC
,
"Frequency from NR-ARFCN for N_OFFs %lu, duplex spacing %d KHz, deltaFglobal %d KHz
\n
"
,
N_OFFs
,
delta_duplex
,
deltaFglobal
);
AssertFatal
(
nrarfcn
>=
N_OFFs
,
"nrarfcn %u < N_OFFs[%d] %llu
\n
"
,
nrarfcn
,
nr_bandtable
[
i
].
band
,
(
long
long
unsigned
int
)
N_OFFs
);
delta_arfcn
=
nrarfcn
-
N_OFFs
;
if
(
delta_arfcn
%
(
nr_bandtable
[
i
].
step_size
)
!=
0
)
AssertFatal
(
1
==
0
,
"nrarfcn %u is not on the raster for step size %lu"
,
nrarfcn
,
nr_bandtable
[
i
].
step_size
);
get_delta_arfcn
(
i
,
nrarfcn
,
N_OFFs
);
frequency
=
1000
*
(
F_REF_Offs_khz
+
(
nrarfcn
-
N_REF_Offs
)
*
deltaFglobal
);
...
...
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