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
zzha zzha
OpenXG-RAN
Commits
958c66c6
Commit
958c66c6
authored
8 years ago
by
Raymond Knopp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
handling of timing drift in rfdevice
parent
79bd3ea7
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
2 deletions
+11
-2
targets/RT/USER/lte-enb.c
targets/RT/USER/lte-enb.c
+11
-2
No files found.
targets/RT/USER/lte-enb.c
View file @
958c66c6
...
...
@@ -843,6 +843,8 @@ void rx_rf(PHY_VARS_eNB *eNB,int *frame,int *subframe) {
unsigned
int
rxs
,
txs
;
int
i
;
int
tx_sfoffset
=
3
;
//(eNB->single_thread_flag == 1) ? 3 : 3;
openair0_timestamp
old_ts
;
if
(
proc
->
first_rx
==
0
)
{
// Transmit TX buffer based on timestamp from RX
...
...
@@ -876,6 +878,8 @@ void rx_rf(PHY_VARS_eNB *eNB,int *frame,int *subframe) {
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_READ
,
1
);
old_ts
=
proc
->
timestamp_rx
;
rxs
=
eNB
->
rfdevice
.
trx_read_func
(
&
eNB
->
rfdevice
,
&
(
proc
->
timestamp_rx
),
rxp
,
...
...
@@ -883,13 +887,18 @@ void rx_rf(PHY_VARS_eNB *eNB,int *frame,int *subframe) {
fp
->
nb_antennas_rx
);
if
(
rxs
!=
fp
->
samples_per_tti
)
printf
(
"
Asked for %d samples, got %d from USRP
\n
"
,
fp
->
samples_per_tti
,
rxs
);
LOG_E
(
PHY
,
"rx_rf:
Asked for %d samples, got %d from USRP
\n
"
,
fp
->
samples_per_tti
,
rxs
);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_READ
,
0
);
if
(
proc
->
first_rx
==
1
)
eNB
->
ts_offset
=
proc
->
timestamp_rx
;
else
{
if
(
proc
->
timestamp_rx
-
old_ts
!=
fp
->
samples_per_tti
)
{
LOG_I
(
PHY
,
"rx_rf: rfdevice timing drift of %d samples
\n
"
,
proc
->
timestamp_rx
-
old_ts
);
eNB
->
ts_offset
+=
(
proc
->
timestamp_rx
-
old_ts
);
}
}
proc
->
frame_rx
=
((
proc
->
timestamp_rx
-
eNB
->
ts_offset
)
/
(
fp
->
samples_per_tti
*
10
))
&
1023
;
proc
->
subframe_rx
=
((
proc
->
timestamp_rx
-
eNB
->
ts_offset
)
/
fp
->
samples_per_tti
)
%
10
;
// synchronize first reception to frame 0 subframe 0
...
...
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