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
ebbdf1e4
Commit
ebbdf1e4
authored
Nov 17, 2015
by
Rohit Gupta
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added USRP X310 interface handling
parent
0870e4bf
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
37 additions
and
33 deletions
+37
-33
targets/ARCH/COMMON/common_lib.c
targets/ARCH/COMMON/common_lib.c
+1
-1
targets/ARCH/COMMON/common_lib.h
targets/ARCH/COMMON/common_lib.h
+4
-2
targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp
targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp
+29
-27
targets/RT/USER/eNB_transport_IQ.c
targets/RT/USER/eNB_transport_IQ.c
+1
-1
targets/RT/USER/rrh_gw.c
targets/RT/USER/rrh_gw.c
+1
-1
targets/RT/USER/rrh_gw.h
targets/RT/USER/rrh_gw.h
+1
-1
No files found.
targets/ARCH/COMMON/common_lib.c
View file @
ebbdf1e4
...
...
@@ -52,7 +52,7 @@ int openair0_device_init(openair0_device *device, openair0_config_t *openair0_cf
openair0_dev_init_exmimo
(
device
,
openair0_cfg
);
printf
(
"openair0_dev_init_exmimo...
\n
"
);
#elif OAI_USRP
device
->
type
=
USRP_IF
;
device
->
type
=
USRP_
B200_
IF
;
openair0_dev_init_usrp
(
device
,
openair0_cfg
);
printf
(
"openair0_dev_init_usrp ...
\n
"
);
#elif OAI_BLADERF
...
...
targets/ARCH/COMMON/common_lib.h
View file @
ebbdf1e4
...
...
@@ -151,8 +151,10 @@ typedef enum {
ETH_IF
,
/*!\brief device is ExpressMIMO */
EXMIMO_IF
,
/*!\brief device is USRP*/
USRP_IF
,
/*!\brief device is USRP B200/B210*/
USRP_B200_IF
,
/*!\brief device is USRP X300/X310*/
USRP_X300_IF
,
/*!\brief device is BLADE RF*/
BLADERF_IF
,
/*!\brief device is NONE*/
...
...
targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp
View file @
ebbdf1e4
...
...
@@ -171,7 +171,7 @@ static int trx_usrp_read(openair0_device *device, openair0_timestamp *ptimestamp
#endif
/*
if
(
device
->
type
==
USRP_B200_IF
)
{
if
(
cc
>
1
)
{
// receive multiple channels (e.g. RF A and RF B)
std
::
vector
<
void
*>
buff_ptrs
;
...
...
@@ -181,20 +181,8 @@ static int trx_usrp_read(openair0_device *device, openair0_timestamp *ptimestamp
}
else
{
// receive a single channel (e.g. from connector RF A)
samples_received
=
s
->
rx_stream
->
recv
(
buff_tmp
[
0
],
nsamps
,
s
->
rx_md
);
}*/
if
(
cc
>
1
)
{
// receive multiple channels (e.g. RF A and RF B)
std
::
vector
<
void
*>
buff_ptrs
;
for
(
int
i
=
0
;
i
<
cc
;
i
++
)
buff_ptrs
.
push_back
(
buff
[
i
]);
samples_received
=
s
->
rx_stream
->
recv
(
buff_ptrs
,
nsamps
,
s
->
rx_md
);
}
else
{
// receive a single channel (e.g. from connector RF A)
samples_received
=
s
->
rx_stream
->
recv
(
buff
[
0
],
nsamps
,
s
->
rx_md
);
}
/*
// bring RX data into 12 LSBs for softmodem RX
for
(
int
i
=
0
;
i
<
cc
;
i
++
)
{
for
(
int
j
=
0
;
j
<
nsamps2
;
j
++
)
{
...
...
@@ -209,7 +197,18 @@ static int trx_usrp_read(openair0_device *device, openair0_timestamp *ptimestamp
#endif
}
}
*/
}
else
if
(
device
->
type
==
USRP_X300_IF
)
{
if
(
cc
>
1
)
{
// receive multiple channels (e.g. RF A and RF B)
std
::
vector
<
void
*>
buff_ptrs
;
for
(
int
i
=
0
;
i
<
cc
;
i
++
)
buff_ptrs
.
push_back
(
buff
[
i
]);
samples_received
=
s
->
rx_stream
->
recv
(
buff_ptrs
,
nsamps
,
s
->
rx_md
);
}
else
{
// receive a single channel (e.g. from connector RF A)
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
);
...
...
@@ -397,6 +396,9 @@ int openair0_dev_init_usrp(openair0_device* device, openair0_config_t *openair0_
// lock mboard clocks
s
->
usrp
->
set_clock_source
(
"internal"
);
//Setting device type to USRP X300/X310
device
->
type
=
USRP_X300_IF
;
// this is not working yet, master clock has to be set via constructor
// set master clock rate and sample rate for tx & rx for streaming
//s->usrp->set_master_clock_rate(usrp_master_clock);
...
...
targets/RT/USER/eNB_transport_IQ.c
View file @
ebbdf1e4
...
...
@@ -172,7 +172,7 @@ void config_BBU_mod( rrh_module_t *mod_enb, uint8_t RT_flag, uint8_t NRT_flag) {
mod_enb
->
devs
->
openair0_cfg
.
tx_delay
=
8
;
}
}
else
if
(
mod_enb
->
devs
->
type
==
USRP_IF
)
{
else
if
(
(
mod_enb
->
devs
->
type
==
USRP_B200_IF
)
||
(
mod_enb
->
devs
->
type
==
USRP_X300_IF
)
)
{
if
(
mod_enb
->
devs
->
openair0_cfg
.
num_rb_dl
==
100
)
{
mod_enb
->
devs
->
openair0_cfg
.
samples_per_packet
=
2048
;
mod_enb
->
devs
->
openair0_cfg
.
tx_forward_nsamps
=
175
;
...
...
targets/RT/USER/rrh_gw.c
View file @
ebbdf1e4
...
...
@@ -216,7 +216,7 @@ static rrh_module_t new_module (unsigned int id) {
LOG_I
(
RRH
,
"Setting RF device to EXMIMO
\n
"
);
#elif OAI_USRP
rrh_mod
.
devs
=
oai_dv
;
rrh_mod
.
devs
->
type
=
USRP_IF
;
rrh_mod
.
devs
->
type
=
USRP_
B200_
IF
;
LOG_I
(
RRH
,
"Setting RF device to USRP
\n
"
);
#elif OAI_BLADERF
rrh_mod
.
devs
=
oai_dv
;
...
...
targets/RT/USER/rrh_gw.h
View file @
ebbdf1e4
...
...
@@ -51,7 +51,7 @@
/*! \brief RRH supports two types of modules: eNB and UE
each module is associated with an ethernet device (device of ETH_IF)
and optionally with a RF device (device type can be USRP_
IF
/BLADERF_IF/EXMIMO_IF/NONE_IF)
and optionally with a RF device (device type can be USRP_
B200/USRP_X300
/BLADERF_IF/EXMIMO_IF/NONE_IF)
UE modules will always have RF device type NONE_IF */
typedef
struct
{
/*! \brief module id */
...
...
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