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
de3ba76b
Commit
de3ba76b
authored
Jan 26, 2016
by
kaltenbe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
first steps of SoDeRa configuration
parent
191e93cc
Changes
8
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
2398 additions
and
72 deletions
+2398
-72
cmake_targets/CMakeLists.txt
cmake_targets/CMakeLists.txt
+7
-5
targets/ARCH/COMMON/common_lib.c
targets/ARCH/COMMON/common_lib.c
+7
-2
targets/ARCH/COMMON/common_lib.h
targets/ARCH/COMMON/common_lib.h
+2
-1
targets/ARCH/SODERA/USERSPACE/LIB/sodera_lib.cpp
targets/ARCH/SODERA/USERSPACE/LIB/sodera_lib.cpp
+101
-56
targets/ARCH/SODERA/lms7_trx_LTE_mimo_RF.ini
targets/ARCH/SODERA/lms7_trx_LTE_mimo_RF.ini
+1128
-0
targets/ARCH/SODERA/lms7_trx_LTE_mimo_TSG.ini
targets/ARCH/SODERA/lms7_trx_LTE_mimo_TSG.ini
+1128
-0
targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band4.tm1.usrpb210.conf
...PROJECTS/GENERIC-LTE-EPC/CONF/enb.band4.tm1.usrpb210.conf
+6
-6
targets/RT/USER/lte-softmodem.c
targets/RT/USER/lte-softmodem.c
+19
-2
No files found.
cmake_targets/CMakeLists.txt
View file @
de3ba76b
...
...
@@ -438,16 +438,18 @@ elseif (${RF_BOARD} STREQUAL "OAI_BLADERF")
#set(LOWLATENCY False)
elseif
(
${
RF_BOARD
}
STREQUAL
"OAI_SODERA"
)
include_directories
(
"
${
OPENAIR_TARGETS
}
/ARCH/SODERA/USERSPACE/LIB
/
"
)
include_directories
(
"
${
OPENAIR_TARGETS
}
/ARCH/SODERA/USERSPACE/LIB/
SoDeRaV1_distro_01v/lms7suite_source_cod
e/src/lms7002m"
)
include_directories
(
"
${
OPENAIR_TARGETS
}
/ARCH/SODERA/USERSPACE/LIB/
SoDeRaV1_distro_01v/lms7suite_source_cod
e/src/Si5351C"
)
include_directories
(
"
${
OPENAIR_TARGETS
}
/ARCH/SODERA/USERSPACE/LIB"
)
include_directories
(
"
${
OPENAIR_TARGETS
}
/ARCH/SODERA/USERSPACE/LIB/
lms7suit
e/src/lms7002m"
)
include_directories
(
"
${
OPENAIR_TARGETS
}
/ARCH/SODERA/USERSPACE/LIB/
lms7suit
e/src/Si5351C"
)
set
(
HW_SOURCE
${
HW_SOURCE
}
${
OPENAIR_TARGETS
}
/ARCH/SODERA/USERSPACE/LIB/sodera_lib.cpp
)
LINK_DIRECTORIES
(
"
${
OPENAIR_TARGETS
}
/ARCH/SODERA/USERSPACE/LIB/SoDeRaV1_distro_01v/lms7suite_source_code/build/lms7002m"
)
LINK_DIRECTORIES
(
"
${
OPENAIR_TARGETS
}
/ARCH/SODERA/USERSPACE/LIB/lms7suite/src/lms7002m"
)
LINK_DIRECTORIES
(
"
${
OPENAIR_TARGETS
}
/ARCH/SODERA/USERSPACE/LIB/lms7suite/src/Si5351C"
)
LINK_DIRECTORIES
(
"/usr/lib/x86_64-linux-gnu"
)
set
(
option_HW_lib
"usb-1.0"
)
set
(
LMS7002_LIB
"libLMS7002M.a"
)
set
(
Si5351C_LIB
"libSi5351C.a"
)
#set(LOWLATENCY False)
elseif
(
${
RF_BOARD
}
STREQUAL
"ETHERNET"
)
...
...
@@ -1447,7 +1449,7 @@ add_executable(lte-softmodem
target_link_libraries
(
lte-softmodem
-Wl,--start-group
RRC_LIB S1AP_LIB S1AP_ENB GTPV1U SECU_CN SECU_OSA UTIL HASHTABLE SCTP_CLIENT UDP SCHED_LIB PHY LFDS L2
${
MSC_LIB
}
${
RAL_LIB
}
${
NAS_UE_LIB
}
${
ITTI_LIB
}
${
MIH_LIB
}
${
LMS7002_LIB
}
RRC_LIB S1AP_LIB S1AP_ENB GTPV1U SECU_CN SECU_OSA UTIL HASHTABLE SCTP_CLIENT UDP SCHED_LIB PHY LFDS L2
${
MSC_LIB
}
${
RAL_LIB
}
${
NAS_UE_LIB
}
${
ITTI_LIB
}
${
MIH_LIB
}
${
LMS7002_LIB
}
${
Si5351C_LIB
}
-Wl,--end-group
)
...
...
targets/ARCH/COMMON/common_lib.c
View file @
de3ba76b
...
...
@@ -59,11 +59,16 @@ int openair0_device_init(openair0_device *device, openair0_config_t *openair0_cf
return
(
openair0_dev_init_usrp
(
device
,
openair0_cfg
));
#elif OAI_BLADERF
device
->
type
=
BLADERF_IF
;
printf
(
"
openair0_dev_init_bladerf ...
\n
"
);
printf
(
"openair0_dev_init_bladerf ...
\n
"
);
return
(
openair0_dev_init_bladerf
(
device
,
openair0_cfg
));
#elif OAI_SODERA
device
->
type
=
OAI_SODERA
;
printf
(
" openair0_dev_init_sodera ...
\n
"
);
printf
(
"openair0_dev_init_sodera ...
\n
"
);
if
(
openair0_cfg
[
0
].
configFilename
==
NULL
)
{
printf
(
"Please provide a configuration file for SoDeRa
\n
"
);
exit
(
-
1
);
}
return
(
openair0_dev_init_sodera
(
device
,
openair0_cfg
));
#endif
...
...
targets/ARCH/COMMON/common_lib.h
View file @
de3ba76b
...
...
@@ -133,7 +133,8 @@ typedef struct {
char
*
my_ip
;
//! my port number for Ethernet interface (eNB/BBU, UE)
int
my_port
;
//! Configuration file for LMS7002M
char
*
configFilename
;
}
openair0_config_t
;
typedef
struct
{
...
...
targets/ARCH/SODERA/USERSPACE/LIB/sodera_lib.cpp
View file @
de3ba76b
...
...
@@ -32,7 +32,8 @@
* Author: Raymond Knopp
*/
#include <vector>
#include <string>
#include <stdio.h>
#include <stdlib.h>
#include <inttypes.h>
...
...
@@ -49,6 +50,7 @@
#include "common_lib.h"
#include "lmsComms.h"
#include "LMS7002M.h"
#include "Si5351C.h"
#ifdef __SSE4_1__
# include <smmintrin.h>
...
...
@@ -58,6 +60,8 @@
# include <immintrin.h>
#endif
using
namespace
std
;
int
num_devices
=
0
;
/*These items configure the underlying asynch stream used by the the sync interface.
*/
...
...
@@ -84,8 +88,8 @@ typedef struct
uhd::async_metadata_t async_md;
*/
LMScomms
mData
Port
;
LMScomms
Port
;
Si5351C
Si
;
double
sample_rate
;
// time offset between transmiter timestamp and receiver timestamp;
double
tdiff
;
...
...
@@ -103,6 +107,7 @@ typedef struct
}
sodera_state_t
;
sodera_state_t
sodera_state
;
static
int
trx_sodera_start
(
openair0_device
*
device
)
{
...
...
@@ -308,18 +313,48 @@ int trx_sodera_reset_stats(openair0_device* device) {
int
openair0_dev_init_sodera
(
openair0_device
*
device
,
openair0_config_t
*
openair0_cfg
)
{
sodera_state_t
*
s
=
(
sodera_state_t
*
)
malloc
(
sizeof
(
sodera_state_t
));
sodera_state_t
*
s
=&
sodera_state
;
size_t
i
;
memset
(
s
,
0
,
sizeof
(
sodera_state_t
));
// Initialize SODERA device
if
(
!
s
->
mDataPort
.
Open
(
0
))
{
s
->
Port
.
RefreshDeviceList
();
vector
<
string
>
deviceNames
=
s
->
Port
.
GetDeviceList
();
if
(
deviceNames
.
size
()
==
1
)
{
if
(
s
->
Port
.
Open
(
0
)
!=
IConnection
::
SUCCESS
)
{
printf
(
"Cannot open SoDeRa
\n
"
);
exit
(
-
1
);
}
LMSinfo
devInfo
=
s
->
Port
.
GetInfo
();
printf
(
"Device %s, HW: %d, FW: %d, Protocol %d
\n
"
,
GetDeviceName
(
devInfo
.
device
),
(
int
)
devInfo
.
hardware
,
(
int
)
devInfo
.
firmware
,
(
int
)
devInfo
.
protocol
);
LMS7002M
lmsControl
(
&
s
->
Port
);
printf
(
"Configuring Si5351C
\n
"
);
s
->
Si
.
Initialize
(
&
s
->
Port
);
s
->
Si
.
SetPLL
(
0
,
25000000
,
0
);
s
->
Si
.
SetPLL
(
1
,
25000000
,
0
);
s
->
Si
.
SetClock
(
0
,
27000000
,
true
,
false
);
s
->
Si
.
SetClock
(
1
,
27000000
,
true
,
false
);
for
(
int
i
=
2
;
i
<
8
;
++
i
)
s
->
Si
.
SetClock
(
i
,
27000000
,
false
,
false
);
Si5351C
::
Status
status
=
s
->
Si
.
ConfigureClocks
();
if
(
status
!=
Si5351C
::
SUCCESS
)
{
printf
(
"Failed to configure Si5351C"
);
exit
(
-
1
);
}
status
=
s
->
Si
.
UploadConfiguration
();
if
(
status
!=
Si5351C
::
SUCCESS
)
printf
(
"Failed to upload Si5351C configuration"
);
int
vers
=
0
,
subvers
=
0
,
subsubvers
=
0
;
printf
(
"Configuring LMS7002
\n
"
);
int
bw_gain_adjust
=
0
;
...
...
@@ -359,11 +394,18 @@ int openair0_dev_init_sodera(openair0_device* device, openair0_config_t *openair
printf
(
"Error: unknown sampling rate %f
\n
"
,
openair0_cfg
[
0
].
sample_rate
);
exit
(
-
1
);
break
;
}
liblms7_status
opStatus
;
lmsControl
.
ResetChip
();
opStatus
=
lmsControl
.
LoadConfig
(
openair0_cfg
[
0
].
configFilename
);
if
(
opStatus
!=
LIBLMS7_SUCCESS
)
{
printf
(
"Failed to load configuration file %s
\n
"
,
openair0_cfg
[
0
].
configFilename
);
exit
(
-
1
);
}
/*
for(i=0;i<s->usrp->get_rx_num_channels();i++) {
if (i<openair0_cfg[0].rx_num_channels) {
for(i=0;i<openair0_cfg[0].rx_num_channels;i++) {
s->usrp->set_rx_rate(openair0_cfg[0].sample_rate,i);
s->usrp->set_rx_bandwidth(openair0_cfg[0].rx_bw,i);
printf("Setting rx freq/gain on channel %lu/%lu : BW %f (readback %f)\n",i,s->usrp->get_rx_num_channels(),openair0_cfg[0].rx_bw/1e6,s->usrp->get_rx_bandwidth(i)/1e6);
...
...
@@ -420,9 +462,12 @@ int openair0_dev_init_sodera(openair0_device* device, openair0_config_t *openair
std::cout << boost::format("Actual TX bandwidth: %fM...") % (s->usrp->get_tx_bandwidth(i)/1e6) << std::endl;
std::cout << boost::format("Actual TX antenna: %s...") % (s->usrp->get_tx_antenna(i)) << std::endl;
}
}
*/
}
else
{
printf
(
"Please connect SoDeRa
\n
"
);
exit
(
-
1
);
}
device
->
priv
=
s
;
device
->
trx_start_func
=
trx_sodera_start
;
...
...
targets/ARCH/SODERA/lms7_trx_LTE_mimo_RF.ini
0 → 100644
View file @
de3ba76b
This diff is collapsed.
Click to expand it.
targets/ARCH/SODERA/lms7_trx_LTE_mimo_TSG.ini
0 → 100644
View file @
de3ba76b
This diff is collapsed.
Click to expand it.
targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band4.tm1.usrpb210.conf
View file @
de3ba76b
...
...
@@ -17,7 +17,7 @@ eNBs =
mobile_country_code
=
"208"
;
mobile_network_code
=
"9
2
"
;
mobile_network_code
=
"9
3
"
;
//////////
Physical
parameters
:
...
...
@@ -36,7 +36,7 @@ eNBs =
nb_antennas_tx
=
1
;
nb_antennas_rx
=
1
;
tx_gain
=
90
;
rx_gain
=
12
0
;
rx_gain
=
12
8
;
prach_root
=
0
;
prach_config_index
=
0
;
prach_high_speed
=
"DISABLE"
;
...
...
@@ -66,7 +66,7 @@ eNBs =
pusch_p0_Nominal
= -
90
;
pusch_alpha
=
"AL1"
;
pucch_p0_Nominal
= -
108
;
pucch_p0_Nominal
= -
96
;
msg3_delta_Preamble
=
6
;
pucch_deltaF_Format1
=
"deltaF2"
;
pucch_deltaF_Format1b
=
"deltaF3"
;
...
...
@@ -131,7 +131,7 @@ eNBs =
};
//////////
MME
parameters
:
mme_ip_address
= ( {
ipv4
=
"192.168.1
3
.11"
;
mme_ip_address
= ( {
ipv4
=
"192.168.1
2
.11"
;
ipv6
=
"192:168:30::17"
;
active
=
"yes"
;
preference
=
"ipv4"
;
...
...
@@ -141,10 +141,10 @@ eNBs =
NETWORK_INTERFACES
:
{
ENB_INTERFACE_NAME_FOR_S1_MME
=
"eth0"
;
ENB_IPV4_ADDRESS_FOR_S1_MME
=
"192.168.1
3.10
/24"
;
ENB_IPV4_ADDRESS_FOR_S1_MME
=
"192.168.1
2.215
/24"
;
ENB_INTERFACE_NAME_FOR_S1U
=
"eth0"
;
ENB_IPV4_ADDRESS_FOR_S1U
=
"192.168.1
3.10
/24"
;
ENB_IPV4_ADDRESS_FOR_S1U
=
"192.168.1
2.215
/24"
;
ENB_PORT_FOR_S1U
=
2152
;
# Spec 2152
};
...
...
targets/RT/USER/lte-softmodem.c
View file @
de3ba76b
...
...
@@ -290,6 +290,8 @@ double bw = 10.0e6;
static
int
tx_max_power
[
MAX_NUM_CCs
];
/* = {0,0}*/
;
char
rf_config_file
[
1024
];
int
chain_offset
=
0
;
#ifndef EXMIMO
...
...
@@ -411,6 +413,7 @@ void help (void) {
printf
(
" sudo -E lte-softmodem [options]
\n
"
);
printf
(
" sudo -E ./lte-softmodem -O ../../../targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.openEPC.conf -S -V -m 26 -t 16 -x 1 --ulsch-max-errors 100 -W
\n\n
"
);
printf
(
"Options:
\n
"
);
printf
(
" --rf-config-file Configuration file for front-end (e.g. LMS7002M)
\n
"
);
printf
(
" --ulsch-max-errors set the max ULSCH erros
\n
"
);
printf
(
" --calib-ue-rx set UE RX calibration
\n
"
);
printf
(
" --calib-ue-rx-med
\n
"
);
...
...
@@ -2051,6 +2054,7 @@ static void get_options (int argc, char **argv)
enum
long_option_e
{
LONG_OPTION_START
=
0x100
,
/* Start after regular single char options */
LONG_OPTION_RF_CONFIG_FILE
,
LONG_OPTION_ULSCH_MAX_CONSECUTIVE_ERRORS
,
LONG_OPTION_CALIB_UE_RX
,
LONG_OPTION_CALIB_UE_RX_MED
,
...
...
@@ -2067,6 +2071,7 @@ static void get_options (int argc, char **argv)
};
static
const
struct
option
long_options
[]
=
{
{
"rf-config-file"
,
required_argument
,
NULL
,
LONG_OPTION_RF_CONFIG_FILE
},
{
"ulsch-max-errors"
,
required_argument
,
NULL
,
LONG_OPTION_ULSCH_MAX_CONSECUTIVE_ERRORS
},
{
"calib-ue-rx"
,
required_argument
,
NULL
,
LONG_OPTION_CALIB_UE_RX
},
{
"calib-ue-rx-med"
,
required_argument
,
NULL
,
LONG_OPTION_CALIB_UE_RX_MED
},
...
...
@@ -2085,11 +2090,19 @@ static void get_options (int argc, char **argv)
while
((
c
=
getopt_long
(
argc
,
argv
,
"A:a:C:dEK:g:F:G:hqO:m:SUVRM:r:P:Ws:t:Tx:"
,
long_options
,
NULL
))
!=
-
1
)
{
switch
(
c
)
{
case
LONG_OPTION_RF_CONFIG_FILE
:
if
(
strlen
(
optarg
)
<=
1024
)
strcpy
(
rf_config_file
,
optarg
);
else
{
printf
(
"Configuration filename is too long
\n
"
);
exit
(
-
1
);
}
break
;
case
LONG_OPTION_MAXPOWER
:
tx_max_power
[
0
]
=
atoi
(
optarg
);
for
(
CC_id
=
1
;
CC_id
<
MAX_NUM_CCs
;
CC_id
++
)
tx_max_power
[
CC_id
]
=
tx_max_power
[
0
];
break
;
case
LONG_OPTION_ULSCH_MAX_CONSECUTIVE_ERRORS
:
ULSCH_max_consecutive_errors
=
atoi
(
optarg
);
printf
(
"Set ULSCH_max_consecutive_errors = %d
\n
"
,
ULSCH_max_consecutive_errors
);
...
...
@@ -2552,8 +2565,12 @@ int main( int argc, char **argv )
}
logInit
();
rf_config_file
[
0
]
=
'\0'
;
get_options
(
argc
,
argv
);
//Command-line options
if
(
rf_config_file
[
0
]
==
'\0'
)
openair0_cfg
[
0
].
configFilename
=
NULL
;
else
openair0_cfg
[
0
].
configFilename
=
rf_config_file
;
// initialize the log (see log.h for details)
set_glog
(
glog_level
,
glog_verbosity
);
...
...
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