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
alex037yang
OpenXG-RAN
Commits
8779866c
Commit
8779866c
authored
Jan 31, 2019
by
Florian Kaltenberger
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
making first_carrier_offset flexible for all prossible N_RB_DL
parent
fe6ff2d8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
56 deletions
+36
-56
openair1/PHY/INIT/nr_parms.c
openair1/PHY/INIT/nr_parms.c
+19
-37
openair1/SIMULATION/NR_PHY/pbchsim.c
openair1/SIMULATION/NR_PHY/pbchsim.c
+17
-19
No files found.
openair1/PHY/INIT/nr_parms.c
View file @
8779866c
...
...
@@ -49,74 +49,54 @@ int nr_init_frame_parms0(NR_DL_FRAME_PARMS *fp,
switch
(
mu
)
{
/*
case NR_MU_0: //15kHz scs
fp->subcarrier_spacing = nr_subcarrier_spacing[NR_MU_0];
fp->slots_per_subframe = nr_slots_per_subframe[NR_MU_0];
break;
*/
case
NR_MU_1
:
//30kHz scs
fp
->
subcarrier_spacing
=
nr_subcarrier_spacing
[
NR_MU_1
];
fp
->
slots_per_subframe
=
nr_slots_per_subframe
[
NR_MU_1
];
switch
(
N_RB_DL
){
case
11
:
case
24
:
case
38
:
case
78
:
case
51
:
case
65
:
case
106
:
//40 MHz
if
(
N_RB_DL
>
0
&&
N_RB_DL
<=
106
)
{
if
(
fp
->
threequarter_fs
)
{
fp
->
ofdm_symbol_size
=
1536
;
fp
->
first_carrier_offset
=
900
;
//1536 - 636
fp
->
nb_prefix_samples0
=
132
;
fp
->
nb_prefix_samples
=
108
;
}
else
{
fp
->
ofdm_symbol_size
=
2048
;
fp
->
first_carrier_offset
=
1412
;
//2048 - 636
fp
->
nb_prefix_samples0
=
176
;
fp
->
nb_prefix_samples
=
144
;
}
break
;
case
133
:
case
162
:
case
189
:
case
217
:
//80 MHz
}
else
if
(
N_RB_DL
>
106
&&
N_RB_DL
<=
217
)
{
if
(
fp
->
threequarter_fs
)
{
fp
->
ofdm_symbol_size
=
3072
;
fp
->
first_carrier_offset
=
1770
;
//3072 - 1302
fp
->
nb_prefix_samples0
=
264
;
fp
->
nb_prefix_samples
=
216
;
}
else
{
fp
->
ofdm_symbol_size
=
4096
;
fp
->
first_carrier_offset
=
2794
;
//4096 - 1302
fp
->
nb_prefix_samples0
=
352
;
fp
->
nb_prefix_samples
=
288
;
}
break
;
case
245
:
AssertFatal
(
fp
->
threequarter_fs
==
0
,
"3/4 sampling impossible for N_RB %d and MU %d
\n
"
,
N_RB_DL
,
mu
);
fp
->
ofdm_symbol_size
=
4096
;
fp
->
first_carrier_offset
=
2626
;
//4096 - 1478
fp
->
nb_prefix_samples0
=
352
;
fp
->
nb_prefix_samples
=
288
;
break
;
case
273
:
}
else
if
(
N_RB_DL
>
217
&&
N_RB_DL
<=
273
)
{
AssertFatal
(
fp
->
threequarter_fs
==
0
,
"3/4 sampling impossible for N_RB %d and MU %d
\n
"
,
N_RB_DL
,
mu
);
fp
->
ofdm_symbol_size
=
4096
;
fp
->
first_carrier_offset
=
2458
;
//4096 - 1638
fp
->
nb_prefix_samples0
=
352
;
fp
->
nb_prefix_samples
=
288
;
break
;
default:
AssertFatal
(
1
==
0
,
"Number of resource blocks %d undefined for mu %d, frame parms = %p
\n
"
,
N_RB_DL
,
mu
,
fp
);
}
else
{
AssertFatal
(
1
==
0
,
"Unsupported configuration N_RB %d and MU %d
\n
"
,
N_RB_DL
,
mu
);
}
fp
->
first_carrier_offset
=
fp
->
ofdm_symbol_size
-
N_RB_DL
*
6
;
break
;
case
NR_MU_2
:
//60kHz scs
...
...
@@ -141,6 +121,7 @@ int nr_init_frame_parms0(NR_DL_FRAME_PARMS *fp,
}
break
;
/*
case NR_MU_3:
fp->subcarrier_spacing = nr_subcarrier_spacing[NR_MU_3];
fp->slots_per_subframe = nr_slots_per_subframe[NR_MU_3];
...
...
@@ -150,9 +131,10 @@ int nr_init_frame_parms0(NR_DL_FRAME_PARMS *fp,
fp->subcarrier_spacing = nr_subcarrier_spacing[NR_MU_4];
fp->slots_per_subframe = nr_slots_per_subframe[NR_MU_4];
break;
*/
default:
AssertFatal
(
1
==
0
,
"Invalid numerology index %d"
,
mu
);
default:
AssertFatal
(
1
==
0
,
"Invalid numerology index %d"
,
mu
);
}
fp
->
slots_per_frame
=
10
*
fp
->
slots_per_subframe
;
...
...
openair1/SIMULATION/NR_PHY/pbchsim.c
View file @
8779866c
...
...
@@ -371,27 +371,25 @@ int main(int argc, char **argv)
double
fs
,
bw
,
scs
,
eps
;
if
(
mu
==
1
&&
N_RB_DL
==
217
)
{
fs
=
122.88e6
;
bw
=
80e6
;
scs
=
30000
;
}
else
if
(
mu
==
1
&&
N_RB_DL
==
245
)
{
fs
=
122.88e6
;
bw
=
90e6
;
scs
=
30000
;
}
else
if
(
mu
==
1
&&
N_RB_DL
==
273
)
{
fs
=
122.88e6
;
bw
=
100e6
;
scs
=
30000
;
}
else
if
(
mu
==
1
&&
N_RB_DL
==
106
)
{
fs
=
61.44e6
;
bw
=
40e6
;
if
(
mu
==
1
)
{
scs
=
30000
;
if
(
N_RB_DL
>
217
&&
N_RB_DL
<=
273
)
{
fs
=
122.88e6
;
bw
=
100e6
;
}
else
if
(
N_RB_DL
>
106
&&
N_RB_DL
<=
217
)
{
fs
=
122.88e6
;
bw
=
80e6
;
}
else
if
(
N_RB_DL
>
0
&&
N_RB_DL
<=
106
)
{
fs
=
61.44e6
;
bw
=
40e6
;
}
else
AssertFatal
(
1
==
0
,
"Unsupported numerology for mu %d, N_RB %d
\n
"
,
mu
,
N_RB_DL
);
}
else
AssertFatal
(
1
==
0
,
"Unsupported numerology for mu %d, N_RB %d
\n
"
,
mu
,
N_RB_DL
);
else
AssertFatal
(
1
==
0
,
"Unsupported numerology for mu %d, N_RB %d
\n
"
,
mu
,
N_RB_DL
);
// cfo with respect to sub-carrier spacing
eps
=
cfo
/
scs
;
...
...
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