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
Michael Black
OpenXG-RAN
Commits
50629a83
Commit
50629a83
authored
Dec 20, 2021
by
Raymond Knopp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
first set of changes to AW2S ORI/eCPRI driver for n78
parent
e9e5dd4c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
18 deletions
+26
-18
targets/ARCH/AW2SORI/oaiori.c
targets/ARCH/AW2SORI/oaiori.c
+26
-18
No files found.
targets/ARCH/AW2SORI/oaiori.c
View file @
50629a83
...
@@ -101,31 +101,37 @@ static const eutra_bandentry_t eutra_bandtable[] = {
...
@@ -101,31 +101,37 @@ static const eutra_bandentry_t eutra_bandtable[] = {
uint32_t
to_earfcn_DL_aw2s
(
int
eutra_bandP
,
long
long
int
dl_CarrierFreq
,
uint32_t
bw
)
{
uint32_t
to_earfcn_DL_aw2s
(
int
eutra_bandP
,
long
long
int
dl_CarrierFreq
,
uint32_t
bw
)
{
uint32_t
dl_CarrierFreq_by_100k
=
dl_CarrierFreq
/
100000
;
uint32_t
dl_CarrierFreq_by_100k
=
dl_CarrierFreq
/
100000
;
int
i
;
int
i
=
0
;
if
(
eutra_bandP
>
68
)
{
printf
(
"eutra_band %d > 68
\n
"
,
eutra_bandP
);
exit
(
-
1
);}
if
(
eutra_bandP
>
68
)
{
printf
(
"eutra_band %d > 68
\n
"
,
eutra_bandP
);
exit
(
-
1
);}
for
(
i
=
0
;
i
<
BANDTABLE_SIZE
&&
eutra_bandtable
[
i
].
band
!=
eutra_bandP
;
i
++
);
printf
(
"AW2S: band %d, index %d
\n
"
,
eutra_bandP
,
i
);
if
(
eutra_bandP
>
0
)
for
(
i
=
0
;
i
<
BANDTABLE_SIZE
&&
eutra_bandtable
[
i
].
band
!=
eutra_bandP
;
i
++
);
printf
(
"AW2S: band %d: index %d
\n
"
,
eutra_bandP
,
i
);
if
(
i
>=
BANDTABLE_SIZE
)
{
printf
(
" i = %d , it will trigger out-of-bounds read.
\n
"
,
i
);
exit
(
-
1
);}
if
(
i
>=
BANDTABLE_SIZE
)
{
printf
(
" i = %d , it will trigger out-of-bounds read.
\n
"
,
i
);
exit
(
-
1
);}
if
(
dl_CarrierFreq_by_100k
<
eutra_bandtable
[
i
].
dl_min
)
{
while
(
i
<
BANDTABLE_SIZE
)
{
printf
(
"Band %d, bw %u : DL carrier frequency %u .1 MHz < %u
\n
"
,
if
(
dl_CarrierFreq_by_100k
<
eutra_bandtable
[
i
].
dl_min
)
{
eutra_bandP
,
bw
,
dl_CarrierFreq_by_100k
,
printf
(
"Band %d, bw %u : DL carrier frequency %u .1 MHz < %u
\n
"
,
eutra_bandtable
[
i
].
dl_min
);
exit
(
-
1
);}
eutra_bandtable
[
i
].
band
,
bw
,
dl_CarrierFreq_by_100k
,
eutra_bandtable
[
i
].
dl_min
);
i
++
;
continue
;}
if
(
dl_CarrierFreq_by_100k
>
if
(
dl_CarrierFreq_by_100k
>
(
eutra_bandtable
[
i
].
dl_max
-
bw
))
{
(
eutra_bandtable
[
i
].
dl_max
-
bw
))
{
printf
(
"Band %d, bw %u : DL carrier frequency %u .1MHz > %d
\n
"
,
printf
(
"Band %d, bw %u : DL carrier frequency %u .1MHz > %d
\n
"
,
eutra_bandP
,
bw
,
dl_CarrierFreq_by_100k
,
eutra_bandtable
[
i
].
band
,
bw
,
dl_CarrierFreq_by_100k
,
eutra_bandtable
[
i
].
dl_max
-
bw
);
exit
(
-
1
)
;
}
eutra_bandtable
[
i
].
dl_max
-
bw
);
i
++
;
continue
;
}
printf
(
"AW2S: dl_CarrierFreq_by_100k %d, dl_min %d
\n
"
,
dl_CarrierFreq_by_100k
,
eutra_bandtable
[
i
].
dl_min
);
printf
(
"AW2S: dl_CarrierFreq_by_100k %d, dl_min %d
\n
"
,
dl_CarrierFreq_by_100k
,
eutra_bandtable
[
i
].
dl_min
);
return
(
dl_CarrierFreq_by_100k
-
eutra_bandtable
[
i
].
dl_min
+
return
(
dl_CarrierFreq_by_100k
-
eutra_bandtable
[
i
].
dl_min
+
(
eutra_bandtable
[
i
].
N_OFFs_DL
/
10
));
(
eutra_bandtable
[
i
].
N_OFFs_DL
/
10
));
}
}
printf
(
"No DL band found
\n
"
);
exit
(
-
1
);
}
uint32_t
to_earfcn_UL_aw2s
(
int
eutra_bandP
,
long
long
int
ul_CarrierFreq
,
uint32_t
bw
)
{
uint32_t
to_earfcn_UL_aw2s
(
int
eutra_bandP
,
long
long
int
ul_CarrierFreq
,
uint32_t
bw
)
{
uint32_t
ul_CarrierFreq_by_100k
=
ul_CarrierFreq
/
100000
;
uint32_t
ul_CarrierFreq_by_100k
=
ul_CarrierFreq
/
100000
;
int
i
;
int
i
;
...
@@ -134,6 +140,7 @@ uint32_t to_earfcn_UL_aw2s(int eutra_bandP, long long int ul_CarrierFreq, uint32
...
@@ -134,6 +140,7 @@ uint32_t to_earfcn_UL_aw2s(int eutra_bandP, long long int ul_CarrierFreq, uint32
exit
(
-
1
);
exit
(
-
1
);
}
}
for
(
i
=
0
;
i
<
BANDTABLE_SIZE
&&
eutra_bandtable
[
i
].
band
!=
eutra_bandP
;
i
++
);
for
(
i
=
0
;
i
<
BANDTABLE_SIZE
&&
eutra_bandtable
[
i
].
band
!=
eutra_bandP
;
i
++
);
if
(
i
>=
BANDTABLE_SIZE
)
{
printf
(
"i = %d , it will trigger out-of-bounds read.
\n
"
,
i
);
exit
(
-
1
);}
if
(
i
>=
BANDTABLE_SIZE
)
{
printf
(
"i = %d , it will trigger out-of-bounds read.
\n
"
,
i
);
exit
(
-
1
);}
...
@@ -313,12 +320,13 @@ int aw2s_startstreaming(openair0_device *device) {
...
@@ -313,12 +320,13 @@ int aw2s_startstreaming(openair0_device *device) {
printf
(
"ORI_ObjectStateModify: %s
\n
"
,
ORI_Result_Print
(
RE_result
));
printf
(
"ORI_ObjectStateModify: %s
\n
"
,
ORI_Result_Print
(
RE_result
));
}
}
/*
while (rx0->fst != ORI_FST_Operational ||
while (rx0->fst != ORI_FST_Operational ||
(openair0_cfg->rx_num_channels > 1 && rx1->fst != ORI_FST_Operational) ||
(openair0_cfg->rx_num_channels > 1 && rx1->fst != ORI_FST_Operational) ||
tx0->fst != ORI_FST_Operational ||
tx0->fst != ORI_FST_Operational ||
(openair0_cfg->tx_num_channels > 1 && tx1->fst != ORI_FST_Operational))
(openair0_cfg->tx_num_channels > 1 && tx1->fst != ORI_FST_Operational))
{}
{}
*/
// test RX interface
// test RX interface
uint64_t
TS
;
uint64_t
TS
;
char
temp_rx
[
1024
]
__attribute__
((
aligned
(
32
)));
char
temp_rx
[
1024
]
__attribute__
((
aligned
(
32
)));
...
@@ -475,7 +483,7 @@ int aw2s_oriinit(openair0_device *device) {
...
@@ -475,7 +483,7 @@ int aw2s_oriinit(openair0_device *device) {
txParams
.
TxEUtraTDD
.
axcW
=
1
;
txParams
.
TxEUtraTDD
.
axcW
=
1
;
txParams
.
TxEUtraTDD
.
axcB
=
0
;
txParams
.
TxEUtraTDD
.
axcB
=
0
;
txParams
.
TxEUtraTDD
.
chanBW
=
openair0_cfg
->
tx_bw
/
100e3
;
txParams
.
TxEUtraTDD
.
chanBW
=
openair0_cfg
->
tx_bw
/
100e3
;
txParams
.
TxEUtraTDD
.
earfcn
=
to_earfcn_DL_aw2s
(
38
,(
long
long
int
)
openair0_cfg
->
tx_freq
[
0
],
txParams
.
TxEUtraTDD
.
chanBW
);
txParams
.
TxEUtraTDD
.
earfcn
=
to_earfcn_DL_aw2s
(
-
1
,(
long
long
int
)
openair0_cfg
->
tx_freq
[
0
],
txParams
.
TxEUtraTDD
.
chanBW
);
txParams
.
TxEUtraTDD
.
maxTxPwr
=
430
-
((
int
)
openair0_cfg
->
tx_gain
[
0
]
*
10
);
txParams
.
TxEUtraTDD
.
maxTxPwr
=
430
-
((
int
)
openair0_cfg
->
tx_gain
[
0
]
*
10
);
txParams
.
TxEUtraTDD
.
tddULDLConfig
=
1
;
txParams
.
TxEUtraTDD
.
tddULDLConfig
=
1
;
txParams
.
TxEUtraTDD
.
tddSpecialSFConfig
=
0
;
txParams
.
TxEUtraTDD
.
tddSpecialSFConfig
=
0
;
...
...
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