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
lizhongxiao
OpenXG-RAN
Commits
52b3b3eb
Commit
52b3b3eb
authored
Mar 19, 2019
by
Florian Kaltenberger
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
removing unncesessary sleeps and mallocs
parent
78c5dfca
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
23 deletions
+2
-23
targets/RT/USER/nr-ue.c
targets/RT/USER/nr-ue.c
+2
-23
No files found.
targets/RT/USER/nr-ue.c
View file @
52b3b3eb
...
...
@@ -737,10 +737,6 @@ static void *UE_thread_rxn_txnp4(void *arg) {
void
readFrame
(
PHY_VARS_NR_UE
*
UE
,
openair0_timestamp
*
timestamp
)
{
void
*
rxp
[
NB_ANTENNAS_RX
];
void
*
dummy_tx
[
UE
->
frame_parms
.
nb_antennas_tx
];
for
(
int
i
=
0
;
i
<
UE
->
frame_parms
.
nb_antennas_tx
;
i
++
)
dummy_tx
[
i
]
=
malloc16_clear
(
UE
->
frame_parms
.
samples_per_subframe
*
4
);
for
(
int
x
=
0
;
x
<
10
;
x
++
)
{
for
(
int
i
=
0
;
i
<
UE
->
frame_parms
.
nb_antennas_rx
;
i
++
)
...
...
@@ -754,16 +750,9 @@ void readFrame(PHY_VARS_NR_UE *UE, openair0_timestamp *timestamp) {
UE
->
frame_parms
.
nb_antennas_rx
),
""
);
}
for
(
int
i
=
0
;
i
<
UE
->
frame_parms
.
nb_antennas_tx
;
i
++
)
free
(
dummy_tx
[
i
]);
}
void
trashFrame
(
PHY_VARS_NR_UE
*
UE
,
openair0_timestamp
*
timestamp
)
{
void
*
dummy_tx
[
UE
->
frame_parms
.
nb_antennas_tx
];
for
(
int
i
=
0
;
i
<
UE
->
frame_parms
.
nb_antennas_tx
;
i
++
)
dummy_tx
[
i
]
=
malloc16_clear
(
UE
->
frame_parms
.
samples_per_subframe
*
4
);
void
*
dummy_rx
[
UE
->
frame_parms
.
nb_antennas_rx
];
for
(
int
i
=
0
;
i
<
UE
->
frame_parms
.
nb_antennas_rx
;
i
++
)
...
...
@@ -776,12 +765,9 @@ void trashFrame(PHY_VARS_NR_UE *UE, openair0_timestamp *timestamp) {
dummy_rx
,
UE
->
frame_parms
.
samples_per_subframe
,
UE
->
frame_parms
.
nb_antennas_rx
);
usleep
(
500
);
// this sleep improves in the case of simulated RF and doesn't harm with true radio
//
usleep(500); // this sleep improves in the case of simulated RF and doesn't harm with true radio
}
for
(
int
i
=
0
;
i
<
UE
->
frame_parms
.
nb_antennas_tx
;
i
++
)
free
(
dummy_tx
[
i
]);
for
(
int
i
=
0
;
i
<
UE
->
frame_parms
.
nb_antennas_rx
;
i
++
)
free
(
dummy_rx
[
i
]);
}
...
...
@@ -789,10 +775,6 @@ void trashFrame(PHY_VARS_NR_UE *UE, openair0_timestamp *timestamp) {
void
syncInFrame
(
PHY_VARS_NR_UE
*
UE
,
openair0_timestamp
*
timestamp
)
{
if
(
UE
->
no_timing_correction
==
0
)
{
LOG_I
(
PHY
,
"Resynchronizing RX by %d samples (mode = %d)
\n
"
,
UE
->
rx_offset
,
UE
->
mode
);
void
*
dummy_tx
[
UE
->
frame_parms
.
nb_antennas_tx
];
for
(
int
i
=
0
;
i
<
UE
->
frame_parms
.
nb_antennas_tx
;
i
++
)
dummy_tx
[
i
]
=
malloc16_clear
(
UE
->
frame_parms
.
samples_per_subframe
*
4
);
for
(
int
size
=
UE
->
rx_offset
;
size
>
0
;
size
-=
UE
->
frame_parms
.
samples_per_subframe
)
{
int
unitTransfer
=
size
>
UE
->
frame_parms
.
samples_per_subframe
?
UE
->
frame_parms
.
samples_per_subframe
:
size
;
...
...
@@ -803,9 +785,6 @@ void syncInFrame(PHY_VARS_NR_UE *UE, openair0_timestamp *timestamp) {
unitTransfer
,
UE
->
frame_parms
.
nb_antennas_rx
),
""
);
}
for
(
int
i
=
0
;
i
<
UE
->
frame_parms
.
nb_antennas_tx
;
i
++
)
free
(
dummy_tx
[
i
]);
}
}
...
...
@@ -901,7 +880,7 @@ void *UE_thread(void *arg) {
UE
->
proc
.
instance_cnt_synch
=
0
;
AssertFatal
(
0
==
pthread_cond_signal
(
&
UE
->
proc
.
cond_synch
),
""
);
AssertFatal
(
0
==
pthread_mutex_unlock
(
&
UE
->
proc
.
mutex_synch
),
""
);
usleep
(
1000
);
//
usleep(1000);
continue
;
}
...
...
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