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
edfef131
Commit
edfef131
authored
Jan 31, 2018
by
laurent
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add counters for non turbo-codec part
parent
fe5058ed
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
1757 additions
and
1756 deletions
+1757
-1756
openair1/PHY/LTE_TRANSPORT/dlsch_coding.c
openair1/PHY/LTE_TRANSPORT/dlsch_coding.c
+465
-464
openair1/PHY/LTE_TRANSPORT/ulsch_decoding.c
openair1/PHY/LTE_TRANSPORT/ulsch_decoding.c
+1230
-1228
openair1/SCHED/phy_procedures_lte_eNb.c
openair1/SCHED/phy_procedures_lte_eNb.c
+27
-28
targets/tcri/measurement_display.c
targets/tcri/measurement_display.c
+29
-28
targets/tcri/thread-pool.c
targets/tcri/thread-pool.c
+2
-6
targets/tcri/thread-pool.h
targets/tcri/thread-pool.h
+4
-2
No files found.
openair1/PHY/LTE_TRANSPORT/dlsch_coding.c
View file @
edfef131
This diff is collapsed.
Click to expand it.
openair1/PHY/LTE_TRANSPORT/ulsch_decoding.c
View file @
edfef131
This diff is collapsed.
Click to expand it.
openair1/SCHED/phy_procedures_lte_eNb.c
View file @
edfef131
...
@@ -555,6 +555,7 @@ void phy_procedures_eNB_TX(PHY_VARS_eNB *eNB,
...
@@ -555,6 +555,7 @@ void phy_procedures_eNB_TX(PHY_VARS_eNB *eNB,
uint64_t
startTime
=
rdtsc
();
uint64_t
startTime
=
rdtsc
();
for
(
UE_id
=
0
;
UE_id
<
NUMBER_OF_UE_MAX
;
UE_id
++
)
for
(
UE_id
=
0
;
UE_id
<
NUMBER_OF_UE_MAX
;
UE_id
++
)
{
{
eNB
->
proc
.
threadPool
.
startProcessingUE
=
rdtsc
();
dlsch0
=
eNB
->
dlsch
[(
uint8_t
)
UE_id
][
0
];
dlsch0
=
eNB
->
dlsch
[(
uint8_t
)
UE_id
][
0
];
dlsch1
=
eNB
->
dlsch
[(
uint8_t
)
UE_id
][
1
];
dlsch1
=
eNB
->
dlsch
[(
uint8_t
)
UE_id
][
1
];
...
@@ -567,11 +568,9 @@ void phy_procedures_eNB_TX(PHY_VARS_eNB *eNB,
...
@@ -567,11 +568,9 @@ void phy_procedures_eNB_TX(PHY_VARS_eNB *eNB,
AssertFatal
(
harq_pid
>=
0
,
"harq_pid is negative
\n
"
);
AssertFatal
(
harq_pid
>=
0
,
"harq_pid is negative
\n
"
);
if
(
harq_pid
>=
8
)
if
(
harq_pid
>=
8
)
{
LOG_E
(
PHY
,
"harq_pid:%d corrupt must be 0-7 UE_id:%d frame:%d subframe:%d rnti:%x
\n
"
,
LOG_E
(
PHY
,
"harq_pid:%d corrupt must be 0-7 UE_id:%d frame:%d subframe:%d rnti:%x
\n
"
,
harq_pid
,
UE_id
,
frame
,
subframe
,
dlsch0
->
rnti
);
harq_pid
,
UE_id
,
frame
,
subframe
,
dlsch0
->
rnti
);
}
else
else
{
// generate pdsch
// generate pdsch
pdsch_procedures
(
eNB
,
pdsch_procedures
(
eNB
,
proc
,
proc
,
...
@@ -580,7 +579,6 @@ void phy_procedures_eNB_TX(PHY_VARS_eNB *eNB,
...
@@ -580,7 +579,6 @@ void phy_procedures_eNB_TX(PHY_VARS_eNB *eNB,
dlsch1
,
dlsch1
,
&
eNB
->
UE_stats
[(
uint32_t
)
UE_id
],
&
eNB
->
UE_stats
[(
uint32_t
)
UE_id
],
0
);
0
);
}
}
}
}
}
...
@@ -615,19 +613,19 @@ void phy_procedures_eNB_TX(PHY_VARS_eNB *eNB,
...
@@ -615,19 +613,19 @@ void phy_procedures_eNB_TX(PHY_VARS_eNB *eNB,
}
}
request_t
*
tmp
;
request_t
*
tmp
;
while
((
tmp
=
eNB
->
proc
.
threadPool
.
doneRequests
)
!=
NULL
)
{
while
((
tmp
=
eNB
->
proc
.
threadPool
.
doneRequests
)
!=
NULL
)
{
tmp
->
returnTime
=
rdtsc
();
tmp
->
returnTime
=
rdtsc
();
tmp
->
cumulSubframe
=
tmp
->
returnTime
-
startTime
;
tmp
->
cumulSubframe
=
tmp
->
returnTime
-
startTime
;
// Ignore write error (if no trace listner)
// Ignore write error (if no trace listner)
if
(
write
(
eNB
->
proc
.
threadPool
.
traceFd
,
tmp
,
sizeof
(
request_t
)
-
2
*
sizeof
(
void
*
)))
{};
if
(
write
(
eNB
->
proc
.
threadPool
.
traceFd
,
tmp
,
sizeof
(
request_t
)
-
2
*
sizeof
(
void
*
)))
{};
eNB
->
proc
.
threadPool
.
doneRequests
=
tmp
->
next
;
eNB
->
proc
.
threadPool
.
doneRequests
=
tmp
->
next
;
start_meas
(
&
eNB
->
dlsch_interleaving_stats
);
start_meas
(
&
eNB
->
dlsch_interleaving_stats
);
turboEncode_t
*
rdata
=
(
turboEncode_t
*
)
tmp
->
data
;
turboEncode_t
*
rdata
=
(
turboEncode_t
*
)
tmp
->
data
;
rdata
->
dlsch
->
harq_processes
[
rdata
->
harq_pid
]
->
RTC
[
rdata
->
r
]
=
rdata
->
dlsch
->
harq_processes
[
rdata
->
harq_pid
]
->
RTC
[
rdata
->
r
]
=
sub_block_interleaving_turbo
(
4
+
(
rdata
->
Kr_bytes
*
8
),
sub_block_interleaving_turbo
(
4
+
(
rdata
->
Kr_bytes
*
8
),
rdata
->
output
+
96
,
//&dlsch->harq_processes[harq_pid]->d[r][96],
rdata
->
output
+
96
,
//&dlsch->harq_processes[harq_pid]->d[r][96],
rdata
->
dlsch
->
harq_processes
[
rdata
->
harq_pid
]
->
w
[
rdata
->
r
]);
rdata
->
dlsch
->
harq_processes
[
rdata
->
harq_pid
]
->
w
[
rdata
->
r
]);
freeRequest
(
tmp
);
freeRequest
(
tmp
);
stop_meas
(
&
eNB
->
dlsch_interleaving_stats
);
stop_meas
(
&
eNB
->
dlsch_interleaving_stats
);
}
}
for
(
UE_id
=
0
;
UE_id
<
NUMBER_OF_UE_MAX
;
UE_id
++
)
{
for
(
UE_id
=
0
;
UE_id
<
NUMBER_OF_UE_MAX
;
UE_id
++
)
{
...
@@ -1506,9 +1504,10 @@ void pusch_procedures(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc)
...
@@ -1506,9 +1504,10 @@ void pusch_procedures(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc)
eNB
->
proc
.
threadPool
.
newestRequests
!=
NULL
||
eNB
->
proc
.
threadPool
.
newestRequests
!=
NULL
||
eNB
->
proc
.
threadPool
.
doneRequests
!=
NULL
eNB
->
proc
.
threadPool
.
doneRequests
!=
NULL
)
)
LOG_E
(
PHY
,
"no finished = %d
\n
"
,
eNB
->
proc
.
threadPool
.
notFinishedJobs
);
LOG_E
(
PHY
,
"no finished = %d
\n
"
,
eNB
->
proc
.
threadPool
.
notFinishedJobs
);
uint64_t
startTime
=
rdtsc
();
uint64_t
startTime
=
rdtsc
();
for
(
int
i
=
0
;
i
<
NUMBER_OF_UE_MAX
;
i
++
)
{
for
(
int
i
=
0
;
i
<
NUMBER_OF_UE_MAX
;
i
++
)
{
eNB
->
proc
.
threadPool
.
startProcessingUE
=
rdtsc
();
LTE_eNB_ULSCH_t
*
ulsch
=
eNB
->
ulsch
[
i
];
LTE_eNB_ULSCH_t
*
ulsch
=
eNB
->
ulsch
[
i
];
LTE_UL_eNB_HARQ_t
*
ulsch_harq
=
ulsch
->
harq_processes
[
harq_pid
];
LTE_UL_eNB_HARQ_t
*
ulsch_harq
=
ulsch
->
harq_processes
[
harq_pid
];
...
@@ -1590,15 +1589,15 @@ void pusch_procedures(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc)
...
@@ -1590,15 +1589,15 @@ void pusch_procedures(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc)
request_t
*
tmp
;
request_t
*
tmp
;
while
((
tmp
=
eNB
->
proc
.
threadPool
.
doneRequests
)
!=
NULL
)
{
while
((
tmp
=
eNB
->
proc
.
threadPool
.
doneRequests
)
!=
NULL
)
{
turboDecode_t
*
rdata
=
(
turboDecode_t
*
)
tmp
->
data
;
turboDecode_t
*
rdata
=
(
turboDecode_t
*
)
tmp
->
data
;
tmp
->
decodeIterations
=
rdata
->
decodeIterations
;
tmp
->
decodeIterations
=
rdata
->
decodeIterations
;
post_decode
(
tmp
);
post_decode
(
tmp
);
tmp
->
returnTime
=
rdtsc
();
tmp
->
returnTime
=
rdtsc
();
tmp
->
cumulSubframe
=
tmp
->
returnTime
-
startTime
;
tmp
->
cumulSubframe
=
tmp
->
returnTime
-
startTime
;
// Ignore write error (if no trace listner)
// Ignore write error (if no trace listner)
if
(
write
(
eNB
->
proc
.
threadPool
.
traceFd
,
tmp
,
sizeof
(
request_t
)
-
2
*
sizeof
(
void
*
)))
{};
if
(
write
(
eNB
->
proc
.
threadPool
.
traceFd
,
tmp
,
sizeof
(
request_t
)
-
2
*
sizeof
(
void
*
)))
{};
eNB
->
proc
.
threadPool
.
doneRequests
=
tmp
->
next
;
eNB
->
proc
.
threadPool
.
doneRequests
=
tmp
->
next
;
freeRequest
(
tmp
);
freeRequest
(
tmp
);
}
}
}
}
...
...
targets/tcri/measurement_display.c
View file @
edfef131
...
@@ -18,9 +18,9 @@
...
@@ -18,9 +18,9 @@
uint64_t
cpuCyclesMicroSec
;
uint64_t
cpuCyclesMicroSec
;
static
__inline__
uint64_t
rdtsc
(
void
)
{
static
__inline__
uint64_t
rdtsc
(
void
)
{
uint64_t
a
,
d
;
uint64_t
a
,
d
;
__asm__
volatile
(
"rdtsc"
:
"=a"
(
a
),
"=d"
(
d
));
__asm__
volatile
(
"rdtsc"
:
"=a"
(
a
),
"=d"
(
d
));
return
(
d
<<
32
)
|
a
;
return
(
d
<<
32
)
|
a
;
}
}
#include "thread-pool.h"
#include "thread-pool.h"
...
@@ -30,10 +30,10 @@ int main(int argc, char* argv[]) {
...
@@ -30,10 +30,10 @@ int main(int argc, char* argv[]) {
usleep
(
100000
);
usleep
(
100000
);
cpuCyclesMicroSec
=
(
rdtsc
()
-
deb
)
/
100000
;
cpuCyclesMicroSec
=
(
rdtsc
()
-
deb
)
/
100000
;
printf
(
"Cycles per µs: %lu
\n
"
,
cpuCyclesMicroSec
);
printf
(
"Cycles per µs: %lu
\n
"
,
cpuCyclesMicroSec
);
#define SEP "\t"
#define SEP "\t"
printf
(
"Frame"
SEP
"SubFrame"
SEP
"CodeBlock"
SEP
"RNTI"
SEP
"Iterations"
SEP
printf
(
"Frame"
SEP
"SubFrame"
SEP
"CodeBlock"
SEP
"RNTI"
SEP
"Iterations"
SEP
"StartTime"
SEP
"RunTime"
SEP
"ReturnTime"
SEP
"CumulSubFrame"
"PreparationTime"
SEP
"StartTime"
SEP
"RunTime"
SEP
"ReturnTime"
SEP
"CumulSubFrame"
SEP
"CPUcore"
SEP
"ThreadID"
"
\n
"
);
SEP
"CPUcore"
SEP
"ThreadID"
"
\n
"
);
mkfifo
(
"/tmp/test-tcri"
,
0666
);
mkfifo
(
"/tmp/test-tcri"
,
0666
);
int
fd
=
open
(
"/tmp/test-tcri"
,
O_RDONLY
);
int
fd
=
open
(
"/tmp/test-tcri"
,
O_RDONLY
);
...
@@ -44,27 +44,28 @@ int main(int argc, char* argv[]) {
...
@@ -44,27 +44,28 @@ int main(int argc, char* argv[]) {
request_t
doneRequest
;
request_t
doneRequest
;
int
s
=
sizeof
(
request_t
)
-
2
*
sizeof
(
void
*
);
int
s
=
sizeof
(
request_t
)
-
2
*
sizeof
(
void
*
);
while
(
1
)
{
while
(
1
)
{
if
(
read
(
fd
,
&
doneRequest
,
s
)
==
s
)
{
if
(
read
(
fd
,
&
doneRequest
,
s
)
==
s
)
{
union
turboReqUnion
id
=
{.
p
=
doneRequest
.
id
};
union
turboReqUnion
id
=
{.
p
=
doneRequest
.
id
};
doneRequest
.
processedBy
[
15
]
=
'\0'
;
doneRequest
.
processedBy
[
15
]
=
'\0'
;
printf
(
"%u"
SEP
"%u"
SEP
"%u"
SEP
"%u"
SEP
"%lu"
SEP
printf
(
"%u"
SEP
"%u"
SEP
"%u"
SEP
"%u"
SEP
"%lu"
SEP
"%lu"
SEP
"%lu"
SEP
"%lu"
SEP
"%lu"
SEP
"%lu"
SEP
"%lu"
SEP
"%lu"
SEP
"%lu"
SEP
"%u"
SEP
"%s"
"
\n
"
,
"%lu"
SEP
"%u"
SEP
"%s"
"
\n
"
,
id
.
s
.
frame
,
id
.
s
.
frame
,
id
.
s
.
subframe
,
id
.
s
.
subframe
,
id
.
s
.
codeblock
,
id
.
s
.
codeblock
,
id
.
s
.
rnti
,
id
.
s
.
rnti
,
doneRequest
.
decodeIterations
,
doneRequest
.
decodeIterations
,
(
doneRequest
.
startProcessingTime
-
doneRequest
.
creationTime
)
/
cpuCyclesMicroSec
,
(
doneRequest
.
creationTime
-
doneRequest
.
startUELoop
)
/
cpuCyclesMicroSec
,
(
doneRequest
.
endProcessingTime
-
doneRequest
.
startProcessingTime
)
/
cpuCyclesMicroSec
,
(
doneRequest
.
startProcessingTime
-
doneRequest
.
creationTime
)
/
cpuCyclesMicroSec
,
(
doneRequest
.
returnTime
-
doneRequest
.
endProcessingTime
)
/
cpuCyclesMicroSec
,
(
doneRequest
.
endProcessingTime
-
doneRequest
.
startProcessingTime
)
/
cpuCyclesMicroSec
,
doneRequest
.
cumulSubframe
/
cpuCyclesMicroSec
,
(
doneRequest
.
returnTime
-
doneRequest
.
endProcessingTime
)
/
cpuCyclesMicroSec
,
doneRequest
.
coreId
,
doneRequest
.
cumulSubframe
/
cpuCyclesMicroSec
,
doneRequest
.
processedBy
doneRequest
.
coreId
,
);
doneRequest
.
processedBy
}
else
{
);
printf
(
"no measurements
\n
"
);
}
else
{
sleep
(
1
);
printf
(
"no measurements
\n
"
);
}
sleep
(
1
);
}
}
}
}
}
targets/tcri/thread-pool.c
View file @
edfef131
...
@@ -29,6 +29,7 @@
...
@@ -29,6 +29,7 @@
request_t
*
createRequest
(
enum
request_t
type
,
int
size
)
{
request_t
*
createRequest
(
enum
request_t
type
,
int
size
)
{
request_t
*
request
;
request_t
*
request
;
AssertFatal
(
(
request
=
(
request_t
*
)
aligned_alloc
(
32
,
sizeof
(
request_t
)
+
size
))
!=
NULL
,
""
);
AssertFatal
(
(
request
=
(
request_t
*
)
aligned_alloc
(
32
,
sizeof
(
request_t
)
+
size
))
!=
NULL
,
""
);
memset
(
request
,
0
,
sizeof
(
request_t
));
request
->
id
=
0
;
request
->
id
=
0
;
request
->
type
=
type
;
request
->
type
=
type
;
request
->
next
=
NULL
;
request
->
next
=
NULL
;
...
@@ -200,12 +201,7 @@ void handle_request(tpool_t * tp, request_t* request) {
...
@@ -200,12 +201,7 @@ void handle_request(tpool_t * tp, request_t* request) {
tp
->
doneRequests
=
request
;
tp
->
doneRequests
=
request
;
condsignal
(
tp
->
notifDone
);
condsignal
(
tp
->
notifDone
);
mutexunlock
(
tp
->
lockReportDone
);
mutexunlock
(
tp
->
lockReportDone
);
/*
printf("Thread '%ld' handled request '%d' delay in µs:%ld\n",
syscall( SYS_gettid ),
request->id,
(rdtsc() - request->creationTime)/tp->cpuCyclesMicroSec);
*/
}
}
void
*
one_thread
(
void
*
data
)
{
void
*
one_thread
(
void
*
data
)
{
...
...
targets/tcri/thread-pool.h
View file @
edfef131
...
@@ -25,11 +25,12 @@ union turboReqUnion {
...
@@ -25,11 +25,12 @@ union turboReqUnion {
typedef
struct
request
{
typedef
struct
request
{
uint64_t
id
;
uint64_t
id
;
enum
request_t
type
;
enum
request_t
type
;
uint64_t
startUELoop
;
uint64_t
creationTime
;
uint64_t
creationTime
;
uint64_t
startProcessingTime
;
uint64_t
startProcessingTime
;
uint64_t
endProcessingTime
;
uint64_t
endProcessingTime
;
uint64_t
returnTime
;
uint64_t
returnTime
;
uint64_t
cumulSubframe
;
uint64_t
cumulSubframe
;
uint64_t
decodeIterations
;
uint64_t
decodeIterations
;
int
coreId
;
int
coreId
;
char
processedBy
[
16
];
char
processedBy
[
16
];
...
@@ -60,6 +61,7 @@ typedef struct thread_pool {
...
@@ -60,6 +61,7 @@ typedef struct thread_pool {
int
traceFd
;
int
traceFd
;
int
dummyTraceFd
;
int
dummyTraceFd
;
uint64_t
cpuCyclesMicroSec
;
uint64_t
cpuCyclesMicroSec
;
uint64_t
startProcessingUE
;
int
nbThreads
;
int
nbThreads
;
bool
restrictRNTI
;
bool
restrictRNTI
;
struct
one_thread
*
allthreads
;
struct
one_thread
*
allthreads
;
...
...
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