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
ZhouShuya
OpenXG-RAN
Commits
2a54fa56
Commit
2a54fa56
authored
Feb 22, 2015
by
Raymond Knopp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
git-svn-id:
http://svn.eurecom.fr/openair4G/trunk@6597
818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent
90346d26
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
46 additions
and
32 deletions
+46
-32
targets/ARCH/COMMON/common_lib.h
targets/ARCH/COMMON/common_lib.h
+1
-1
targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp
targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp
+23
-16
targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band39.tm1.usrpb210.conf
...ROJECTS/GENERIC-LTE-EPC/CONF/enb.band39.tm1.usrpb210.conf
+5
-5
targets/RT/USER/Makefile
targets/RT/USER/Makefile
+5
-1
targets/RT/USER/lte-softmodem.c
targets/RT/USER/lte-softmodem.c
+1
-1
targets/RT/USER/lte-ue.c
targets/RT/USER/lte-ue.c
+11
-8
No files found.
targets/ARCH/COMMON/common_lib.h
View file @
2a54fa56
...
...
@@ -44,7 +44,7 @@ typedef struct openair0_device_t openair0_device;
#define MAX_CARDS 1
#endif
#define USRP_GAIN_OFFSET (
82
.0) // 82 calibrated for USRP B210 @ 2.6 GHz
#define USRP_GAIN_OFFSET (
65
.0) // 82 calibrated for USRP B210 @ 2.6 GHz
typedef
enum
{
max_gain
=
0
,
med_gain
,
byp_gain
...
...
targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp
View file @
2a54fa56
...
...
@@ -93,11 +93,11 @@ static int trx_usrp_start(openair0_device *device)
// init recv and send streaming
uhd
::
stream_cmd_t
cmd
(
uhd
::
stream_cmd_t
::
STREAM_MODE_START_CONTINUOUS
);
cmd
.
time_spec
=
s
->
usrp
->
get_time_now
()
+
uhd
::
time_spec_t
(
0.0
1
);
cmd
.
time_spec
=
s
->
usrp
->
get_time_now
()
+
uhd
::
time_spec_t
(
0.0
5
);
cmd
.
stream_now
=
false
;
// start at constant delay
s
->
rx_stream
->
issue_stream_cmd
(
cmd
);
s
->
tx_md
.
time_spec
=
s
->
usrp
->
get_time_now
()
+
uhd
::
time_spec_t
(
1
-
(
double
)
s
->
tx_forward_nsamps
/
s
->
sample_rate
);
s
->
tx_md
.
time_spec
=
cmd
.
time_spec
+
uhd
::
time_spec_t
(
1
-
(
double
)
s
->
tx_forward_nsamps
/
s
->
sample_rate
);
s
->
tx_md
.
has_time_spec
=
true
;
s
->
tx_md
.
start_of_burst
=
true
;
s
->
tx_md
.
end_of_burst
=
false
;
...
...
@@ -144,7 +144,7 @@ static int trx_usrp_read(openair0_device *device, openair0_timestamp *ptimestamp
usrp_state_t
*
s
=
(
usrp_state_t
*
)
device
->
priv
;
int
samples_received
,
i
;
int
samples_received
=
0
,
i
;
if
(
cc
>
1
)
{
std
::
vector
<
void
*>
buff_ptrs
;
...
...
@@ -154,6 +154,10 @@ static int trx_usrp_read(openair0_device *device, openair0_timestamp *ptimestamp
else
samples_received
=
s
->
rx_stream
->
recv
(
buff
[
0
],
nsamps
,
s
->
rx_md
);
if
(
samples_received
<
nsamps
)
{
printf
(
"[recv] received %d samples out of %d
\n
"
,
samples_received
,
nsamps
);
}
//handle the error code
switch
(
s
->
rx_md
.
error_code
){
case
uhd
:
:
rx_metadata_t
::
ERROR_CODE_NONE
:
...
...
@@ -232,12 +236,9 @@ int openair0_device_init(openair0_device* device, openair0_config_t *openair0_cf
memset
(
s
,
0
,
sizeof
(
usrp_state_t
));
// Initialize USRP device
/* thomas 26.01.205*/
// std::string args = "type=b200";
std
::
string
args
=
"type=b200"
;
/* std::string rx_subdev = "A:A A:B";
std::string tx_subdev = "A:A A:B";*/
uhd
::
device_addrs_t
device_adds
=
uhd
::
device
::
find
(
args
);
size_t
i
;
...
...
@@ -309,25 +310,31 @@ int openair0_device_init(openair0_device* device, openair0_config_t *openair0_cf
}
// display USRP settings
std
::
cout
<<
boost
::
format
(
"Actual master clock: %fMHz..."
)
%
(
s
->
usrp
->
get_master_clock_rate
()
/
1e6
)
<<
std
::
endl
;
// create tx & rx streamer
uhd
::
stream_args_t
stream_args_rx
(
"sc16"
,
"sc16"
);
//stream_args_rx.args["spp"] = str(boost::format("%d") % (openair0_cfg[0].samples_per_packet));
uhd
::
stream_args_t
stream_args_tx
(
"sc16"
,
"sc16"
);
//stream_args_tx.args["spp"] = str(boost::format("%d") % (openair0_cfg[0].samples_per_packet));
//stream_args_rx.args["spp"] = str(boost::format("%d") % 2048);//(openair0_cfg[0].rx_num_channels*openair0_cfg[0].samples_per_packet));
for
(
i
=
0
;
i
<
openair0_cfg
[
0
].
rx_num_channels
;
i
++
)
stream_args_rx
.
channels
.
push_back
(
i
);
stream_args_rx
.
channels
.
push_back
(
i
);
s
->
rx_stream
=
s
->
usrp
->
get_rx_stream
(
stream_args_rx
);
std
::
cout
<<
boost
::
format
(
"rx_max_num_samps %u"
)
%
(
s
->
rx_stream
->
get_max_num_samps
())
<<
std
::
endl
;
//openair0_cfg[0].samples_per_packet = s->rx_stream->get_max_num_samps();
uhd
::
stream_args_t
stream_args_tx
(
"sc16"
,
"sc16"
);
//stream_args_tx.args["spp"] = str(boost::format("%d") % 2048);//(openair0_cfg[0].tx_num_channels*openair0_cfg[0].samples_per_packet));
for
(
i
=
0
;
i
<
openair0_cfg
[
0
].
tx_num_channels
;
i
++
)
stream_args_tx
.
channels
.
push_back
(
i
);
s
->
tx_stream
=
s
->
usrp
->
get_tx_stream
(
stream_args_tx
);
s
->
rx_stream
=
s
->
usrp
->
get_rx_stream
(
stream_args_rx
);
std
::
cout
<<
boost
::
format
(
"tx_max_num_samps %u"
)
%
(
s
->
tx_stream
->
get_max_num_samps
())
<<
std
::
endl
;
s
->
usrp
->
set_time_now
(
uhd
::
time_spec_t
(
0.0
));
// display USRP settings
std
::
cout
<<
boost
::
format
(
"Actual master clock: %fMHz..."
)
%
(
s
->
usrp
->
get_master_clock_rate
()
/
1e6
)
<<
std
::
endl
<<
std
::
endl
;
for
(
i
=
0
;
i
<
openair0_cfg
[
0
].
rx_num_channels
;
i
++
)
{
if
(
i
<
openair0_cfg
[
0
].
rx_num_channels
)
{
...
...
targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band39.tm1.usrpb210.conf
View file @
2a54fa56
...
...
@@ -43,7 +43,7 @@ eNBs =
uplink_frequency_offset
=
0
;
Nid_cell
=
0
;
N_RB_DL
=
50
;
N_RB_DL
=
25
;
Nid_cell_mbsfn
=
0
;
nb_antennas_tx
=
1
;
nb_antennas_rx
=
1
;
...
...
@@ -132,12 +132,12 @@ eNBs =
log_config
:
{
global_log_level
=
"
info
"
;
global_log_verbosity
=
"
medium
"
;
global_log_level
=
"
debug
"
;
global_log_verbosity
=
"
high
"
;
hw_log_level
=
"info"
;
hw_log_verbosity
=
"medium"
;
phy_log_level
=
"
info
"
;
phy_log_verbosity
=
"
medium
"
;
phy_log_level
=
"
debug
"
;
phy_log_verbosity
=
"
high
"
;
mac_log_level
=
"info"
;
mac_log_verbosity
=
"high"
;
rlc_log_level
=
"info"
;
...
...
targets/RT/USER/Makefile
View file @
2a54fa56
...
...
@@ -24,7 +24,7 @@ ifndef USRP
USRP
=
0
endif
CFLAGS
+=
-DDRIVER2013
-I
$(OPENAIR_TARGETS)
/ARCH/COMMON
-I
.
CFLAGS
+=
-DDRIVER2013
-I
$(OPENAIR_TARGETS)
/ARCH/COMMON
-I
.
ifndef
OPENAIR2
OPENAIR2
=
1
...
...
@@ -35,6 +35,10 @@ DISABLE_XER_PRINT=0
MSG_PRINT
=
1
endif
ifdef
Rel10
CFLAGS
+=
-DRel10
endif
ifeq
($(EXMIMO),1)
CFLAGS
+=
-I
$(OPENAIR_TARGETS)
/ARCH/EXMIMO/USERSPACE/LIB/
-I
$(OPENAIR_TARGETS)
/ARCH/EXMIMO/DEFS
-DENABLE_VCD_FIFO
endif
...
...
targets/RT/USER/lte-softmodem.c
View file @
2a54fa56
...
...
@@ -328,7 +328,7 @@ int16_t rlc_log_level = LOG_INFO;
int16_t
rlc_log_verbosity
=
LOG_MED
;
int16_t
pdcp_log_level
=
LOG_INFO
;
int16_t
pdcp_log_verbosity
=
LOG_MED
;
int16_t
rrc_log_level
=
LOG_
INFO
;
int16_t
rrc_log_level
=
LOG_
DEBUG
;
int16_t
rrc_log_verbosity
=
LOG_MED
;
# if defined(ENABLE_USE_MME)
int16_t
gtpu_log_level
=
LOG_DEBUG
;
...
...
targets/RT/USER/lte-ue.c
View file @
2a54fa56
...
...
@@ -186,7 +186,7 @@ static const eutra_band_t eutra_bands[] =
{
14
,
788
*
MHz
,
798
*
MHz
,
758
*
MHz
,
768
*
MHz
,
FDD
},
{
17
,
704
*
MHz
,
716
*
MHz
,
734
*
MHz
,
746
*
MHz
,
FDD
},
{
20
,
832
*
MHz
,
862
*
MHz
,
791
*
MHz
,
821
*
MHz
,
FDD
},
{
33
,
1900
*
MHz
,
1920
*
MHz
,
1900
*
MHz
,
1920
*
MHz
,
TDD
},
{
34
,
2010
*
MHz
,
2025
*
MHz
,
2010
*
MHz
,
2025
*
MHz
,
TDD
},
{
35
,
1850
*
MHz
,
1910
*
MHz
,
1850
*
MHz
,
1910
*
MHz
,
TDD
},
...
...
@@ -231,6 +231,7 @@ static void *UE_thread_synch(void *arg) {
found
=
0
;
current_band
=
eutra_bands
[
ind
].
band
;
do
{
printf
(
"Scanning band %d, dl_min %u
\n
"
,
current_band
,
eutra_bands
[
ind
].
dl_min
);
if
((
eutra_bands
[
ind
].
dl_min
<=
downlink_frequency
[
0
][
0
])
&&
(
eutra_bands
[
ind
].
dl_max
>=
downlink_frequency
[
0
][
0
]))
{
for
(
card
=
0
;
card
<
MAX_NUM_CCs
;
card
++
)
for
(
i
=
0
;
i
<
4
;
i
++
)
...
...
@@ -239,7 +240,7 @@ static void *UE_thread_synch(void *arg) {
break
;
}
ind
++
;
current_band
=
eutra_bands
[
++
ind
].
band
;
current_band
=
eutra_bands
[
ind
].
band
;
}
while
(
current_band
<
44
);
if
(
found
==
0
)
{
...
...
@@ -374,8 +375,10 @@ static void *UE_thread_synch(void *arg) {
mac_xface
->
macphy_exit
(
"No cell synchronization found, abandoning"
);
}
else
{
LOG_I
(
PHY
,
"[initial_sync] trying carrier off %d Hz, rxgain %d
\n
"
,
openair_daq_vars
.
freq_offset
,
UE
->
rx_total_gain_dB
);
LOG_I
(
PHY
,
"[initial_sync] trying carrier off %d Hz, rxgain %d (DL %u, UL %u)
\n
"
,
openair_daq_vars
.
freq_offset
,
UE
->
rx_total_gain_dB
,
downlink_frequency
[
0
][
0
]
+
openair_daq_vars
.
freq_offset
,
downlink_frequency
[
0
][
0
]
+
uplink_frequency_offset
[
0
][
0
]
+
openair_daq_vars
.
freq_offset
);
for
(
card
=
0
;
card
<
MAX_CARDS
;
card
++
)
{
for
(
i
=
0
;
i
<
openair0_cfg
[
card
].
rx_num_channels
;
i
++
)
{
openair0_cfg
[
card
].
rx_freq
[
i
]
=
downlink_frequency
[
card
][
i
]
+
openair_daq_vars
.
freq_offset
;
...
...
@@ -802,7 +805,6 @@ void *UE_thread(void *arg) {
for
(
i
=
0
;
i
<
UE
->
lte_frame_parms
.
nb_antennas_rx
;
i
++
)
rxp
[
i
]
=
(
dummy_dump
==
0
)
?
(
void
*
)
&
rxdata
[
i
][
rxpos
]
:
(
void
*
)
dummy
[
i
];
// printf("rxpos %d, hw_subframe %d, dummy_dump %d (asking %d)\n",rxpos,hw_subframe,dummy_dump,spp - ((first_rx==1) ? rx_off_diff : 0));
rxs
=
openair0
.
trx_read_func
(
&
openair0
,
&
timestamp
,
rxp
,
...
...
@@ -945,8 +947,9 @@ void *UE_thread(void *arg) {
#endif
UE
->
rx_offset
=
0
;
}
else
if
((
UE
->
rx_offset
<
RX_OFF_MIN
)
&&
(
start_rx_stream
==
1
))
{
// rx_off_diff = -UE->rx_offset + RX_OFF_MIN;
else
if
((
UE
->
rx_offset
<
RX_OFF_MIN
)
&&
(
start_rx_stream
==
1
)
&&
(
rx_correction_timer
==
0
))
{
rx_off_diff
=
-
UE
->
rx_offset
+
RX_OFF_MIN
;
rx_correction_timer
=
5
;
}
else
if
((
UE
->
rx_offset
>
(
FRAME_LENGTH_COMPLEX_SAMPLES
-
RX_OFF_MAX
))
&&
(
start_rx_stream
==
1
)
&&
(
rx_correction_timer
==
0
))
{
rx_off_diff
=
FRAME_LENGTH_COMPLEX_SAMPLES
-
UE
->
rx_offset
;
...
...
@@ -954,7 +957,7 @@ void *UE_thread(void *arg) {
}
if
(
rx_correction_timer
>
0
)
rx_correction_timer
--
;
// LOG_D(PHY,"HW RESYNC: hw_frame %d:
Correction: rx_off_diff %d (timer %d)\n",frame
,rx_off_diff,rx_correction_timer);
// LOG_D(PHY,"HW RESYNC: hw_frame %d:
(rx_offset %d) Correction: rx_off_diff %d (timer %d)\n",frame,UE->rx_offset
,rx_off_diff,rx_correction_timer);
}
dummy_dump
=
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