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
canghaiwuhen
OpenXG-RAN
Commits
d4ae319f
Commit
d4ae319f
authored
Oct 29, 2018
by
Florian Kaltenberger
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
adding some error checks on trx_read
parent
6bc86f88
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
11 deletions
+12
-11
targets/RT/USER/nr-ue.c
targets/RT/USER/nr-ue.c
+12
-11
No files found.
targets/RT/USER/nr-ue.c
View file @
d4ae319f
...
@@ -337,7 +337,7 @@ static void *UE_thread_synch(void *arg) {
...
@@ -337,7 +337,7 @@ static void *UE_thread_synch(void *arg) {
if
(
threads
.
iq
!=
-
1
)
if
(
threads
.
iq
!=
-
1
)
CPU_SET
(
threads
.
iq
,
&
cpuset
);
CPU_SET
(
threads
.
iq
,
&
cpuset
);
// this thread priority must be lower that the main acquisition thread
// this thread priority must be lower that the main acquisition thread
sprintf
(
threadname
,
"sync UE %d
\n
"
,
UE
->
Mod_id
);
sprintf
(
threadname
,
"sync UE %d"
,
UE
->
Mod_id
);
init_thread
(
100000
,
500000
,
FIFO_PRIORITY
-
1
,
&
cpuset
,
threadname
);
init_thread
(
100000
,
500000
,
FIFO_PRIORITY
-
1
,
&
cpuset
,
threadname
);
UE
->
is_synchronized
=
0
;
UE
->
is_synchronized
=
0
;
...
@@ -840,10 +840,10 @@ void *UE_thread(void *arg) {
...
@@ -840,10 +840,10 @@ void *UE_thread(void *arg) {
if
(
is_synchronized
==
0
)
{
if
(
is_synchronized
==
0
)
{
#if BASIC_SIMULATOR
#if BASIC_SIMULATOR
while
(
!
((
instance_cnt_synch
=
UE
->
proc
.
instance_cnt_synch
)
<
0
))
{
while
(
!
((
instance_cnt_synch
=
UE
->
proc
.
instance_cnt_synch
)
<
0
))
{
printf
(
"ue sync not ready
\n
"
);
printf
(
"ue sync not ready
\n
"
);
usleep
(
500
*
1000
);
usleep
(
500
*
1000
);
}
}
#endif
#endif
if
(
instance_cnt_synch
<
0
)
{
// we can invoke the synch
if
(
instance_cnt_synch
<
0
)
{
// we can invoke the synch
// grab 10 ms of signal and wakeup synch thread
// grab 10 ms of signal and wakeup synch thread
...
@@ -856,7 +856,7 @@ void *UE_thread(void *arg) {
...
@@ -856,7 +856,7 @@ void *UE_thread(void *arg) {
&
timestamp
,
&
timestamp
,
rxp
,
rxp
,
UE
->
frame_parms
.
samples_per_subframe
*
10
,
UE
->
frame_parms
.
samples_per_subframe
*
10
,
UE
->
frame_parms
.
nb_antennas_rx
),
""
);
UE
->
frame_parms
.
nb_antennas_rx
),
"
error reading samples
"
);
AssertFatal
(
0
==
pthread_mutex_lock
(
&
UE
->
proc
.
mutex_synch
),
""
);
AssertFatal
(
0
==
pthread_mutex_lock
(
&
UE
->
proc
.
mutex_synch
),
""
);
instance_cnt_synch
=
++
UE
->
proc
.
instance_cnt_synch
;
instance_cnt_synch
=
++
UE
->
proc
.
instance_cnt_synch
;
...
@@ -878,11 +878,12 @@ void *UE_thread(void *arg) {
...
@@ -878,11 +878,12 @@ void *UE_thread(void *arg) {
rxp
[
i
]
=
(
void
*
)
&
dummy_rx
[
i
][
0
];
rxp
[
i
]
=
(
void
*
)
&
dummy_rx
[
i
][
0
];
for
(
int
sf
=
0
;
sf
<
LTE_NUMBER_OF_SUBFRAMES_PER_FRAME
;
sf
++
)
for
(
int
sf
=
0
;
sf
<
LTE_NUMBER_OF_SUBFRAMES_PER_FRAME
;
sf
++
)
// printf("Reading dummy sf %d\n",sf);
// printf("Reading dummy sf %d\n",sf);
UE
->
rfdevice
.
trx_read_func
(
&
UE
->
rfdevice
,
AssertFatal
(
UE
->
frame_parms
.
samples_per_subframe
==
&
timestamp
,
UE
->
rfdevice
.
trx_read_func
(
&
UE
->
rfdevice
,
rxp
,
&
timestamp
,
UE
->
frame_parms
.
samples_per_subframe
,
rxp
,
UE
->
frame_parms
.
nb_antennas_rx
);
UE
->
frame_parms
.
samples_per_subframe
,
UE
->
frame_parms
.
nb_antennas_rx
),
"error reading samples"
);
}
}
#endif
#endif
}
}
...
...
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