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
ae3f0f6b
Commit
ae3f0f6b
authored
Oct 22, 2018
by
Florian Kaltenberger
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'nr-emulate-rf' into 'develop-nr'
Nr emulate rf See merge request oai/openairinterface5g!417
parents
c43b8acb
5a3b657f
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
54 additions
and
8 deletions
+54
-8
targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp
targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp
+1
-1
targets/RT/USER/lte-ru.c
targets/RT/USER/lte-ru.c
+29
-2
targets/RT/USER/nr-ru.c
targets/RT/USER/nr-ru.c
+24
-5
No files found.
targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp
View file @
ae3f0f6b
...
...
@@ -1039,7 +1039,7 @@ extern "C" {
if
(
device_adds
.
size
()
==
0
)
{
double
usrp_master_clock
=
184.32e6
;
std
::
string
args
=
"type=x300
, addr=192.168.30.2
"
;
std
::
string
args
=
"type=x300"
;
// 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
);
...
...
targets/RT/USER/lte-ru.c
View file @
ae3f0f6b
...
...
@@ -1525,9 +1525,10 @@ volatile int16_t phy_tx_end;
static
void
*
ru_thread_tx
(
void
*
param
)
{
RU_t
*
ru
=
(
RU_t
*
)
param
;
RU_proc_t
*
proc
=
&
ru
->
proc
;
LTE_DL_FRAME_PARMS
*
fp
=
ru
->
frame_parms
;
cpu_set_t
cpuset
;
CPU_ZERO
(
&
cpuset
);
char
filename
[
256
];
thread_top_init
(
"ru_thread_tx"
,
1
,
400000
,
500000
,
500000
);
...
...
@@ -1561,6 +1562,19 @@ static void* ru_thread_tx( void* param ) {
if
(
ru
->
fh_north_out
)
ru
->
fh_north_out
(
ru
);
}
else
{
for
(
int
i
=
0
;
i
<
ru
->
nb_tx
;
i
++
)
{
if
(
proc
->
frame_tx
==
2
)
{
sprintf
(
filename
,
"txdataF%d_frame%d_sf%d.m"
,
i
,
proc
->
frame_tx
,
proc
->
subframe_tx
);
LOG_M
(
filename
,
"txdataF_frame"
,
ru
->
common
.
txdataF_BF
[
i
],
fp
->
symbols_per_tti
*
fp
->
ofdm_symbol_size
,
1
,
1
);
}
if
(
proc
->
frame_tx
==
2
&&
proc
->
subframe_tx
==
0
){
sprintf
(
filename
,
"txdata%d_frame%d.m"
,
i
,
proc
->
frame_tx
);
LOG_M
(
filename
,
"txdata_frame"
,
ru
->
common
.
txdata
[
i
],
fp
->
samples_per_tti
*
10
,
1
,
1
);
}
}
}
release_thread
(
&
proc
->
mutex_eNBs
,
&
proc
->
instance_cnt_eNBs
,
"ru_thread_tx"
);
pthread_mutex_lock
(
&
proc
->
mutex_eNBs
);
...
...
@@ -1588,7 +1602,7 @@ static void* ru_thread( void* param ) {
int
frame
=
1023
;
cpu_set_t
cpuset
;
CPU_ZERO
(
&
cpuset
);
char
filename
[
256
];
// set default return value
ru_thread_status
=
0
;
...
...
@@ -1794,6 +1808,19 @@ static void* ru_thread( void* param ) {
if
(
ru
->
fh_north_out
)
ru
->
fh_north_out
(
ru
);
}
else
{
for
(
int
i
=
0
;
i
<
ru
->
nb_tx
;
i
++
)
{
if
(
proc
->
frame_tx
==
2
)
{
sprintf
(
filename
,
"txdataF%d_frame%d_sf%d.m"
,
i
,
proc
->
frame_tx
,
proc
->
subframe_tx
);
LOG_M
(
filename
,
"txdataF_frame"
,
ru
->
common
.
txdataF_BF
[
i
],
fp
->
symbols_per_tti
*
fp
->
ofdm_symbol_size
,
1
,
1
);
}
if
(
proc
->
frame_tx
==
2
&&
proc
->
subframe_tx
==
0
){
sprintf
(
filename
,
"txdata%d_frame%d.m"
,
i
,
proc
->
frame_tx
);
LOG_M
(
filename
,
"txdata_frame"
,
ru
->
common
.
txdata
[
i
],
fp
->
samples_per_tti
*
10
,
1
,
1
);
}
}
}
proc
->
emulate_rf_busy
=
0
;
}
#else
...
...
targets/RT/USER/nr-ru.c
View file @
ae3f0f6b
...
...
@@ -852,7 +852,6 @@ void tx_rf(RU_t *ru) {
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME
(
VCD_SIGNAL_DUMPER_VARIABLES_TRX_TST
,
(
proc
->
timestamp_tx
-
ru
->
openair0_cfg
.
tx_sample_advance
)
&
0xffffffff
);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_WRITE
,
1
);
// prepare tx buffer pointers
txs
=
ru
->
rfdevice
.
trx_write_func
(
&
ru
->
rfdevice
,
proc
->
timestamp_tx
+
ru
->
ts_offset
-
ru
->
openair0_cfg
.
tx_sample_advance
-
sf_extension
,
txp
,
...
...
@@ -1388,6 +1387,9 @@ static void* ru_thread( void* param ) {
int
ret
;
int
subframe
=
9
;
int
frame
=
1023
;
char
filename
[
40
];
int
print_frame
=
2
;
int
i
=
0
;
// set default return value
ru_thread_status
=
0
;
...
...
@@ -1521,14 +1523,31 @@ static void* ru_thread( void* param ) {
// do OFDM if needed
if
((
ru
->
fh_north_asynch_in
==
NULL
)
&&
(
ru
->
feptx_ofdm
))
ru
->
feptx_ofdm
(
ru
);
if
(
!
emulate_rf
)
if
(
!
emulate_rf
)
{
// do outgoing fronthaul (south) if needed
if
((
ru
->
fh_north_asynch_in
==
NULL
)
&&
(
ru
->
fh_south_out
))
ru
->
fh_south_out
(
ru
);
}
if
(
ru
->
fh_north_out
)
ru
->
fh_north_out
(
ru
);
}
else
{
if
(
proc
->
frame_tx
==
print_frame
)
{
for
(
i
=
0
;
i
<
ru
->
nb_tx
;
i
++
)
{
sprintf
(
filename
,
"tx%ddataF_frame%d_sf%d.m"
,
i
,
print_frame
,
proc
->
subframe_tx
);
LOG_M
(
filename
,
"txdataF_frame"
,
&
ru
->
common
.
txdataF_BF
[
i
][
0
],
fp
->
samples_per_subframe_wCP
,
1
,
1
);
if
(
proc
->
subframe_tx
==
9
)
{
sprintf
(
filename
,
"tx%ddata_frame%d.m"
,
i
,
print_frame
);
LOG_M
(
filename
,
"txdata_frame"
,
&
ru
->
common
.
txdata
[
i
][
0
],
fp
->
samples_per_frame
,
1
,
1
);
}
}
}
//else if (proc->frame_tx > print_frame) oai_exit = 1;
}
}
printf
(
"Exiting ru_thread
\n
"
);
...
...
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