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
spbro
OpenXG-RAN
Commits
29f84b81
Commit
29f84b81
authored
May 30, 2022
by
Raymond Knopp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
commit before merge
parent
d0be523f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
4 deletions
+6
-4
executables/nr-ru.c
executables/nr-ru.c
+1
-1
targets/ARCH/ETHERNET/USERSPACE/LIB/eth_udp.c
targets/ARCH/ETHERNET/USERSPACE/LIB/eth_udp.c
+5
-3
No files found.
executables/nr-ru.c
View file @
29f84b81
...
@@ -285,7 +285,7 @@ void fh_if5_south_out(RU_t *ru, int frame, int slot, uint64_t timestamp) {
...
@@ -285,7 +285,7 @@ void fh_if5_south_out(RU_t *ru, int frame, int slot, uint64_t timestamp) {
ru
->
nr_frame_parms
->
get_samples_per_slot
(
slot
,
ru
->
nr_frame_parms
),
ru
->
nr_frame_parms
->
get_samples_per_slot
(
slot
,
ru
->
nr_frame_parms
),
0
);
0
);
stop_meas
(
&
ru
->
tx_fhaul
);
stop_meas
(
&
ru
->
tx_fhaul
);
LOG_D
(
PHY
,
"IF5 TX %d.%d
\n
"
,
frame
,
slot
);
}
}
// southbound IF4p5 fronthaul
// southbound IF4p5 fronthaul
...
...
targets/ARCH/ETHERNET/USERSPACE/LIB/eth_udp.c
View file @
29f84b81
...
@@ -334,9 +334,9 @@ int trx_eth_write_udp(openair0_device *device, openair0_timestamp timestamp, voi
...
@@ -334,9 +334,9 @@ int trx_eth_write_udp(openair0_device *device, openair0_timestamp timestamp, voi
}
}
openair0_timestamp
TS
=
timestamp
+
fhstate
->
TS0
;
openair0_timestamp
TS
=
timestamp
+
fhstate
->
TS0
;
TS
=
6
*
device
->
sampling_rate_ratio_d
*
(
TS
/
device
->
sampling_rate_ratio_n
)
;
TS
=
(
6
*
device
->
sampling_rate_ratio_d
*
TS
)
/
device
->
sampling_rate_ratio_n
;
TS
-=
device
->
txrx_offset
;
TS
-=
device
->
txrx_offset
;
int
TSinc
=
6
*
256
*
device
->
sampling_rate_ratio_d
/
device
->
sampling_rate_ratio_n
;
int
TSinc
=
(
6
*
256
*
device
->
sampling_rate_ratio_d
)
/
device
->
sampling_rate_ratio_n
;
for
(
int
offset
=
0
;
offset
<
nsamps
;
offset
+=
256
,
TS
+=
TSinc
)
{
for
(
int
offset
=
0
;
offset
<
nsamps
;
offset
+=
256
,
TS
+=
TSinc
)
{
// OAI modified SEQ_ID (4 bytes)
// OAI modified SEQ_ID (4 bytes)
for
(
int
aid
=
0
;
aid
<
ntx
;
aid
++
)
{
for
(
int
aid
=
0
;
aid
<
ntx
;
aid
++
)
{
...
@@ -384,6 +384,7 @@ int trx_eth_write_udp(openair0_device *device, openair0_timestamp timestamp, voi
...
@@ -384,6 +384,7 @@ int trx_eth_write_udp(openair0_device *device, openair0_timestamp timestamp, voi
}
}
}
}
}
}
LOG_D
(
PHY
,
"Wrote %d samples @ %llu
\n
"
,
nsamps
,
timestamp
);
return
(
bytes_sent
-
APP_HEADER_SIZE_BYTES
)
>>
2
;
return
(
bytes_sent
-
APP_HEADER_SIZE_BYTES
)
>>
2
;
}
}
...
@@ -408,7 +409,7 @@ void *udp_read_thread(void *arg) {
...
@@ -408,7 +409,7 @@ void *udp_read_thread(void *arg) {
aid
=
*
(
uint16_t
*
)(
&
buffer
[
ECPRICOMMON_BYTES
]);
aid
=
*
(
uint16_t
*
)(
&
buffer
[
ECPRICOMMON_BYTES
]);
TS
=
*
(
openair0_timestamp
*
)(
&
buffer
[
ECPRICOMMON_BYTES
+
ECPRIPCID_BYTES
]);
TS
=
*
(
openair0_timestamp
*
)(
&
buffer
[
ECPRICOMMON_BYTES
+
ECPRIPCID_BYTES
]);
// convert TS to samples, /6 for AW2S @ 30.72 Ms/s, this is converted for other sample rates in OAI application
// convert TS to samples, /6 for AW2S @ 30.72 Ms/s, this is converted for other sample rates in OAI application
TS
=
device
->
sampling_rate_ratio_n
*
(
TS
/
(
device
->
sampling_rate_ratio_d
*
6
)
);
TS
=
(
device
->
sampling_rate_ratio_n
*
TS
)
/
(
device
->
sampling_rate_ratio_d
*
6
);
if
((
int
)
count
<=
0
)
continue
;
if
((
int
)
count
<=
0
)
continue
;
AssertFatal
(
aid
<
8
,
"Cannot handle more than 8 antennas, got aid %d
\n
"
,
aid
);
AssertFatal
(
aid
<
8
,
"Cannot handle more than 8 antennas, got aid %d
\n
"
,
aid
);
fhstate
->
r
[
aid
]
=
1
;
fhstate
->
r
[
aid
]
=
1
;
...
@@ -448,6 +449,7 @@ int trx_eth_read_udp(openair0_device *device, openair0_timestamp *timestamp, uin
...
@@ -448,6 +449,7 @@ int trx_eth_read_udp(openair0_device *device, openair0_timestamp *timestamp, uin
for
(
int
i
=
1
;
i
<
device
->
openair0_cfg
->
rx_num_channels
;
i
++
)
min_TS
=
min
(
min_TS
,
fhstate
->
TS
[
i
]);
for
(
int
i
=
1
;
i
<
device
->
openair0_cfg
->
rx_num_channels
;
i
++
)
min_TS
=
min
(
min_TS
,
fhstate
->
TS
[
i
]);
}
}
LOG_D
(
PHY
,
"Read %d samples @ %llu
\n
"
,
nsamps
,
fhstate
->
TS_read
);
*
timestamp
=
fhstate
->
TS_read
;
*
timestamp
=
fhstate
->
TS_read
;
fhstate
->
TS_read
=
prev_read_TS
+
nsamps
;
fhstate
->
TS_read
=
prev_read_TS
+
nsamps
;
return
(
nsamps
);
return
(
nsamps
);
...
...
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