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
Michael Black
OpenXG-RAN
Commits
2b143370
Commit
2b143370
authored
Mar 12, 2023
by
Raymond Knopp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
small changes in eth_udp.c for AW2S
parent
e4b3757e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
12 deletions
+20
-12
common/utils/system.c
common/utils/system.c
+3
-1
openair1/PHY/NR_TRANSPORT/nr_dlsch.c
openair1/PHY/NR_TRANSPORT/nr_dlsch.c
+1
-1
radio/ETHERNET/USERSPACE/LIB/eth_udp.c
radio/ETHERNET/USERSPACE/LIB/eth_udp.c
+16
-10
No files found.
common/utils/system.c
View file @
2b143370
...
...
@@ -231,7 +231,9 @@ void threadCreate(pthread_t* t, void * (*func)(void*), void * param, char* name,
int
settingPriority
=
1
;
ret
=
pthread_attr_init
(
&
attr
);
AssertFatal
(
ret
==
0
,
"ret: %d, errno: %d
\n
"
,
ret
,
errno
);
LOG_I
(
UTIL
,
"Creating thread %s with affinity %d and priority %d
\n
"
,
name
,
affinity
,
priority
);
if
(
checkIfFedoraDistribution
())
if
(
checkIfGenericKernelOnFedora
())
if
(
checkIfInsideContainer
())
...
...
openair1/PHY/NR_TRANSPORT/nr_dlsch.c
View file @
2b143370
...
...
@@ -466,7 +466,7 @@ void nr_generate_pdsch(processingData_L1tx_t *msgTx,
for
(
int
rb
=
0
;
rb
<
rel15
->
rbSize
;
rb
++
)
{
//get pmi info
uint8_t
pmi
;
if
(
rel15
->
precodingAndBeamforming
.
prg_size
>
0
)
if
(
0
/*rel15->precodingAndBeamforming.prg_size > 0*/
)
pmi
=
rel15
->
precodingAndBeamforming
.
prgs_list
[(
int
)
rb
/
rel15
->
precodingAndBeamforming
.
prg_size
].
pm_idx
;
else
pmi
=
0
;
//no precoding
...
...
radio/ETHERNET/USERSPACE/LIB/eth_udp.c
View file @
2b143370
...
...
@@ -314,9 +314,15 @@ void *trx_eth_write_udp_cmd(udpTXelem_t *udpTXelem) {
uint64_t
last_rxTS
=
fhstate
->
TS
[
0
]
-
fhstate
->
TS0
;
uint64_t
TS_advance
=
0
;
if
(
timestamp
>
last_rxTS
)
TS_advance
=
timestamp
-
last_rxTS
;
if
(
TS_advance
<
(
nsamps
/
2
))
LOG_W
(
PHY
,
"Starting TX FH for TS %llu absslot %llu(%llu) last_rxTS %llu TS_advance %llu samples
\n
"
,(
unsigned
long
long
)
timestamp
,(
unsigned
long
long
)
timestamp
/
nsamps
,((
unsigned
long
long
)
timestamp
/
nsamps
)
%
20
,(
unsigned
long
long
)
last_rxTS
,(
unsigned
long
long
)
TS_advance
);
void
*
buff2
;
else
{
LOG_W
(
PHY
,
"TS_advance is < 0 TS %llu absslot %llu(%llu) last_rxTS %llu TS_advance %llu samples
\n
"
,
(
unsigned
long
long
)
timestamp
,(
unsigned
long
long
)
timestamp
/
nsamps
,((
unsigned
long
long
)
timestamp
/
nsamps
)
%
20
,(
unsigned
long
long
)
last_rxTS
,(
unsigned
long
long
)
TS_advance
);
free
(
buff
);
return
(
NULL
);
}
if
(
TS_advance
<
(
nsamps
/
2
))
{
LOG_W
(
PHY
,
"Starting TX FH for TS %llu absslot %llu(%llu) last_rxTS %llu TS_advance %llu samples
\n
"
,(
unsigned
long
long
)
timestamp
,(
unsigned
long
long
)
timestamp
/
nsamps
,((
unsigned
long
long
)
timestamp
/
nsamps
)
%
20
,(
unsigned
long
long
)
last_rxTS
,(
unsigned
long
long
)
TS_advance
);
}
void
*
buff2
;
#if defined(__x86_64) || defined(__i386__)
int
nsamps2
=
256
>>
3
;
__m256i
buff_tx
[
nsamps2
+
1
];
...
...
@@ -445,7 +451,7 @@ void *udp_read_thread(void *arg) {
char
buffer
[
UDP_PACKET_SIZE_BYTES
(
256
)];
int
first_read
=
0
;
while
(
oai_exit
==
0
)
{
LOG_I
(
PHY
,
"UDP read thread %d
, waiting for start sampling_rate_d %d, sampling_rate_n %d
\n
"
,
u
->
thread_id
,
device
->
sampling_rate_ratio_n
,
device
->
sampling_rate_ratio_d
);
LOG_I
(
PHY
,
"UDP read thread %d
on core %d, waiting for start sampling_rate_d %d, sampling_rate_n %d
\n
"
,
u
->
thread_id
,
sched_getcpu
()
,
device
->
sampling_rate_ratio_n
,
device
->
sampling_rate_ratio_d
);
while
(
fhstate
->
active
>
0
)
{
ssize_t
count
=
recvfrom
(((
eth_state_t
*
)
device
->
priv
)
->
sockfdd
[
0
],
buffer
,
sizeof
(
buffer
),
0
,
...
...
@@ -500,23 +506,23 @@ void *udp_read_thread(void *arg) {
int
trx_eth_read_udp
(
openair0_device
*
device
,
openair0_timestamp
*
timestamp
,
uint32_t
**
buff
,
int
nsamps
)
{
fhstate_t
*
fhstate
=
&
device
->
fhstate
;
openair0_timestamp
prev_read_TS
=
fhstate
->
TS_read
,
min_TS
;
openair0_timestamp
prev_read_TS
=
fhstate
->
TS_read
;
volatile
openair0_timestamp
min_TS
;
// block until FH is ready
while
(
fhstate
->
r
[
0
]
==
0
||
fhstate
->
r
[
1
]
==
0
||
fhstate
->
r
[
2
]
==
0
||
fhstate
->
r
[
3
]
==
0
||
fhstate
->
r
[
4
]
==
0
||
fhstate
->
r
[
5
]
==
0
||
fhstate
->
r
[
6
]
==
0
||
fhstate
->
r
[
7
]
==
0
)
usleep
(
100
);
// get minimum TS over all antennas
min_TS
=
fhstate
->
TS
[
0
];
min_TS
=
(
volatile
openair0_timestamp
)
fhstate
->
TS
[
0
];
for
(
int
i
=
1
;
i
<
device
->
openair0_cfg
->
rx_num_channels
;
i
++
)
min_TS
=
min
(
min_TS
,
fhstate
->
TS
[
i
]);
// poll/sleep until we accumulated enough samples on each antenna port
int
count
=
0
;
while
(
fhstate
->
first_read
==
1
&&
min_TS
<
(
fhstate
->
TS0
+
prev_read_TS
+
nsamps
))
{
usleep
(
5
0
);
min_TS
=
fhstate
->
TS
[
0
];
for
(
int
i
=
1
;
i
<
device
->
openair0_cfg
->
rx_num_channels
;
i
++
)
min_TS
=
min
(
min_TS
,
fhstate
->
TS
[
i
]);
usleep
(
1
0
);
min_TS
=
(
volatile
openair0_timestamp
)
fhstate
->
TS
[
0
];
for
(
int
i
=
1
;
i
<
device
->
openair0_cfg
->
rx_num_channels
;
i
++
)
min_TS
=
min
(
min_TS
,
(
volatile
openair0_timestamp
)
fhstate
->
TS
[
i
]);
count
++
;
}
if
(
fhstate
->
first_read
==
0
)
{
*
timestamp
=
0
;
fhstate
->
TS_read
=
*
timestamp
+
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