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
c43db483
Commit
c43db483
authored
Apr 01, 2020
by
Florian Kaltenberger
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
debugging
parent
9276121d
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
167 additions
and
188 deletions
+167
-188
executables/nr-ru.c
executables/nr-ru.c
+8
-3
targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp
targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp
+3
-2
targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.usrpb210.conf
.../GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.usrpb210.conf
+156
-183
No files found.
executables/nr-ru.c
View file @
c43db483
...
...
@@ -638,8 +638,6 @@ void rx_rf(RU_t *ru,int *frame,int *slot) {
for
(
i
=
0
;
i
<
ru
->
nb_rx
;
i
++
)
rxp
[
i
]
=
(
void
*
)
&
ru
->
common
.
rxdata
[
i
][
fp
->
get_samples_slot_timestamp
(
*
slot
,
fp
,
0
)];
LOG_D
(
PHY
,
"Reading %d samples for slot %d (%p)
\n
"
,
samples_per_slot
,
*
slot
,
rxp
[
0
]);
//when the USRP starts, it initializes the timestamp to 0. We wait 1 frames until we program the first rx.
if
(
proc
->
first_rx
==
1
)
{
proc
->
timestamp_rx
=
fp
->
samples_per_frame
;
...
...
@@ -647,7 +645,7 @@ void rx_rf(RU_t *ru,int *frame,int *slot) {
}
else
{
//we always advance the timestamp by samples_per_slot, even if we have not read the (full) slot. This is to keep the timestamp updated even when there is no RX.
proc
->
timestamp_rx
+=
fp
->
get_samples_per_slot
(
(
*
slot
-
1
)
%
fp
->
slots_per_frame
,
fp
);
proc
->
timestamp_rx
+=
fp
->
get_samples_per_slot
(
*
slot
%
fp
->
slots_per_frame
,
fp
);
}
int
slot_type
=
nr_slot_select
(
cfg
,
*
frame
,
*
slot
%
fp
->
slots_per_frame
);
...
...
@@ -661,12 +659,16 @@ void rx_rf(RU_t *ru,int *frame,int *slot) {
rxsymb
++
;
}
AssertFatal
(
rxsymb
>
0
,
"illegal rxsymb %d
\n
"
,
rxsymb
);
//TODO: this has to be adapted for numerology!=1
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
;
}
else
{
siglen
=
samples_per_slot
;
}
LOG_I
(
PHY
,
"Reading %d samples for slot %d at timestamp %ld
\n
"
,
siglen
,
*
slot
,
proc
->
timestamp_rx
);
if
(
emulate_rf
)
{
wait_on_condition
(
&
proc
->
mutex_emulateRF
,
&
proc
->
cond_emulateRF
,
&
proc
->
instance_cnt_emulateRF
,
"emulatedRF_thread"
);
release_thread
(
&
proc
->
mutex_emulateRF
,
&
proc
->
instance_cnt_emulateRF
,
"emulatedRF_thread"
);
...
...
@@ -779,12 +781,15 @@ 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_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_WRITE
,
1
);
// prepare tx buffer pointers
/*
txs = ru->rfdevice.trx_write_func(&ru->rfdevice,
timestamp+ru->ts_offset-ru->openair0_cfg.tx_sample_advance-sf_extension,
txp,
siglen+sf_extension,
ru->nb_tx,
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
,
(
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
);
...
...
targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp
View file @
c43db483
...
...
@@ -661,10 +661,11 @@ static int trx_usrp_read(openair0_device *device, openair0_timestamp ptimestamp,
// receive a single channel (e.g. from connector RF A)
samples_received
=
0
;
while
(
samples_received
!=
nsamps
)
{
//
while (samples_received != nsamps) {
samples_received
+=
s
->
rx_stream
->
recv
((
void
*
)((
int32_t
*
)
buff_tmp
[
0
]
+
samples_received
),
nsamps
-
samples_received
,
s
->
rx_md
);
/*
if ((s->wait_for_first_pps == 0) && (s->rx_md.error_code!=uhd::rx_metadata_t::ERROR_CODE_NONE))
break;
...
...
@@ -672,7 +673,7 @@ static int trx_usrp_read(openair0_device *device, openair0_timestamp ptimestamp,
printf("sleep...\n"); //usleep(100);
}
}
*/
if
(
samples_received
==
nsamps
)
s
->
wait_for_first_pps
=
0
;
}
...
...
targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.usrpb210.conf
View file @
c43db483
This diff is collapsed.
Click to expand it.
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