Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG UE
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 UE
Commits
28858454
Commit
28858454
authored
Oct 17, 2019
by
Laurent
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
flush traces
parent
239d93ae
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
45 additions
and
13 deletions
+45
-13
executables/main-fs6.c
executables/main-fs6.c
+45
-13
No files found.
executables/main-fs6.c
View file @
28858454
...
@@ -31,17 +31,49 @@ int sum(uint8_t *b, int s) {
...
@@ -31,17 +31,49 @@ int sum(uint8_t *b, int s) {
return
sum
;
return
sum
;
}
}
static
inline
void
updateTimesReset
(
uint64_t
start
,
Meas
*
M
,
int
period
,
char
*
txt
)
{
static
inline
int
cmpintRev
(
const
void
*
a
,
const
void
*
b
)
{
uint64_t
*
aa
=
(
uint64_t
*
)
a
;
uint64_t
*
bb
=
(
uint64_t
*
)
b
;
return
(
int
)(
*
bb
-*
aa
);
}
static
inline
void
printMeas2
(
char
*
txt
,
Meas
*
M
,
int
period
,
bool
MaxMin
)
{
if
(
M
->
iterations
%
period
==
0
)
{
char
txt2
[
512
];
sprintf
(
txt2
,
"%s avg=%"
PRIu64
" iterations=%"
PRIu64
" %s=%"
PRIu64
":%"
PRIu64
":%"
PRIu64
":%"
PRIu64
":%"
PRIu64
":%"
PRIu64
":%"
PRIu64
":%"
PRIu64
":%"
PRIu64
":%"
PRIu64
"
\n
"
,
txt
,
M
->
sum
/
M
->
iterations
,
M
->
iterations
,
MaxMin
?
"max"
:
"min"
,
M
->
maxArray
[
1
],
M
->
maxArray
[
2
],
M
->
maxArray
[
3
],
M
->
maxArray
[
4
],
M
->
maxArray
[
5
],
M
->
maxArray
[
6
],
M
->
maxArray
[
7
],
M
->
maxArray
[
8
],
M
->
maxArray
[
9
],
M
->
maxArray
[
10
]);
#if T_TRACER
LOG_W
(
PHY
,
"%s"
,
txt2
);
#else
printf
(
"%s"
,
txt2
);
#endif
}
}
static
inline
void
updateTimesReset
(
uint64_t
start
,
Meas
*
M
,
int
period
,
bool
MaxMin
,
char
*
txt
)
{
if
(
start
!=
0
)
{
if
(
start
!=
0
)
{
uint64_t
end
=
rdtsc
();
uint64_t
end
=
rdtsc
();
long
long
diff
=
(
end
-
start
)
/
(
cpuf
*
1000
);
long
long
diff
=
(
end
-
start
)
/
(
cpuf
*
1000
);
M
->
maxArray
[
0
]
=
diff
;
M
->
maxArray
[
0
]
=
diff
;
M
->
sum
+=
diff
;
M
->
sum
+=
diff
;
M
->
iterations
++
;
M
->
iterations
++
;
if
(
MaxMin
)
qsort
(
M
->
maxArray
,
11
,
sizeof
(
uint64_t
),
cmpint
);
qsort
(
M
->
maxArray
,
11
,
sizeof
(
uint64_t
),
cmpint
);
printMeas
(
txt
,
M
,
period
);
else
if
(
M
->
iterations
%
period
==
0
)
qsort
(
M
->
maxArray
,
11
,
sizeof
(
uint64_t
),
cmpintRev
);
printMeas2
(
txt
,
M
,
period
,
MaxMin
);
if
(
M
->
iterations
%
period
==
0
)
{
bzero
(
M
,
sizeof
(
*
M
));
bzero
(
M
,
sizeof
(
*
M
));
if
(
!
MaxMin
)
for
(
int
i
=
0
;
i
<
11
;
i
++
)
M
->
maxArray
[
i
]
=
INT_MAX
;
}
}
}
}
}
...
@@ -1377,7 +1409,7 @@ void UL_du_fs6(RU_t *ru, int frame, int subframe) {
...
@@ -1377,7 +1409,7 @@ void UL_du_fs6(RU_t *ru, int frame, int subframe) {
initRefTimes
(
fullLoop
);
initRefTimes
(
fullLoop
);
pickStaticTime
(
begingWait
);
pickStaticTime
(
begingWait
);
rx_rf
(
ru
);
rx_rf
(
ru
);
updateTimesReset
(
begingWait
,
&
fullLoop
,
1000
,
"DU wait USRP"
);
updateTimesReset
(
begingWait
,
&
fullLoop
,
1000
,
false
,
"DU wait USRP"
);
setAllfromTS
(
ru_proc
->
timestamp_rx
);
setAllfromTS
(
ru_proc
->
timestamp_rx
);
// front end processing: convert from time domain to frequency domain
// front end processing: convert from time domain to frequency domain
...
@@ -1443,7 +1475,7 @@ void UL_cu_fs6(RU_t *ru, uint64_t *TS) {
...
@@ -1443,7 +1475,7 @@ void UL_cu_fs6(RU_t *ru, uint64_t *TS) {
initRefTimes
(
fullLoop
);
initRefTimes
(
fullLoop
);
pickStaticTime
(
begingWait
);
pickStaticTime
(
begingWait
);
int
nb_blocks
=
receiveSubFrame
(
&
sockFS6
,
bufferZone
,
sizeof
(
bufferZone
),
CTsentDUv0
);
int
nb_blocks
=
receiveSubFrame
(
&
sockFS6
,
bufferZone
,
sizeof
(
bufferZone
),
CTsentDUv0
);
updateTimesReset
(
begingWait
,
&
fullLoop
,
1000
,
"CU wait DU"
);
updateTimesReset
(
begingWait
,
&
fullLoop
,
1000
,
false
,
"CU wait DU"
);
if
(
nb_blocks
==
0
)
{
if
(
nb_blocks
==
0
)
{
LOG_W
(
PHY
,
"CU lost a subframe
\n
"
);
LOG_W
(
PHY
,
"CU lost a subframe
\n
"
);
...
@@ -1498,13 +1530,13 @@ void *cu_fs6(void *arg) {
...
@@ -1498,13 +1530,13 @@ void *cu_fs6(void *arg) {
while
(
1
)
{
while
(
1
)
{
timeStamp
+=
ru
->
frame_parms
.
samples_per_tti
;
timeStamp
+=
ru
->
frame_parms
.
samples_per_tti
;
updateTimesReset
(
begingWait
,
&
fullLoop
,
1000
,
"CU for full SubFrame (must be less 1ms)"
);
updateTimesReset
(
begingWait
,
&
fullLoop
,
1000
,
true
,
"CU for full SubFrame (must be less 1ms)"
);
pickStaticTime
(
begingWait
);
pickStaticTime
(
begingWait
);
updateTimesReset
(
begingWait
,
&
waitDUAndProcessingUL
,
1000
,
"CU Time in wait Rx + Ul processing"
);
updateTimesReset
(
begingWait
,
&
waitDUAndProcessingUL
,
1000
,
true
,
"CU Time in wait Rx + Ul processing"
);
UL_cu_fs6
(
ru
,
&
timeStamp
);
UL_cu_fs6
(
ru
,
&
timeStamp
);
pickStaticTime
(
begingWait2
);
pickStaticTime
(
begingWait2
);
DL_cu_fs6
(
ru
);
DL_cu_fs6
(
ru
);
updateTimesReset
(
begingWait2
,
&
makeSendDL
,
1000
,
"CU Time in DL build+send"
);
updateTimesReset
(
begingWait2
,
&
makeSendDL
,
1000
,
true
,
"CU Time in DL build+send"
);
}
}
...
@@ -1545,13 +1577,13 @@ void *du_fs6(void *arg) {
...
@@ -1545,13 +1577,13 @@ void *du_fs6(void *arg) {
while
(
1
)
{
while
(
1
)
{
L1_proc_t
*
proc
=
&
ru
->
eNB_list
[
0
]
->
proc
;
L1_proc_t
*
proc
=
&
ru
->
eNB_list
[
0
]
->
proc
;
updateTimesReset
(
begingWait
,
&
fullLoop
,
1000
,
"DU for full SubFrame (must be less 1ms)"
);
updateTimesReset
(
begingWait
,
&
fullLoop
,
1000
,
true
,
"DU for full SubFrame (must be less 1ms)"
);
pickStaticTime
(
begingWait
);
pickStaticTime
(
begingWait
);
UL_du_fs6
(
ru
,
proc
->
frame_rx
,
proc
->
subframe_rx
);
UL_du_fs6
(
ru
,
proc
->
frame_rx
,
proc
->
subframe_rx
);
updateTimesReset
(
begingWait
,
&
waitRxAndProcessingUL
,
1000
,
"DU Time in wait Rx + Ul processing"
);
updateTimesReset
(
begingWait
,
&
waitRxAndProcessingUL
,
1000
,
true
,
"DU Time in wait Rx + Ul processing"
);
pickStaticTime
(
begingWait2
);
pickStaticTime
(
begingWait2
);
DL_du_fs6
(
ru
);
DL_du_fs6
(
ru
);
updateTimesReset
(
begingWait2
,
&
makeSendDL
,
1000
,
"DU Time in build and send Tx"
);
updateTimesReset
(
begingWait2
,
&
makeSendDL
,
1000
,
true
,
"DU Time in build and send Tx"
);
}
}
return
NULL
;
return
NULL
;
...
...
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