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
canghaiwuhen
OpenXG-RAN
Commits
1f31fff8
Commit
1f31fff8
authored
Aug 30, 2018
by
lfarizav
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Some updates for multi RRU
parent
fb887794
Changes
7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
35 additions
and
411 deletions
+35
-411
targets/ARCH/COMMON/common_lib.c
targets/ARCH/COMMON/common_lib.c
+5
-5
targets/ARCH/COMMON/common_lib.h
targets/ARCH/COMMON/common_lib.h
+1
-1
targets/ARCH/ETHERNET/USERSPACE/LIB/eth_udp.c
targets/ARCH/ETHERNET/USERSPACE/LIB/eth_udp.c
+3
-3
targets/ARCH/ETHERNET/USERSPACE/LIB/ethernet_lib.c
targets/ARCH/ETHERNET/USERSPACE/LIB/ethernet_lib.c
+2
-2
targets/PROJECTS/GENERIC-LTE-EPC/CONF/rru.band7.tm1.if4p5.50PRB.oaisim.2UE.conf
...IC-LTE-EPC/CONF/rru.band7.tm1.if4p5.50PRB.oaisim.2UE.conf
+0
-382
targets/RT/USER/lte-enb.c
targets/RT/USER/lte-enb.c
+7
-7
targets/SIMU/USER/oaisim_functions.c
targets/SIMU/USER/oaisim_functions.c
+17
-11
No files found.
targets/ARCH/COMMON/common_lib.c
View file @
1f31fff8
...
...
@@ -93,7 +93,7 @@ int load_lib(openair0_device *device, openair0_config_t *openair0_cfg, eth_param
oai_device_initfunc_t
dp
;
oai_transport_initfunc_t
tp
;
int
ret
=
0
;
printf
(
"transport_init device->Mod_id %d, addr %s, addr(ifdevice) %s
\n
"
,
device
->
Mod_id
,
cfg
->
my_addr
,
openair0_cfg
->
my_addr
);
//
printf("transport_init device->Mod_id %d, addr %s, addr(ifdevice) %s\n",device->Mod_id,cfg->my_addr,openair0_cfg->my_addr);
if
(
flag
==
BBU_LOCAL_RADIO_HEAD
)
{
lib_handle
=
dlopen
(
OAI_RF_LIBNAME
,
RTLD_LAZY
);
if
(
!
lib_handle
)
{
...
...
@@ -124,7 +124,7 @@ int load_lib(openair0_device *device, openair0_config_t *openair0_cfg, eth_param
tp
=
dlsym
(
lib_handle
,
"transport_init"
);
if
(
tp
!=
NULL
)
{
printf
(
"device->device->Mod_id %d, cfg->addr %s
\n
"
,
device
->
Mod_id
,
cfg
->
my_addr
);
//
printf("device->device->Mod_id %d, cfg->addr %s\n",device->Mod_id,cfg->my_addr);
tp
(
device
,
openair0_cfg
,
cfg
);
}
else
{
fprintf
(
stderr
,
"%s %d:oai device intializing function not found %s
\n
"
,
__FILE__
,
__LINE__
,
dlerror
());
...
...
@@ -150,10 +150,10 @@ int openair0_device_load(openair0_device *device, openair0_config_t *openair0_cf
return
rc
;
}
int
openair0_transport_load
(
openair0_device
*
device
,
openair0_config_t
*
openair0_cfg
,
eth_params_t
*
eth_params
,
int
eNB
)
{
int
openair0_transport_load
(
openair0_device
*
device
,
openair0_config_t
*
openair0_cfg
,
eth_params_t
*
eth_params
)
{
int
rc
;
printf
(
"eNB %d
\n
"
,
eNB
);
printf
(
"device eNB %d, addr %s
\n
"
,
device
->
Mod_id
,
eth_params
->
my_addr
);
//
printf("eNB %d\n",eNB);
//
printf("device eNB %d, addr %s\n",device->Mod_id,eth_params->my_addr);
rc
=
load_lib
(
device
,
openair0_cfg
,
eth_params
,
BBU_REMOTE_RADIO_HEAD
);
if
(
rc
>=
0
)
{
if
(
set_transport
(
device
)
<
0
)
{
...
...
targets/ARCH/COMMON/common_lib.h
View file @
1f31fff8
...
...
@@ -382,7 +382,7 @@ extern "C"
/*! \brief Initialize openair RF target. It returns 0 if OK */
int
openair0_device_load
(
openair0_device
*
device
,
openair0_config_t
*
openair0_cfg
);
/*! \brief Initialize transport protocol . It returns 0 if OK */
int
openair0_transport_load
(
openair0_device
*
device
,
openair0_config_t
*
openair0_cfg
,
eth_params_t
*
eth_params
,
int
eNB
);
int
openair0_transport_load
(
openair0_device
*
device
,
openair0_config_t
*
openair0_cfg
,
eth_params_t
*
eth_params
);
/*! \brief Get current timestamp of USRP
...
...
targets/ARCH/ETHERNET/USERSPACE/LIB/eth_udp.c
View file @
1f31fff8
...
...
@@ -67,20 +67,20 @@ int eth_socket_init_udp(openair0_device *device) {
int
sock_type
=
0
;
int
sock_proto
=
0
;
int
enable
=
1
;
printf
(
"RRH %d
\n
"
,
device
->
Mod_id
);
//
printf("RRH %d\n",device->Mod_id);
printf
(
"local %s, remote %s
\n
"
,
device
->
openair0_cfg
->
my_addr
,
device
->
openair0_cfg
->
remote_addr
);
if
(
device
->
host_type
==
RRH_HOST
)
{
local_ip
=
device
->
openair0_cfg
->
my_addr
;
local_port
=
device
->
openair0_cfg
->
my_port
;
remote_ip
=
"0.0.0.0"
;
remote_port
=
0
;
printf
(
"[%s] local ip addr %s port %d
\n
"
,
"RRH
%d
"
,
local_ip
,
local_port
,
device
->
Mod_id
);
printf
(
"[%s] local ip addr %s port %d
\n
"
,
"RRH"
,
local_ip
,
local_port
,
device
->
Mod_id
);
}
else
{
local_ip
=
device
->
openair0_cfg
->
my_addr
;
local_port
=
device
->
openair0_cfg
->
my_port
;
remote_ip
=
device
->
openair0_cfg
->
remote_addr
;
remote_port
=
device
->
openair0_cfg
->
remote_port
;
printf
(
"[%s] local ip addr %s port %d
\n
"
,
"BBU
%d
"
,
local_ip
,
local_port
,
device
->
Mod_id
);
printf
(
"[%s] local ip addr %s port %d
\n
"
,
"BBU"
,
local_ip
,
local_port
,
device
->
Mod_id
);
}
/* Open socket to send on */
...
...
targets/ARCH/ETHERNET/USERSPACE/LIB/ethernet_lib.c
View file @
1f31fff8
...
...
@@ -56,7 +56,7 @@ int dest_addr_len[MAX_INST];
int
trx_eth_start
(
openair0_device
*
device
)
{
eth_state_t
*
eth
=
(
eth_state_t
*
)
device
->
priv
;
printf
(
"trx_eth_start device->Mod_id %d
\n
"
,
device
->
Mod_id
);
//
printf("trx_eth_start device->Mod_id %d\n",device->Mod_id);
/* initialize socket */
if
(
eth
->
flags
==
ETH_RAW_MODE
)
{
printf
(
"Setting ETHERNET to ETH_RAW_IF5_MODE
\n
"
);
...
...
@@ -395,7 +395,7 @@ int transport_init(openair0_device *device, openair0_config_t *openair0_cfg, eth
device
->
openair0_cfg
=&
openair0_cfg
[
0
];
printf
(
"[ETHERNET]: Initializing openair0_device for %s of eNB %d ...
\n
"
,
((
device
->
host_type
==
BBU_HOST
)
?
"BBU"
:
"RRH"
),
num_devices_eth
);
device
->
Mod_id
=
num_devices_eth
;
printf
(
"num_devices_eth %d, device->Mod_id %d, addr %s, local_if_name %s, addr(ifdevice) %s
\n
"
,
num_devices_eth
,
device
->
Mod_id
,
eth_params
->
my_addr
,
eth_params
->
local_if_name
,
openair0_cfg
->
my_addr
);
//
printf("num_devices_eth %d, device->Mod_id %d, addr %s, local_if_name %s, addr(ifdevice) %s\n",num_devices_eth,device->Mod_id,eth_params->my_addr,eth_params->local_if_name,openair0_cfg->my_addr);
num_devices_eth
++
;
device
->
transp_type
=
ETHERNET_TP
;
device
->
trx_start_func
=
trx_eth_start
;
...
...
targets/PROJECTS/GENERIC-LTE-EPC/CONF/rru.band7.tm1.if4p5.50PRB.oaisim.2UE.conf
deleted
100644 → 0
View file @
fb887794
This diff is collapsed.
Click to expand it.
targets/RT/USER/lte-enb.c
View file @
1f31fff8
...
...
@@ -2330,7 +2330,7 @@ void init_eNB(eNB_func_t node_function[], eNB_timing_t node_timing[],int nb_inst
int
ret
;
for
(
inst
=
0
;
inst
<
nb_inst
;
inst
++
)
{
for
(
CC_id
=
0
;
CC_id
<
MAX_NUM_CCs
;
CC_id
++
)
{
printf
(
"Number of inst %d, eNB %d, rfdevice %d, ifdevice %d, addr %s
\n
"
,
inst
,
PHY_vars_eNB_g
[
inst
][
CC_id
]
->
Mod_id
,
PHY_vars_eNB_g
[
inst
][
CC_id
]
->
rfdevice
.
Mod_id
,
PHY_vars_eNB_g
[
inst
][
CC_id
]
->
ifdevice
.
Mod_id
,(
eth_params
+
inst
+
CC_id
)
->
my_addr
);
//
printf("Number of inst %d, eNB %d, rfdevice %d, ifdevice %d, addr %s\n",inst,PHY_vars_eNB_g[inst][CC_id]->Mod_id,PHY_vars_eNB_g[inst][CC_id]->rfdevice.Mod_id,PHY_vars_eNB_g[inst][CC_id]->ifdevice.Mod_id,(eth_params+inst+CC_id)->my_addr);
eNB
=
PHY_vars_eNB_g
[
inst
][
CC_id
];
eNB
->
node_function
=
node_function
[
CC_id
];
eNB
->
node_timing
=
node_timing
[
CC_id
];
...
...
@@ -2369,7 +2369,7 @@ void init_eNB(eNB_func_t node_function[], eNB_timing_t node_timing[],int nb_inst
}
eNB
->
rfdevice
.
host_type
=
RRH_HOST
;
eNB
->
ifdevice
.
host_type
=
RRH_HOST
;
ret
=
openair0_transport_load
(
&
eNB
->
ifdevice
,
&
openair0_cfg
[
CC_id
],
eNB
->
eth_params
,
eNB
->
Mod_id
);
ret
=
openair0_transport_load
(
&
eNB
->
ifdevice
,
&
openair0_cfg
[
CC_id
+
inst
],
eNB
->
eth_params
);
printf
(
"openair0_transport_init returns %d for CC_id %d
\n
"
,
ret
,
CC_id
);
if
(
ret
<
0
)
{
printf
(
"Exiting, cannot initialize transport protocol
\n
"
);
...
...
@@ -2400,8 +2400,8 @@ void init_eNB(eNB_func_t node_function[], eNB_timing_t node_timing[],int nb_inst
}
eNB
->
rfdevice
.
host_type
=
RRH_HOST
;
eNB
->
ifdevice
.
host_type
=
RRH_HOST
;
printf
(
"loading transport interface eNB %d, rfdevice %d, ifdevice %d
, addr (ifdevice)
...
\n
"
,
eNB
->
Mod_id
,
eNB
->
rfdevice
.
Mod_id
,
eNB
->
ifdevice
.
Mod_id
);
ret
=
openair0_transport_load
(
&
eNB
->
ifdevice
,
&
openair0_cfg
[
CC_id
+
inst
],
eNB
->
eth_params
,
eNB
->
Mod_id
);
printf
(
"loading transport interface eNB %d, rfdevice %d, ifdevice %d ...
\n
"
,
eNB
->
Mod_id
,
eNB
->
rfdevice
.
Mod_id
,
eNB
->
ifdevice
.
Mod_id
);
ret
=
openair0_transport_load
(
&
eNB
->
ifdevice
,
&
openair0_cfg
[
CC_id
+
inst
],
eNB
->
eth_params
);
printf
(
"openair0_transport_init returns %d for CC_id %d
\n
"
,
ret
,
CC_id
);
if
(
ret
<
0
)
{
printf
(
"Exiting, cannot initialize transport protocol
\n
"
);
...
...
@@ -2465,7 +2465,7 @@ void init_eNB(eNB_func_t node_function[], eNB_timing_t node_timing[],int nb_inst
eNB
->
ifdevice
.
host_type
=
BBU_HOST
;
ret
=
openair0_transport_load
(
&
eNB
->
ifdevice
,
&
openair0_cfg
[
CC_id
],
eNB
->
eth_params
,
eNB
->
Mod_id
);
ret
=
openair0_transport_load
(
&
eNB
->
ifdevice
,
&
openair0_cfg
[
CC_id
+
inst
],
eNB
->
eth_params
);
printf
(
"openair0_transport_init returns %d for CC_id %d
\n
"
,
ret
,
CC_id
);
if
(
ret
<
0
)
{
printf
(
"Exiting, cannot initialize transport protocol
\n
"
);
...
...
@@ -2488,7 +2488,7 @@ void init_eNB(eNB_func_t node_function[], eNB_timing_t node_timing[],int nb_inst
eNB
->
fh_asynch
=
(
eNB
->
node_timing
==
synch_to_other
)
?
fh_if4p5_asynch_UL
:
NULL
;
eNB
->
rfdevice
.
host_type
=
BBU_HOST
;
eNB
->
ifdevice
.
host_type
=
BBU_HOST
;
ret
=
openair0_transport_load
(
&
eNB
->
ifdevice
,
&
openair0_cfg
[
CC_id
],
eNB
->
eth_params
,
eNB
->
Mod_id
);
ret
=
openair0_transport_load
(
&
eNB
->
ifdevice
,
&
openair0_cfg
[
CC_id
+
inst
],
eNB
->
eth_params
);
printf
(
"openair0_transport_init returns %d for CC_id %d
\n
"
,
ret
,
CC_id
);
if
(
ret
<
0
)
{
printf
(
"Exiting, cannot initialize transport protocol
\n
"
);
...
...
@@ -2514,7 +2514,7 @@ void init_eNB(eNB_func_t node_function[], eNB_timing_t node_timing[],int nb_inst
eNB
->
rfdevice
.
host_type
=
BBU_HOST
;
eNB
->
ifdevice
.
host_type
=
BBU_HOST
;
ret
=
openair0_transport_load
(
&
eNB
->
ifdevice
,
&
openair0_cfg
[
CC_id
],
eNB
->
eth_params
,
eNB
->
Mod_id
);
ret
=
openair0_transport_load
(
&
eNB
->
ifdevice
,
&
openair0_cfg
[
CC_id
+
inst
],
eNB
->
eth_params
);
printf
(
"openair0_transport_init returns %d for CC_id %d
\n
"
,
ret
,
CC_id
);
if
(
ret
<
0
)
{
printf
(
"Exiting, cannot initialize transport protocol
\n
"
);
...
...
targets/SIMU/USER/oaisim_functions.c
View file @
1f31fff8
...
...
@@ -189,6 +189,8 @@ int oaisim_flag=1;
void
get_simulation_options
(
int
argc
,
char
*
argv
[])
{
int
option
;
int
CC_id
;
int
k
;
char
*
conf_config_file_name
=
NULL
;
enum
long_option_e
{
LONG_OPTION_START
=
0x100
,
/* Start after regular single char options */
...
...
@@ -827,18 +829,22 @@ void get_simulation_options(int argc, char *argv[])
}
}
}
}
/* Update some simulation parameters */
oai_emulation
.
info
.
frame_type
[
0
]
=
enb_properties
->
properties
[
0
]
->
frame_type
[
0
];
oai_emulation
.
info
.
tdd_config
[
0
]
=
enb_properties
->
properties
[
0
]
->
tdd_config
[
0
];
oai_emulation
.
info
.
tdd_config_S
[
0
]
=
enb_properties
->
properties
[
0
]
->
tdd_config_s
[
0
];
oai_emulation
.
info
.
extended_prefix_flag
[
0
]
=
enb_properties
->
properties
[
0
]
->
prefix_type
[
0
];
oai_emulation
.
info
.
node_function
[
0
]
=
enb_properties
->
properties
[
0
]
->
cc_node_function
[
0
];
oai_emulation
.
info
.
node_timing
[
0
]
=
enb_properties
->
properties
[
0
]
->
cc_node_timing
[
0
];
downlink_frequency
[
0
][
0
]
=
enb_properties
->
properties
[
0
]
->
downlink_frequency
[
0
];
uplink_frequency_offset
[
0
][
0
]
=
enb_properties
->
properties
[
0
]
->
uplink_frequency_offset
[
0
];
oai_emulation
.
info
.
N_RB_DL
[
0
]
=
enb_properties
->
properties
[
0
]
->
N_RB_DL
[
0
];
for
(
CC_id
=
0
;
CC_id
<
MAX_NUM_CCs
;
CC_id
++
){
oai_emulation
.
info
.
frame_type
[
CC_id
]
=
enb_properties
->
properties
[
i
]
->
frame_type
[
CC_id
];
oai_emulation
.
info
.
tdd_config
[
CC_id
]
=
enb_properties
->
properties
[
i
]
->
tdd_config
[
CC_id
];
oai_emulation
.
info
.
tdd_config_S
[
CC_id
]
=
enb_properties
->
properties
[
i
]
->
tdd_config_s
[
CC_id
];
oai_emulation
.
info
.
extended_prefix_flag
[
CC_id
]
=
enb_properties
->
properties
[
i
]
->
prefix_type
[
CC_id
];
oai_emulation
.
info
.
N_RB_DL
[
CC_id
]
=
enb_properties
->
properties
[
i
]
->
N_RB_DL
[
CC_id
];
oai_emulation
.
info
.
node_function
[
CC_id
]
=
enb_properties
->
properties
[
i
]
->
cc_node_function
[
CC_id
];
oai_emulation
.
info
.
node_timing
[
CC_id
]
=
enb_properties
->
properties
[
i
]
->
cc_node_timing
[
CC_id
];
for
(
k
=
0
;
k
<
4
;
k
++
){
downlink_frequency
[
CC_id
][
0
]
=
enb_properties
->
properties
[
i
]
->
downlink_frequency
[
CC_id
];
uplink_frequency_offset
[
CC_id
][
0
]
=
enb_properties
->
properties
[
i
]
->
uplink_frequency_offset
[
CC_id
];
}
}
}
}
free
(
conf_config_file_name
);
conf_config_file_name
=
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