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
wangjie
OpenXG-RAN
Commits
2c4d08c1
Commit
2c4d08c1
authored
Apr 02, 2020
by
Florian Kaltenberger
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
re-enabling TX and putting TX and RX on the TRX antenna port
parent
551f934b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
10 deletions
+12
-10
executables/nr-ru.c
executables/nr-ru.c
+4
-6
targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp
targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp
+8
-4
No files found.
executables/nr-ru.c
View file @
2c4d08c1
...
@@ -664,16 +664,17 @@ void rx_rf(RU_t *ru,int *frame,int *slot) {
...
@@ -664,16 +664,17 @@ void rx_rf(RU_t *ru,int *frame,int *slot) {
siglen
=
(
fp
->
ofdm_symbol_size
+
fp
->
nb_prefix_samples0
)
+
(
rxsymb
-
1
)
*
(
fp
->
ofdm_symbol_size
+
fp
->
nb_prefix_samples
);
siglen
=
(
fp
->
ofdm_symbol_size
+
fp
->
nb_prefix_samples0
)
+
(
rxsymb
-
1
)
*
(
fp
->
ofdm_symbol_size
+
fp
->
nb_prefix_samples
);
proc
->
timestamp_rx
+=
fp
->
get_samples_per_slot
(
*
slot
%
fp
->
slots_per_frame
,
fp
)
-
siglen
;
proc
->
timestamp_rx
+=
fp
->
get_samples_per_slot
(
*
slot
%
fp
->
slots_per_frame
,
fp
)
-
siglen
;
//TODO: the 3rd parameter has to be adapted for arbitrary TDD configurations
ru
->
rfdevice
.
trx_issue_stream_cmd
(
&
ru
->
rfdevice
,
ru
->
rfdevice
.
trx_issue_stream_cmd
(
&
ru
->
rfdevice
,
proc
->
timestamp_rx
,
proc
->
timestamp_rx
,
siglen
);
siglen
+
2
*
fp
->
get_samples_per_slot
(
*
slot
,
fp
)
);
}
}
else
{
else
{
siglen
=
samples_per_slot
;
siglen
=
samples_per_slot
;
}
}
LOG_
I
(
PHY
,
"Reading %d samples for slot %d at timestamp %ld
\n
"
,
siglen
,
*
slot
,
proc
->
timestamp_rx
);
LOG_
D
(
PHY
,
"Reading %d samples for slot %d at timestamp %ld
\n
"
,
siglen
,
*
slot
,
proc
->
timestamp_rx
);
if
(
emulate_rf
)
{
if
(
emulate_rf
)
{
wait_on_condition
(
&
proc
->
mutex_emulateRF
,
&
proc
->
cond_emulateRF
,
&
proc
->
instance_cnt_emulateRF
,
"emulatedRF_thread"
);
wait_on_condition
(
&
proc
->
mutex_emulateRF
,
&
proc
->
cond_emulateRF
,
&
proc
->
instance_cnt_emulateRF
,
"emulatedRF_thread"
);
...
@@ -787,15 +788,12 @@ void tx_rf(RU_t *ru,int frame,int slot, uint64_t timestamp) {
...
@@ -787,15 +788,12 @@ void tx_rf(RU_t *ru,int frame,int slot, uint64_t timestamp) {
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME
(
VCD_SIGNAL_DUMPER_VARIABLES_TRX_TST
,
(
timestamp
-
ru
->
openair0_cfg
.
tx_sample_advance
)
&
0xffffffff
);
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME
(
VCD_SIGNAL_DUMPER_VARIABLES_TRX_TST
,
(
timestamp
-
ru
->
openair0_cfg
.
tx_sample_advance
)
&
0xffffffff
);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_WRITE
,
1
);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_WRITE
,
1
);
// prepare tx buffer pointers
// prepare tx buffer pointers
/*
txs
=
ru
->
rfdevice
.
trx_write_func
(
&
ru
->
rfdevice
,
txs
=
ru
->
rfdevice
.
trx_write_func
(
&
ru
->
rfdevice
,
timestamp
+
ru
->
ts_offset
-
ru
->
openair0_cfg
.
tx_sample_advance
-
sf_extension
,
timestamp
+
ru
->
ts_offset
-
ru
->
openair0_cfg
.
tx_sample_advance
-
sf_extension
,
txp
,
txp
,
siglen
+
sf_extension
,
siglen
+
sf_extension
,
ru
->
nb_tx
,
ru
->
nb_tx
,
flags
);
flags
);
*/
txs
=
siglen
+
sf_extension
;
LOG_D
(
PHY
,
"[TXPATH] RU %d tx_rf, writing to TS %llu, frame %d, unwrapped_frame %d, slot %d
\n
"
,
ru
->
idx
,
LOG_D
(
PHY
,
"[TXPATH] RU %d tx_rf, writing to TS %llu, frame %d, unwrapped_frame %d, slot %d
\n
"
,
ru
->
idx
,
(
long
long
unsigned
int
)
timestamp
,
frame
,
proc
->
frame_tx_unwrap
,
slot
);
(
long
long
unsigned
int
)
timestamp
,
frame
,
proc
->
frame_tx_unwrap
,
slot
);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_WRITE
,
0
);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_WRITE
,
0
);
...
...
targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp
View file @
2c4d08c1
...
@@ -1279,12 +1279,16 @@ extern "C" {
...
@@ -1279,12 +1279,16 @@ extern "C" {
s
->
tx_stream
=
s
->
usrp
->
get_tx_stream
(
stream_args_tx
);
s
->
tx_stream
=
s
->
usrp
->
get_tx_stream
(
stream_args_tx
);
/* Setting TX/RX BW after streamers are created due to USRP calibration issue */
/* Setting TX/RX BW after streamers are created due to USRP calibration issue */
for
(
int
i
=
0
;
i
<
((
int
)
s
->
usrp
->
get_tx_num_channels
())
&&
i
<
openair0_cfg
[
0
].
tx_num_channels
;
i
++
)
for
(
int
i
=
0
;
i
<
((
int
)
s
->
usrp
->
get_tx_num_channels
())
&&
i
<
openair0_cfg
[
0
].
tx_num_channels
;
i
++
)
{
s
->
usrp
->
set_tx_bandwidth
(
openair0_cfg
[
0
].
tx_bw
,
i
);
s
->
usrp
->
set_tx_bandwidth
(
openair0_cfg
[
0
].
tx_bw
,
i
);
s
->
usrp
->
set_tx_antenna
(
"TX/RX"
,
i
);
for
(
int
i
=
0
;
i
<
((
int
)
s
->
usrp
->
get_rx_num_channels
())
&&
i
<
openair0_cfg
[
0
].
rx_num_channels
;
i
++
)
}
for
(
int
i
=
0
;
i
<
((
int
)
s
->
usrp
->
get_rx_num_channels
())
&&
i
<
openair0_cfg
[
0
].
rx_num_channels
;
i
++
)
{
s
->
usrp
->
set_rx_bandwidth
(
openair0_cfg
[
0
].
rx_bw
,
i
);
s
->
usrp
->
set_rx_bandwidth
(
openair0_cfg
[
0
].
rx_bw
,
i
);
s
->
usrp
->
set_rx_antenna
(
"TX/RX"
,
i
);
}
for
(
int
i
=
0
;
i
<
openair0_cfg
[
0
].
rx_num_channels
;
i
++
)
{
for
(
int
i
=
0
;
i
<
openair0_cfg
[
0
].
rx_num_channels
;
i
++
)
{
LOG_I
(
HW
,
"RX Channel %d
\n
"
,
i
);
LOG_I
(
HW
,
"RX Channel %d
\n
"
,
i
);
LOG_I
(
HW
,
" Actual RX sample rate: %fMSps...
\n
"
,
s
->
usrp
->
get_rx_rate
(
i
)
/
1e6
);
LOG_I
(
HW
,
" Actual RX sample rate: %fMSps...
\n
"
,
s
->
usrp
->
get_rx_rate
(
i
)
/
1e6
);
...
...
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