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
wangwenhui
OpenXG-RAN
Commits
4aec4a23
Commit
4aec4a23
authored
Aug 31, 2018
by
Cedric Roux
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/multi-sdr-ip-conf' into develop_integration_2018_w35
parents
27322602
be0e4095
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
77 additions
and
18 deletions
+77
-18
openair2/ENB_APP/enb_paramdef.h
openair2/ENB_APP/enb_paramdef.h
+6
-0
targets/ARCH/COMMON/common_lib.h
targets/ARCH/COMMON/common_lib.h
+2
-0
targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp
targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp
+51
-18
targets/RT/USER/lte-ru.c
targets/RT/USER/lte-ru.c
+18
-0
No files found.
openair2/ENB_APP/enb_paramdef.h
View file @
4aec4a23
...
...
@@ -102,6 +102,8 @@ typedef enum {
#define CONFIG_STRING_RU_MAX_RXGAIN "max_rxgain"
#define CONFIG_STRING_RU_IF_COMPRESSION "if_compression"
#define CONFIG_STRING_RU_NBIOTRRC_LIST "NbIoT_RRC_instances"
#define CONFIG_STRING_RU_SDR_ADDRS "sdr_addrs"
#define CONFIG_STRING_RU_SDR_CLK_SRC "clock_src"
#define RU_LOCAL_IF_NAME_IDX 0
#define RU_LOCAL_ADDRESS_IDX 1
...
...
@@ -121,6 +123,8 @@ typedef enum {
#define RU_ATT_TX_IDX 15
#define RU_ATT_RX_IDX 16
#define RU_NBIOTRRC_LIST_IDX 17
#define RU_SDR_ADDRS 18
#define RU_SDR_CLK_SRC 19
...
...
@@ -147,6 +151,8 @@ typedef enum {
{CONFIG_STRING_RU_ATT_TX, NULL, 0, uptr:NULL, defintval:0, TYPE_UINT, 0}, \
{CONFIG_STRING_RU_ATT_RX, NULL, 0, uptr:NULL, defintval:0, TYPE_UINT, 0}, \
{CONFIG_STRING_RU_NBIOTRRC_LIST, NULL, 0, uptr:NULL, defintarrayval:DEFENBS, TYPE_INTARRAY, 1}, \
{CONFIG_STRING_RU_SDR_ADDRS, NULL, 0, strptr:NULL, defstrval:"0.0.0.0", TYPE_STRING, 0}, \
{CONFIG_STRING_RU_SDR_CLK_SRC, NULL, 0, strptr:NULL, defstrval:"internal", TYPE_STRING, 0}, \
}
/*---------------------------------------------------------------------------------------------------------------------------------------*/
...
...
targets/ARCH/COMMON/common_lib.h
View file @
4aec4a23
...
...
@@ -199,6 +199,8 @@ typedef struct {
double
tx_bw
;
//! clock source
clock_source_t
clock_source
;
//! Manual SDR IP address
char
*
sdr_addrs
;
//! Auto calibration flag
int
autocal
[
4
];
//! rf devices work with x bits iqs when oai have its own iq format
...
...
targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp
View file @
4aec4a23
...
...
@@ -955,6 +955,10 @@ extern "C" {
* \param openair0_cfg RF frontend parameters set by application
*/
int
device_init
(
openair0_device
*
device
,
openair0_config_t
*
openair0_cfg
)
{
LOG_D
(
PHY
,
"openair0_cfg[0].sdr_addrs == '%s'
\n
"
,
openair0_cfg
[
0
].
sdr_addrs
);
LOG_D
(
PHY
,
"openair0_cfg[0].clock_source == '%d'
\n
"
,
openair0_cfg
[
0
].
clock_source
);
#if defined(USRP_REC_PLAY)
paramdef_t
usrp_recplay_params
[
7
];
struct
sysinfo
systeminfo
;
...
...
@@ -1023,6 +1027,28 @@ extern "C" {
device
->
openair0_cfg
=
openair0_cfg
;
std
::
string
args
=
"type=b200"
;
char
*
addr_args
=
NULL
;
// Check whether sdr_addrs is set in the config or not
if
(
openair0_cfg
[
0
].
sdr_addrs
!=
NULL
)
{
if
(
strcmp
(
openair0_cfg
[
0
].
sdr_addrs
,
"0.0.0.0"
)
!=
0
)
{
// Check whether sdr_addrs contains multiple IP addresses
// and split and add them to addr_args
if
(
strstr
(
openair0_cfg
[
0
].
sdr_addrs
,
","
)
!=
NULL
)
{
char
*
addr0
=
openair0_cfg
[
0
].
sdr_addrs
;
// Replace , with \0
strsep
(
&
openair0_cfg
[
0
].
sdr_addrs
,
","
);
char
*
addr1
=
openair0_cfg
[
0
].
sdr_addrs
;
// Allocate memory for ",addr0=,addr1=\0" and the addresses
size_t
addr_args_len
=
sizeof
(
char
)
*
(
15
+
strlen
(
addr0
)
+
strlen
(
addr1
));
addr_args
=
(
char
*
)
malloc
(
addr_args_len
);
snprintf
(
addr_args
,
addr_args_len
,
",addr0=%s,addr1=%s"
,
addr0
,
addr1
);
args
+=
addr_args
;
LOG_D
(
PHY
,
"addr_args == '%s'
\n
"
,
addr_args
);
}
}
}
uhd
::
device_addrs_t
device_adds
=
uhd
::
device
::
find
(
args
);
int
vers
=
0
,
subvers
=
0
,
subsubvers
=
0
;
...
...
@@ -1038,9 +1064,14 @@ extern "C" {
uhd
::
get_version_string
().
c_str
(),
vers
,
subvers
,
subsubvers
);
if
(
device_adds
.
size
()
==
0
)
{
double
usrp_master_clock
=
184.32e6
;
std
::
string
args
=
"type=x300"
;
if
(
addr_args
)
{
args
+=
addr_args
;
}
// workaround for an api problem, master clock has to be set with the constructor not via set_master_clock_rate
args
+=
boost
::
str
(
boost
::
format
(
",master_clock_rate=%f"
)
%
usrp_master_clock
);
...
...
@@ -1232,6 +1263,8 @@ extern "C" {
}
}
LOG_D
(
PHY
,
"usrp->get_tx_num_channels() == %d
\n
"
,
s
->
usrp
->
get_tx_num_channels
());
LOG_D
(
PHY
,
"openair0_cfg[0].tx_num_channels == %d
\n
"
,
openair0_cfg
[
0
].
tx_num_channels
);
for
(
int
i
=
0
;
i
<
s
->
usrp
->
get_tx_num_channels
();
i
++
)
{
::
uhd
::
gain_range_t
gain_range_tx
=
s
->
usrp
->
get_tx_gain_range
(
i
);
if
(
i
<
openair0_cfg
[
0
].
tx_num_channels
)
{
...
...
targets/RT/USER/lte-ru.c
View file @
4aec4a23
...
...
@@ -2838,6 +2838,24 @@ void RCconfig_RU(void) {
RC
.
ru
[
j
]
->
num_eNB
=
0
;
for
(
i
=
0
;
i
<
RC
.
ru
[
j
]
->
num_eNB
;
i
++
)
RC
.
ru
[
j
]
->
eNB_list
[
i
]
=
RC
.
eNB
[
RUParamList
.
paramarray
[
j
][
RU_ENB_LIST_IDX
].
iptr
[
i
]][
0
];
if
(
config_isparamset
(
RUParamList
.
paramarray
[
j
],
RU_SDR_ADDRS
))
{
RC
.
ru
[
j
]
->
openair0_cfg
.
sdr_addrs
=
strdup
(
*
(
RUParamList
.
paramarray
[
j
][
RU_SDR_ADDRS
].
strptr
));
}
if
(
config_isparamset
(
RUParamList
.
paramarray
[
j
],
RU_SDR_CLK_SRC
))
{
if
(
strcmp
(
*
(
RUParamList
.
paramarray
[
j
][
RU_SDR_CLK_SRC
].
strptr
),
"internal"
)
==
0
)
{
RC
.
ru
[
j
]
->
openair0_cfg
.
clock_source
=
internal
;
LOG_D
(
PHY
,
"RU clock source set as internal
\n
"
);
}
else
if
(
strcmp
(
*
(
RUParamList
.
paramarray
[
j
][
RU_SDR_CLK_SRC
].
strptr
),
"external"
)
==
0
)
{
RC
.
ru
[
j
]
->
openair0_cfg
.
clock_source
=
external
;
LOG_D
(
PHY
,
"RU clock source set as external
\n
"
);
}
else
if
(
strcmp
(
*
(
RUParamList
.
paramarray
[
j
][
RU_SDR_CLK_SRC
].
strptr
),
"gpsdo"
)
==
0
)
{
RC
.
ru
[
j
]
->
openair0_cfg
.
clock_source
=
gpsdo
;
LOG_D
(
PHY
,
"RU clock source set as gpsdo
\n
"
);
}
else
{
LOG_E
(
PHY
,
"Erroneous RU clock source in the provided configuration file: '%s'
\n
"
,
*
(
RUParamList
.
paramarray
[
j
][
RU_SDR_CLK_SRC
].
strptr
));
}
}
if
(
strcmp
(
*
(
RUParamList
.
paramarray
[
j
][
RU_LOCAL_RF_IDX
].
strptr
),
"yes"
)
==
0
)
{
if
(
!
(
config_isparamset
(
RUParamList
.
paramarray
[
j
],
RU_LOCAL_IF_NAME_IDX
))
)
{
...
...
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