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
wangjie
OpenXG-RAN
Commits
dea31257
Commit
dea31257
authored
Mar 26, 2019
by
Florian Kaltenberger
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
moving nr_bandtable back to MAC
parent
a3049674
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
66 additions
and
66 deletions
+66
-66
openair1/PHY/INIT/nr_parms.c
openair1/PHY/INIT/nr_parms.c
+0
-63
openair1/PHY/INIT/phy_init.h
openair1/PHY/INIT/phy_init.h
+0
-2
openair2/LAYER2/NR_MAC_gNB/config.c
openair2/LAYER2/NR_MAC_gNB/config.c
+64
-1
openair2/LAYER2/NR_MAC_gNB/mac_proto.h
openair2/LAYER2/NR_MAC_gNB/mac_proto.h
+2
-0
No files found.
openair1/PHY/INIT/nr_parms.c
View file @
dea31257
...
...
@@ -302,67 +302,4 @@ void nr_dump_frame_parms(NR_DL_FRAME_PARMS *fp)
}
nr_bandentry_t
nr_bandtable
[]
=
{
{
1
,
1920000
,
1980000
,
2110000
,
2170000
,
20
,
422000
},
{
2
,
1850000
,
1910000
,
1930000
,
1990000
,
20
,
386000
},
{
3
,
1710000
,
1785000
,
1805000
,
1880000
,
20
,
361000
},
{
5
,
824000
,
849000
,
869000
,
894000
,
20
,
173800
},
{
7
,
2500000
,
2570000
,
2620000
,
2690000
,
20
,
524000
},
{
8
,
880000
,
915000
,
925000
,
960000
,
20
,
185000
},
{
12
,
698000
,
716000
,
728000
,
746000
,
20
,
145800
},
{
20
,
832000
,
862000
,
791000
,
821000
,
20
,
158200
},
{
25
,
1850000
,
1915000
,
1930000
,
1995000
,
20
,
386000
},
{
28
,
703000
,
758000
,
758000
,
813000
,
20
,
151600
},
{
34
,
2010000
,
2025000
,
2010000
,
2025000
,
20
,
402000
},
{
38
,
2570000
,
2620000
,
2570000
,
2630000
,
20
,
514000
},
{
39
,
1880000
,
1920000
,
1880000
,
1920000
,
20
,
376000
},
{
40
,
2300000
,
2400000
,
2300000
,
2400000
,
20
,
460000
},
{
41
,
2496000
,
2690000
,
2496000
,
2690000
,
3
,
499200
},
{
50
,
1432000
,
1517000
,
1432000
,
1517000
,
20
,
286400
},
{
51
,
1427000
,
1432000
,
1427000
,
1432000
,
20
,
285400
},
{
66
,
1710000
,
1780000
,
2110000
,
2200000
,
20
,
422000
},
{
70
,
1695000
,
1710000
,
1995000
,
2020000
,
20
,
399000
},
{
71
,
663000
,
698000
,
617000
,
652000
,
20
,
123400
},
{
74
,
1427000
,
1470000
,
1475000
,
1518000
,
20
,
295000
},
{
75
,
000
,
000
,
1432000
,
1517000
,
20
,
286400
},
{
76
,
000
,
000
,
1427000
,
1432000
,
20
,
285400
},
{
77
,
3300000
,
4200000
,
3300000
,
4200000
,
1
,
620000
},
{
78
,
3300000
,
3800000
,
3300000
,
3800000
,
1
,
620000
},
{
79
,
4400000
,
5000000
,
4400000
,
5000000
,
2
,
693334
},
{
80
,
1710000
,
1785000
,
000
,
000
,
20
,
342000
},
{
81
,
860000
,
915000
,
000
,
000
,
20
,
176000
},
{
82
,
832000
,
862000
,
000
,
000
,
20
,
166400
},
{
83
,
703000
,
748000
,
000
,
000
,
20
,
140600
},
{
84
,
1920000
,
1980000
,
000
,
000
,
20
,
384000
},
{
86
,
1710000
,
1785000
,
000
,
000
,
20
,
342000
}
};
void
get_band
(
uint32_t
downlink_frequency
,
uint8_t
*
current_band
,
int32_t
*
current_offset
,
lte_frame_type_t
*
current_type
)
{
int
ind
;
int64_t
dl_freq_khz
=
downlink_frequency
/
1000
;
for
(
ind
=
0
;
ind
<
sizeof
(
nr_bandtable
)
/
sizeof
(
nr_bandtable
[
0
]);
ind
++
)
{
*
current_band
=
nr_bandtable
[
ind
].
band
;
LOG_I
(
PHY
,
"Scanning band %d, dl_min %"
PRIu32
", ul_min %"
PRIu32
"
\n
"
,
ind
,
nr_bandtable
[
ind
].
dl_min
,
nr_bandtable
[
ind
].
ul_min
);
if
(
nr_bandtable
[
ind
].
dl_min
<=
dl_freq_khz
&&
nr_bandtable
[
ind
].
dl_max
>=
dl_freq_khz
)
{
*
current_offset
=
(
nr_bandtable
[
ind
].
ul_min
-
nr_bandtable
[
ind
].
dl_min
)
*
1000
;
if
(
*
current_offset
==
0
)
*
current_type
=
TDD
;
else
*
current_type
=
FDD
;
LOG_I
(
PHY
,
"DL frequency %"
PRIu32
": band %d, frame_type %d, UL frequency %"
PRIu32
"
\n
"
,
downlink_frequency
,
*
current_band
,
*
current_type
,
downlink_frequency
+*
current_offset
);
break
;
}
}
AssertFatal
(
ind
!=
(
sizeof
(
nr_bandtable
)
/
sizeof
(
nr_bandtable
[
0
])),
"Can't find EUTRA band for frequency %d
\n
"
,
downlink_frequency
);
}
openair1/PHY/INIT/phy_init.h
View file @
dea31257
...
...
@@ -391,8 +391,6 @@ void init_nr_transport(PHY_VARS_gNB *gNB);
void
init_dfts
(
void
);
void
get_band
(
uint32_t
downlink_frequency
,
uint8_t
*
current_band
,
int32_t
*
current_offset
,
lte_frame_type_t
*
current_type
);
/** @} */
#endif
...
...
openair2/LAYER2/NR_MAC_gNB/config.c
View file @
dea31257
...
...
@@ -51,7 +51,70 @@ extern uint8_t nfapi_mode;
//int32_t **rxdata;
//int32_t **txdata;
extern
nr_bandentry_t
*
nr_bandtable
;
nr_bandentry_t
nr_bandtable
[]
=
{
{
1
,
1920000
,
1980000
,
2110000
,
2170000
,
20
,
422000
},
{
2
,
1850000
,
1910000
,
1930000
,
1990000
,
20
,
386000
},
{
3
,
1710000
,
1785000
,
1805000
,
1880000
,
20
,
361000
},
{
5
,
824000
,
849000
,
869000
,
894000
,
20
,
173800
},
{
7
,
2500000
,
2570000
,
2620000
,
2690000
,
20
,
524000
},
{
8
,
880000
,
915000
,
925000
,
960000
,
20
,
185000
},
{
12
,
698000
,
716000
,
728000
,
746000
,
20
,
145800
},
{
20
,
832000
,
862000
,
791000
,
821000
,
20
,
158200
},
{
25
,
1850000
,
1915000
,
1930000
,
1995000
,
20
,
386000
},
{
28
,
703000
,
758000
,
758000
,
813000
,
20
,
151600
},
{
34
,
2010000
,
2025000
,
2010000
,
2025000
,
20
,
402000
},
{
38
,
2570000
,
2620000
,
2570000
,
2630000
,
20
,
514000
},
{
39
,
1880000
,
1920000
,
1880000
,
1920000
,
20
,
376000
},
{
40
,
2300000
,
2400000
,
2300000
,
2400000
,
20
,
460000
},
{
41
,
2496000
,
2690000
,
2496000
,
2690000
,
3
,
499200
},
{
50
,
1432000
,
1517000
,
1432000
,
1517000
,
20
,
286400
},
{
51
,
1427000
,
1432000
,
1427000
,
1432000
,
20
,
285400
},
{
66
,
1710000
,
1780000
,
2110000
,
2200000
,
20
,
422000
},
{
70
,
1695000
,
1710000
,
1995000
,
2020000
,
20
,
399000
},
{
71
,
663000
,
698000
,
617000
,
652000
,
20
,
123400
},
{
74
,
1427000
,
1470000
,
1475000
,
1518000
,
20
,
295000
},
{
75
,
000
,
000
,
1432000
,
1517000
,
20
,
286400
},
{
76
,
000
,
000
,
1427000
,
1432000
,
20
,
285400
},
{
77
,
3300000
,
4200000
,
3300000
,
4200000
,
1
,
620000
},
{
78
,
3300000
,
3800000
,
3300000
,
3800000
,
1
,
620000
},
{
79
,
4400000
,
5000000
,
4400000
,
5000000
,
2
,
693334
},
{
80
,
1710000
,
1785000
,
000
,
000
,
20
,
342000
},
{
81
,
860000
,
915000
,
000
,
000
,
20
,
176000
},
{
82
,
832000
,
862000
,
000
,
000
,
20
,
166400
},
{
83
,
703000
,
748000
,
000
,
000
,
20
,
140600
},
{
84
,
1920000
,
1980000
,
000
,
000
,
20
,
384000
},
{
86
,
1710000
,
1785000
,
000
,
000
,
20
,
342000
}
};
void
get_band
(
uint32_t
downlink_frequency
,
uint8_t
*
current_band
,
int32_t
*
current_offset
,
lte_frame_type_t
*
current_type
)
{
int
ind
;
int64_t
dl_freq_khz
=
downlink_frequency
/
1000
;
for
(
ind
=
0
;
ind
<
sizeof
(
nr_bandtable
)
/
sizeof
(
nr_bandtable
[
0
]);
ind
++
)
{
*
current_band
=
nr_bandtable
[
ind
].
band
;
LOG_I
(
PHY
,
"Scanning band %d, dl_min %"
PRIu64
", ul_min %"
PRIu64
"
\n
"
,
ind
,
nr_bandtable
[
ind
].
dl_min
,
nr_bandtable
[
ind
].
ul_min
);
if
(
nr_bandtable
[
ind
].
dl_min
<=
dl_freq_khz
&&
nr_bandtable
[
ind
].
dl_max
>=
dl_freq_khz
)
{
*
current_offset
=
(
nr_bandtable
[
ind
].
ul_min
-
nr_bandtable
[
ind
].
dl_min
)
*
1000
;
if
(
*
current_offset
==
0
)
*
current_type
=
TDD
;
else
*
current_type
=
FDD
;
LOG_I
(
PHY
,
"DL frequency %"
PRIu32
": band %d, frame_type %d, UL frequency %"
PRIu32
"
\n
"
,
downlink_frequency
,
*
current_band
,
*
current_type
,
downlink_frequency
+*
current_offset
);
break
;
}
}
AssertFatal
(
ind
!=
(
sizeof
(
nr_bandtable
)
/
sizeof
(
nr_bandtable
[
0
])),
"Can't find EUTRA band for frequency %d
\n
"
,
downlink_frequency
);
}
uint32_t
to_nrarfcn
(
int
nr_bandP
,
uint64_t
dl_CarrierFreq
,
uint32_t
bw
)
{
...
...
openair2/LAYER2/NR_MAC_gNB/mac_proto.h
View file @
dea31257
...
...
@@ -102,4 +102,6 @@ int to_absslot(nfapi_nr_config_request_t *cfg,int frame,int slot);
int
get_symbolsperslot
(
nfapi_nr_config_request_t
*
cfg
);
void
get_band
(
uint32_t
downlink_frequency
,
uint8_t
*
current_band
,
int32_t
*
current_offset
,
lte_frame_type_t
*
current_type
);
#endif
/*__LAYER2_NR_MAC_PROTO_H__*/
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