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
7d5ea3e9
Commit
7d5ea3e9
authored
Jan 17, 2024
by
mir
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
TASK_MANAGER_LTE flag removed
parent
7886ec11
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
47 additions
and
181 deletions
+47
-181
common/utils/thread_pool/task_manager.h
common/utils/thread_pool/task_manager.h
+0
-2
executables/lte-softmodem.c
executables/lte-softmodem.c
+8
-21
openair1/PHY/LTE_TRANSPORT/dlsch_coding.c
openair1/PHY/LTE_TRANSPORT/dlsch_coding.c
+20
-76
openair1/PHY/LTE_TRANSPORT/transport_proto.h
openair1/PHY/LTE_TRANSPORT/transport_proto.h
+2
-4
openair1/PHY/LTE_TRANSPORT/ulsch_decoding.c
openair1/PHY/LTE_TRANSPORT/ulsch_decoding.c
+13
-34
openair1/PHY/defs_eNB.h
openair1/PHY/defs_eNB.h
+2
-10
openair1/SCHED/phy_procedures_lte_eNb.c
openair1/SCHED/phy_procedures_lte_eNb.c
+0
-22
openair1/SIMULATION/LTE_PHY/dlsim.c
openair1/SIMULATION/LTE_PHY/dlsim.c
+1
-7
openair1/SIMULATION/LTE_PHY/ulsim.c
openair1/SIMULATION/LTE_PHY/ulsim.c
+1
-5
No files found.
common/utils/thread_pool/task_manager.h
View file @
7d5ea3e9
#ifndef TASK_MANAGER_WORKING_STEALING_H
#ifndef TASK_MANAGER_WORKING_STEALING_H
#define TASK_MANAGER_WORKING_STEALING_H
#define TASK_MANAGER_WORKING_STEALING_H
#define TASK_MANAGER_LTE
#include "task.h"
#include "task.h"
#ifndef __cplusplus
#ifndef __cplusplus
...
...
executables/lte-softmodem.c
View file @
7d5ea3e9
...
@@ -552,31 +552,18 @@ int main ( int argc, char **argv )
...
@@ -552,31 +552,18 @@ int main ( int argc, char **argv )
L1_rxtx_proc_t
*
L1proctx
=
&
RC
.
eNB
[
x
][
CC_id
]
->
proc
.
L1_proc_tx
;
L1_rxtx_proc_t
*
L1proctx
=
&
RC
.
eNB
[
x
][
CC_id
]
->
proc
.
L1_proc_tx
;
L1proc
->
respDecode
=
(
notifiedFIFO_t
*
)
malloc
(
sizeof
(
notifiedFIFO_t
));
L1proc
->
respDecode
=
(
notifiedFIFO_t
*
)
malloc
(
sizeof
(
notifiedFIFO_t
));
if
(
strlen
(
get_softmodem_params
()
->
threadPoolConfig
)
>
0
){
if
(
strlen
(
get_softmodem_params
()
->
threadPoolConfig
)
>
0
){
#ifdef TASK_MANAGER_LTE
L1proc
->
man
=
calloc
(
1
,
sizeof
(
task_manager_t
));
L1proc
->
man
=
calloc
(
1
,
sizeof
(
task_manager_t
));
assert
(
L1proc
->
man
!=
NULL
&&
"Memory exhausted"
);
assert
(
L1proc
->
man
!=
NULL
&&
"Memory exhausted"
);
int
const
num_threads
=
parse_num_threads
(
get_softmodem_params
()
->
threadPoolConfig
);
int
const
num_threads
=
parse_num_threads
(
get_softmodem_params
()
->
threadPoolConfig
);
init_task_manager
(
L1proc
->
man
,
num_threads
);
init_task_manager
(
L1proc
->
man
,
num_threads
);
#else
initTpool
(
get_softmodem_params
()
->
threadPoolConfig
,
L1proc
->
threadPool
,
true
);
#endif
}
else
{
}
else
{
#ifdef TASK_MANAGER_LTE
L1proc
->
man
=
calloc
(
1
,
sizeof
(
task_manager_t
));
L1proc
->
man
=
calloc
(
1
,
sizeof
(
task_manager_t
));
assert
(
L1proc
->
man
!=
NULL
&&
"Memory exhausted"
);
assert
(
L1proc
->
man
!=
NULL
&&
"Memory exhausted"
);
int
const
num_threads
=
parse_num_threads
(
"n"
);
int
const
num_threads
=
parse_num_threads
(
"n"
);
init_task_manager
(
L1proc
->
man
,
num_threads
);
init_task_manager
(
L1proc
->
man
,
num_threads
);
#else
initTpool
(
"n"
,
L1proc
->
threadPool
,
true
);
#endif
}
}
initNotifiedFIFO
(
L1proc
->
respDecode
);
initNotifiedFIFO
(
L1proc
->
respDecode
);
#ifdef TASK_MANAGER_LTE
L1proctx
->
man
=
L1proc
->
man
;
L1proctx
->
man
=
L1proc
->
man
;
#else
L1proctx
->
threadPool
=
L1proc
->
threadPool
;
#endif
}
}
printf
(
"wait_eNBs()
\n
"
);
printf
(
"wait_eNBs()
\n
"
);
...
...
openair1/PHY/LTE_TRANSPORT/dlsch_coding.c
View file @
7d5ea3e9
...
@@ -282,9 +282,8 @@ static void TPencode(void * arg) {
...
@@ -282,9 +282,8 @@ static void TPencode(void * arg) {
hadlsch
->
nb_rb
);
hadlsch
->
nb_rb
);
stop_meas
(
rdata
->
rm_stats
);
stop_meas
(
rdata
->
rm_stats
);
#ifdef TASK_MANAGER_LTE
// Task completed in parallel
completed_task_ans
(
rdata
->
ans
);
completed_task_ans
(
rdata
->
ans
);
#endif
}
}
int
dlsch_encoding
(
PHY_VARS_eNB
*
eNB
,
int
dlsch_encoding
(
PHY_VARS_eNB
*
eNB
,
...
@@ -322,8 +321,6 @@ int dlsch_encoding(PHY_VARS_eNB *eNB,
...
@@ -322,8 +321,6 @@ int dlsch_encoding(PHY_VARS_eNB *eNB,
num_pdcch_symbols
,
num_pdcch_symbols
,
frame
,
subframe
,
beamforming_mode
);
frame
,
subframe
,
beamforming_mode
);
int
nbEncode
=
0
;
// if (hadlsch->Ndi == 1) { // this is a new packet
// if (hadlsch->Ndi == 1) { // this is a new packet
if
(
hadlsch
->
round
==
0
)
{
// this is a new packet
if
(
hadlsch
->
round
==
0
)
{
// this is a new packet
// Add 24-bit crc (polynomial A) to payload
// Add 24-bit crc (polynomial A) to payload
...
@@ -350,23 +347,14 @@ int dlsch_encoding(PHY_VARS_eNB *eNB,
...
@@ -350,23 +347,14 @@ int dlsch_encoding(PHY_VARS_eNB *eNB,
return
(
-
1
);
return
(
-
1
);
}
}
#ifdef TASK_MANAGER_LTE
turboEncode_t
arr
[
hadlsch
->
C
];
turboEncode_t
arr
[
hadlsch
->
C
];
task_ans_t
ans
[
hadlsch
->
C
];
task_ans_t
ans
[
hadlsch
->
C
];
memset
(
ans
,
0
,
hadlsch
->
C
*
sizeof
(
task_ans_t
));
memset
(
ans
,
0
,
hadlsch
->
C
*
sizeof
(
task_ans_t
));
#endif
notifiedFIFO_t
respEncode
;
initNotifiedFIFO
(
&
respEncode
);
for
(
int
r
=
0
,
r_offset
=
0
;
r
<
hadlsch
->
C
;
r
++
)
{
for
(
int
r
=
0
,
r_offset
=
0
;
r
<
hadlsch
->
C
;
r
++
)
{
#ifdef TASK_MANAGER_LTE
turboEncode_t
*
rdata
=
&
arr
[
r
];
turboEncode_t
*
rdata
=
&
arr
[
r
];
rdata
->
ans
=
&
ans
[
r
];
rdata
->
ans
=
&
ans
[
r
];
#else
union
turboReqUnion
id
=
{.
s
=
{
dlsch
->
rnti
,
frame
,
subframe
,
r
,
0
}};
notifiedFIFO_elt_t
*
req
=
newNotifiedFIFO_elt
(
sizeof
(
turboEncode_t
),
id
.
p
,
&
respEncode
,
TPencode
);
turboEncode_t
*
rdata
=
(
turboEncode_t
*
)
NotifiedFifoData
(
req
);
#endif
rdata
->
input
=
hadlsch
->
c
[
r
];
rdata
->
input
=
hadlsch
->
c
[
r
];
rdata
->
Kr_bytes
=
(
r
<
hadlsch
->
Cminus
?
hadlsch
->
Kminus
:
hadlsch
->
Kplus
)
>>
3
;
rdata
->
Kr_bytes
=
(
r
<
hadlsch
->
Cminus
?
hadlsch
->
Kminus
:
hadlsch
->
Kplus
)
>>
3
;
rdata
->
filler
=
(
r
==
0
)
?
hadlsch
->
F
:
0
;
rdata
->
filler
=
(
r
==
0
)
?
hadlsch
->
F
:
0
;
...
@@ -379,13 +367,9 @@ int dlsch_encoding(PHY_VARS_eNB *eNB,
...
@@ -379,13 +367,9 @@ int dlsch_encoding(PHY_VARS_eNB *eNB,
rdata
->
round
=
hadlsch
->
round
;
rdata
->
round
=
hadlsch
->
round
;
rdata
->
r_offset
=
r_offset
;
rdata
->
r_offset
=
r_offset
;
rdata
->
G
=
G
;
rdata
->
G
=
G
;
#ifdef TASK_MANAGER_LTE
task_t
t
=
{.
func
=
TPencode
,
.
args
=
rdata
};
task_t
t
=
{.
func
=
TPencode
,
.
args
=
rdata
};
async_task_manager
(
proc
->
man
,
t
);
async_task_manager
(
proc
->
man
,
t
);
#else
pushTpool
(
proc
->
threadPool
,
req
);
#endif
nbEncode
++
;
int
Qm
=
hadlsch
->
Qm
;
int
Qm
=
hadlsch
->
Qm
;
int
C
=
hadlsch
->
C
;
int
C
=
hadlsch
->
C
;
...
@@ -398,20 +382,7 @@ int dlsch_encoding(PHY_VARS_eNB *eNB,
...
@@ -398,20 +382,7 @@ int dlsch_encoding(PHY_VARS_eNB *eNB,
r_offset
+=
Nl
*
Qm
*
((
GpmodC
==
0
?
0
:
1
)
+
(
Gp
/
C
));
r_offset
+=
Nl
*
Qm
*
((
GpmodC
==
0
?
0
:
1
)
+
(
Gp
/
C
));
}
}
#ifdef TASK_MANAGER_LTE
if
(
nbEncode
>
0
){
join_task_ans
(
ans
,
hadlsch
->
C
);
join_task_ans
(
ans
,
hadlsch
->
C
);
}
#else
// Wait all other threads finish to process
while
(
nbEncode
)
{
notifiedFIFO_elt_t
*
res
=
pullTpool
(
&
respEncode
,
proc
->
threadPool
);
if
(
res
==
NULL
)
break
;
// Tpool has been stopped
delNotifiedFIFO_elt
(
res
);
nbEncode
--
;
}
#endif
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_ENB_DLSCH_ENCODING
,
VCD_FUNCTION_OUT
);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_ENB_DLSCH_ENCODING
,
VCD_FUNCTION_OUT
);
return
(
0
);
return
(
0
);
...
@@ -477,24 +448,14 @@ int dlsch_encoding_fembms_pmch(PHY_VARS_eNB *eNB,
...
@@ -477,24 +448,14 @@ int dlsch_encoding_fembms_pmch(PHY_VARS_eNB *eNB,
&
hadlsch
->
F
)
<
0
)
&
hadlsch
->
F
)
<
0
)
return
(
-
1
);
return
(
-
1
);
}
}
int
nbEncode
=
0
;
#ifdef TASK_MANAGER_LTE
turboEncode_t
arr
[
hadlsch
->
C
];
turboEncode_t
arr
[
hadlsch
->
C
];
task_ans_t
ans
[
hadlsch
->
C
];
task_ans_t
ans
[
hadlsch
->
C
];
memset
(
ans
,
0
,
hadlsch
->
C
*
sizeof
(
task_ans_t
));
memset
(
ans
,
0
,
hadlsch
->
C
*
sizeof
(
task_ans_t
));
#endif
notifiedFIFO_t
respEncode
;
initNotifiedFIFO
(
&
respEncode
);
for
(
int
r
=
0
,
r_offset
=
0
;
r
<
hadlsch
->
C
;
r
++
)
{
for
(
int
r
=
0
,
r_offset
=
0
;
r
<
hadlsch
->
C
;
r
++
)
{
#ifdef TASK_MANAGER_LTE
turboEncode_t
*
rdata
=
&
arr
[
r
];
turboEncode_t
*
rdata
=
&
arr
[
r
];
rdata
->
ans
=
&
ans
[
r
];
rdata
->
ans
=
&
ans
[
r
];
#else
union
turboReqUnion
id
=
{.
s
=
{
dlsch
->
rnti
,
frame
,
subframe
,
r
,
0
}};
notifiedFIFO_elt_t
*
req
=
newNotifiedFIFO_elt
(
sizeof
(
turboEncode_t
),
id
.
p
,
&
respEncode
,
TPencode
);
turboEncode_t
*
rdata
=
(
turboEncode_t
*
)
NotifiedFifoData
(
req
);
#endif
rdata
->
input
=
hadlsch
->
c
[
r
];
rdata
->
input
=
hadlsch
->
c
[
r
];
rdata
->
Kr_bytes
=
(
r
<
hadlsch
->
Cminus
?
hadlsch
->
Kminus
:
hadlsch
->
Kplus
)
>>
3
;
rdata
->
Kr_bytes
=
(
r
<
hadlsch
->
Cminus
?
hadlsch
->
Kminus
:
hadlsch
->
Kplus
)
>>
3
;
rdata
->
filler
=
(
r
==
0
)
?
hadlsch
->
F
:
0
;
rdata
->
filler
=
(
r
==
0
)
?
hadlsch
->
F
:
0
;
...
@@ -508,13 +469,8 @@ int dlsch_encoding_fembms_pmch(PHY_VARS_eNB *eNB,
...
@@ -508,13 +469,8 @@ int dlsch_encoding_fembms_pmch(PHY_VARS_eNB *eNB,
rdata
->
r_offset
=
r_offset
;
rdata
->
r_offset
=
r_offset
;
rdata
->
G
=
G
;
rdata
->
G
=
G
;
#ifdef TASK_MANAGER_LTE
task_t
t
=
{.
func
=
TPencode
,
.
args
=
rdata
};
task_t
t
=
{.
func
=
TPencode
,
.
args
=
rdata
};
async_task_manager
(
proc
->
man
,
t
);
async_task_manager
(
proc
->
man
,
t
);
#else
pushTpool
(
proc
->
threadPool
,
req
);
#endif
nbEncode
++
;
int
Qm
=
hadlsch
->
Qm
;
int
Qm
=
hadlsch
->
Qm
;
int
C
=
hadlsch
->
C
;
int
C
=
hadlsch
->
C
;
...
@@ -527,20 +483,8 @@ int dlsch_encoding_fembms_pmch(PHY_VARS_eNB *eNB,
...
@@ -527,20 +483,8 @@ int dlsch_encoding_fembms_pmch(PHY_VARS_eNB *eNB,
r_offset
+=
Nl
*
Qm
*
((
GpmodC
==
0
?
0
:
1
)
+
(
Gp
/
C
));
r_offset
+=
Nl
*
Qm
*
((
GpmodC
==
0
?
0
:
1
)
+
(
Gp
/
C
));
}
}
#ifdef TASK_MANAGER_LTE
if
(
nbEncode
>
0
){
join_task_ans
(
ans
,
hadlsch
->
C
);
join_task_ans
(
ans
,
hadlsch
->
C
);
}
#else
// Wait all other threads finish to process
while
(
nbEncode
)
{
notifiedFIFO_elt_t
*
res
=
pullTpool
(
&
respEncode
,
proc
->
threadPool
);
if
(
res
==
NULL
)
break
;
// Tpool has been stopped
delNotifiedFIFO_elt
(
res
);
nbEncode
--
;
}
#endif
return
(
0
);
return
(
0
);
}
}
...
...
openair1/PHY/LTE_TRANSPORT/transport_proto.h
View file @
7d5ea3e9
...
@@ -527,10 +527,8 @@ unsigned int ulsch_decoding(PHY_VARS_eNB *phy_vars_eNB,
...
@@ -527,10 +527,8 @@ unsigned int ulsch_decoding(PHY_VARS_eNB *phy_vars_eNB,
uint8_t
UE_id
,
uint8_t
UE_id
,
uint8_t
control_only_flag
,
uint8_t
control_only_flag
,
uint8_t
Nbundled
,
uint8_t
Nbundled
,
uint8_t
llr8_flag
uint8_t
llr8_flag
,
#ifdef TASK_MANAGER_LTE
thread_info_tm_t
*
t_info
,
thread_info_tm_t
*
t_info
#endif
);
);
void
generate_phich_top
(
PHY_VARS_eNB
*
phy_vars_eNB
,
void
generate_phich_top
(
PHY_VARS_eNB
*
phy_vars_eNB
,
...
...
openair1/PHY/LTE_TRANSPORT/ulsch_decoding.c
View file @
7d5ea3e9
...
@@ -240,9 +240,8 @@ void processULSegment(void * arg) {
...
@@ -240,9 +240,8 @@ void processULSegment(void * arg) {
1
,
1
,
r
,
r
,
&
E
)
==-
1
)
{
&
E
)
==-
1
)
{
#ifdef TASK_MANAGER_LTE
// Task completed in parallel
completed_task_ans
(
rdata
->
ans
);
completed_task_ans
(
rdata
->
ans
);
#endif
LOG_E
(
PHY
,
"ulsch_decoding.c: Problem in rate matching
\n
"
);
LOG_E
(
PHY
,
"ulsch_decoding.c: Problem in rate matching
\n
"
);
return
;
return
;
}
}
...
@@ -289,9 +288,9 @@ void processULSegment(void * arg) {
...
@@ -289,9 +288,9 @@ void processULSegment(void * arg) {
&
eNB
->
ulsch_tc_intl2_stats
,
&
eNB
->
ulsch_tc_intl2_stats
,
&
ulsch_harq
->
abort_decode
);
&
ulsch_harq
->
abort_decode
);
#ifdef TASK_MANAGER_LTE
// Task completed in parallel
completed_task_ans
(
rdata
->
ans
);
completed_task_ans
(
rdata
->
ans
);
#endif
}
}
/*!
/*!
...
@@ -303,11 +302,7 @@ void processULSegment(void * arg) {
...
@@ -303,11 +302,7 @@ void processULSegment(void * arg) {
@returns 0 on success
@returns 0 on success
*/
*/
#ifdef TASK_MANAGER_LTE
static
int
ulsch_decoding_data
(
PHY_VARS_eNB
*
eNB
,
L1_rxtx_proc_t
*
proc
,
int
UE_id
,
int
harq_pid
,
int
llr8_flag
,
thread_info_tm_t
*
t_info
)
static
int
ulsch_decoding_data
(
PHY_VARS_eNB
*
eNB
,
L1_rxtx_proc_t
*
proc
,
int
UE_id
,
int
harq_pid
,
int
llr8_flag
,
thread_info_tm_t
*
t_info
)
#else
static
int
ulsch_decoding_data
(
PHY_VARS_eNB
*
eNB
,
L1_rxtx_proc_t
*
proc
,
int
UE_id
,
int
harq_pid
,
int
llr8_flag
)
#endif
{
{
unsigned
int
r_offset
=
0
;
unsigned
int
r_offset
=
0
;
int
offset
=
0
;
int
offset
=
0
;
...
@@ -343,19 +338,11 @@ static int ulsch_decoding_data(PHY_VARS_eNB *eNB, L1_rxtx_proc_t *proc, int UE_i
...
@@ -343,19 +338,11 @@ static int ulsch_decoding_data(PHY_VARS_eNB *eNB, L1_rxtx_proc_t *proc, int UE_i
else
else
E
=
ulsch_harq
->
Qm
*
((
GpmodC
==
0
?
0
:
1
)
+
(
Gp
/
ulsch_harq
->
C
));
E
=
ulsch_harq
->
Qm
*
((
GpmodC
==
0
?
0
:
1
)
+
(
Gp
/
ulsch_harq
->
C
));
#ifdef TASK_MANAGER_LTE
turboDecode_t
*
rdata
=
&
((
turboDecode_t
*
)
t_info
->
buf
)[
t_info
->
len
];
turboDecode_t
*
rdata
=
&
((
turboDecode_t
*
)
t_info
->
buf
)[
t_info
->
len
];
assert
(
t_info
->
len
<
64
);
assert
(
t_info
->
len
<
64
);
rdata
->
ans
=
&
t_info
->
ans
[
t_info
->
len
];
rdata
->
ans
=
&
t_info
->
ans
[
t_info
->
len
];
t_info
->
len
+=
1
;
t_info
->
len
+=
1
;
#else
union
turboReqUnion
id
=
{.
s
=
{
ulsch
->
rnti
,
proc
->
frame_rx
,
proc
->
subframe_rx
,
0
,
0
}};
notifiedFIFO_elt_t
*
req
=
newNotifiedFIFO_elt
(
sizeof
(
turboDecode_t
),
id
.
p
,
proc
->
respDecode
,
processULSegment
);
turboDecode_t
*
rdata
=
(
turboDecode_t
*
)
NotifiedFifoData
(
req
);
#endif
rdata
->
eNB
=
eNB
;
rdata
->
eNB
=
eNB
;
rdata
->
frame
=
proc
->
frame_rx
;
rdata
->
frame
=
proc
->
frame_rx
;
rdata
->
subframe
=
proc
->
subframe_rx
;
rdata
->
subframe
=
proc
->
subframe_rx
;
...
@@ -373,12 +360,10 @@ static int ulsch_decoding_data(PHY_VARS_eNB *eNB, L1_rxtx_proc_t *proc, int UE_i
...
@@ -373,12 +360,10 @@ static int ulsch_decoding_data(PHY_VARS_eNB *eNB, L1_rxtx_proc_t *proc, int UE_i
rdata
->
function
=
td
;
rdata
->
function
=
td
;
int
Fbytes
=
(
r
==
0
)
?
rdata
->
Fbits
>>
3
:
0
;
int
Fbytes
=
(
r
==
0
)
?
rdata
->
Fbits
>>
3
:
0
;
int
sz
=
Kr_bytes
-
Fbytes
-
((
ulsch_harq
->
C
>
1
)
?
3
:
0
);
int
sz
=
Kr_bytes
-
Fbytes
-
((
ulsch_harq
->
C
>
1
)
?
3
:
0
);
#ifdef TASK_MANAGER_LTE
task_t
t
=
{
.
args
=
rdata
,
.
func
=
&
processULSegment
};
task_t
t
=
{
.
func
=
&
processULSegment
,
.
args
=
rdata
};
async_task_manager
(
proc
->
man
,
t
);
async_task_manager
(
proc
->
man
,
t
);
#else
pushTpool
(
proc
->
threadPool
,
req
);
#endif
proc
->
nbDecode
++
;
proc
->
nbDecode
++
;
LOG_D
(
PHY
,
"Added a block to decode, in pipe: %d
\n
"
,
proc
->
nbDecode
);
LOG_D
(
PHY
,
"Added a block to decode, in pipe: %d
\n
"
,
proc
->
nbDecode
);
r_offset
+=
E
;
r_offset
+=
E
;
...
@@ -419,10 +404,8 @@ unsigned int ulsch_decoding(PHY_VARS_eNB *eNB,
...
@@ -419,10 +404,8 @@ unsigned int ulsch_decoding(PHY_VARS_eNB *eNB,
uint8_t
UE_id
,
uint8_t
UE_id
,
uint8_t
control_only_flag
,
uint8_t
control_only_flag
,
uint8_t
Nbundled
,
uint8_t
Nbundled
,
uint8_t
llr8_flag
uint8_t
llr8_flag
,
#ifdef TASK_MANAGER_LTE
thread_info_tm_t
*
t_info
,
thread_info_tm_t
*
t_info
#endif
)
)
{
{
int16_t
*
ulsch_llr
=
eNB
->
pusch_vars
[
UE_id
]
->
llr
;
int16_t
*
ulsch_llr
=
eNB
->
pusch_vars
[
UE_id
]
->
llr
;
...
@@ -1110,11 +1093,7 @@ unsigned int ulsch_decoding(PHY_VARS_eNB *eNB,
...
@@ -1110,11 +1093,7 @@ unsigned int ulsch_decoding(PHY_VARS_eNB *eNB,
LOG_D
(
PHY
,
"frame %d subframe %d O_ACK:%d o_ACK[]=%d:%d:%d:%d
\n
"
,
frame
,
subframe
,
ulsch_harq
->
O_ACK
,
ulsch_harq
->
o_ACK
[
0
],
ulsch_harq
->
o_ACK
[
1
],
ulsch_harq
->
o_ACK
[
2
],
ulsch_harq
->
o_ACK
[
3
]);
LOG_D
(
PHY
,
"frame %d subframe %d O_ACK:%d o_ACK[]=%d:%d:%d:%d
\n
"
,
frame
,
subframe
,
ulsch_harq
->
O_ACK
,
ulsch_harq
->
o_ACK
[
0
],
ulsch_harq
->
o_ACK
[
1
],
ulsch_harq
->
o_ACK
[
2
],
ulsch_harq
->
o_ACK
[
3
]);
// Do ULSCH Decoding for data portion
// Do ULSCH Decoding for data portion
#ifdef TASK_MANAGER_LTE
ret
=
ulsch_decoding_data
(
eNB
,
proc
,
UE_id
,
harq_pid
,
llr8_flag
,
t_info
);
ret
=
ulsch_decoding_data
(
eNB
,
proc
,
UE_id
,
harq_pid
,
llr8_flag
,
t_info
);
#else
ret
=
ulsch_decoding_data
(
eNB
,
proc
,
UE_id
,
harq_pid
,
llr8_flag
);
#endif
return
(
ret
);
return
(
ret
);
}
}
...
...
openair1/PHY/defs_eNB.h
View file @
7d5ea3e9
...
@@ -252,11 +252,7 @@ typedef struct {
...
@@ -252,11 +252,7 @@ typedef struct {
pthread_cond_t
cond_RUs
;
pthread_cond_t
cond_RUs
;
/// mutex for RXn-TXnp4 processing thread
/// mutex for RXn-TXnp4 processing thread
pthread_mutex_t
mutex_RUs
;
pthread_mutex_t
mutex_RUs
;
#ifdef TASK_MANAGER_LTE
task_manager_t
*
man
;
// non-owning ptr
task_manager_t
*
man
;
// non-owning ptr
#else
tpool_t
*
threadPool
;
#endif
int
nbDecode
;
int
nbDecode
;
notifiedFIFO_t
*
respDecode
;
notifiedFIFO_t
*
respDecode
;
pthread_mutex_t
mutex_emulateRF
;
pthread_mutex_t
mutex_emulateRF
;
...
@@ -797,9 +793,7 @@ typedef struct TurboDecode_s {
...
@@ -797,9 +793,7 @@ typedef struct TurboDecode_s {
int
offset
;
int
offset
;
int
maxIterations
;
int
maxIterations
;
int
decodeIterations
;
int
decodeIterations
;
#ifdef TASK_MANAGER_LTE
task_ans_t
*
ans
;
task_ans_t
*
ans
;
#endif
}
turboDecode_t
;
}
turboDecode_t
;
#define TURBO_SIMD_SOFTBITS 96+12+3+3*6144
#define TURBO_SIMD_SOFTBITS 96+12+3+3*6144
...
@@ -816,9 +810,7 @@ typedef struct turboEncode_s {
...
@@ -816,9 +810,7 @@ typedef struct turboEncode_s {
time_stats_t
*
rm_stats
;
time_stats_t
*
rm_stats
;
time_stats_t
*
te_stats
;
time_stats_t
*
te_stats
;
time_stats_t
*
i_stats
;
time_stats_t
*
i_stats
;
#ifdef TASK_MANAGER_LTE
task_ans_t
*
ans
;
task_ans_t
*
ans
;
#endif
}
turboEncode_t
;
}
turboEncode_t
;
...
...
openair1/SCHED/phy_procedures_lte_eNb.c
View file @
7d5ea3e9
...
@@ -1233,13 +1233,7 @@ uci_procedures(PHY_VARS_eNB *eNB,
...
@@ -1233,13 +1233,7 @@ uci_procedures(PHY_VARS_eNB *eNB,
}
// end loop for (int i = 0; i < NUMBER_OF_UCI_MAX; i++) {
}
// end loop for (int i = 0; i < NUMBER_OF_UCI_MAX; i++) {
}
}
#ifdef TASK_MANAGER_LTE
void
postDecode
(
L1_rxtx_proc_t
*
proc
,
turboDecode_t
*
rdata
){
void
postDecode
(
L1_rxtx_proc_t
*
proc
,
turboDecode_t
*
rdata
){
#else
void
postDecode
(
L1_rxtx_proc_t
*
proc
,
notifiedFIFO_elt_t
*
req
)
{
turboDecode_t
*
rdata
=
(
turboDecode_t
*
)
NotifiedFifoData
(
req
);
#endif
LTE_eNB_ULSCH_t
*
ulsch
=
rdata
->
eNB
->
ulsch
[
rdata
->
UEid
];
LTE_eNB_ULSCH_t
*
ulsch
=
rdata
->
eNB
->
ulsch
[
rdata
->
UEid
];
LTE_UL_eNB_HARQ_t
*
ulsch_harq
=
rdata
->
ulsch_harq
;
LTE_UL_eNB_HARQ_t
*
ulsch_harq
=
rdata
->
ulsch_harq
;
PHY_VARS_eNB
*
eNB
=
rdata
->
eNB
;
PHY_VARS_eNB
*
eNB
=
rdata
->
eNB
;
...
@@ -1334,11 +1328,9 @@ void pusch_procedures(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc) {
...
@@ -1334,11 +1328,9 @@ void pusch_procedures(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc) {
const
int
frame
=
proc
->
frame_rx
;
const
int
frame
=
proc
->
frame_rx
;
uint32_t
harq_pid0
=
subframe2harq_pid
(
&
eNB
->
frame_parms
,
frame
,
subframe
);
uint32_t
harq_pid0
=
subframe2harq_pid
(
&
eNB
->
frame_parms
,
frame
,
subframe
);
#ifdef TASK_MANAGER_LTE
turboDecode_t
arr
[
64
]
=
{
0
};
turboDecode_t
arr
[
64
]
=
{
0
};
task_ans_t
ans
[
64
]
=
{
0
};
task_ans_t
ans
[
64
]
=
{
0
};
thread_info_tm_t
t_info
=
{
.
ans
=
ans
,
.
buf
=
(
uint8_t
*
)
arr
};
thread_info_tm_t
t_info
=
{
.
ans
=
ans
,
.
buf
=
(
uint8_t
*
)
arr
};
#endif
for
(
i
=
0
;
i
<
NUMBER_OF_ULSCH_MAX
;
i
++
)
{
for
(
i
=
0
;
i
<
NUMBER_OF_ULSCH_MAX
;
i
++
)
{
ulsch
=
eNB
->
ulsch
[
i
];
ulsch
=
eNB
->
ulsch
[
i
];
...
@@ -1398,9 +1390,7 @@ void pusch_procedures(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc) {
...
@@ -1398,9 +1390,7 @@ void pusch_procedures(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc) {
0
,
// control_only_flag
0
,
// control_only_flag
ulsch_harq
->
V_UL_DAI
,
ulsch_harq
->
V_UL_DAI
,
ulsch_harq
->
nb_rb
>
20
?
1
:
0
ulsch_harq
->
nb_rb
>
20
?
1
:
0
#ifdef TASK_MANAGER_LTE
,
&
t_info
,
&
t_info
#endif
);
);
}
}
else
if
((
ulsch
)
&&
else
if
((
ulsch
)
&&
...
@@ -1418,7 +1408,6 @@ void pusch_procedures(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc) {
...
@@ -1418,7 +1408,6 @@ void pusch_procedures(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc) {
}
// for (i=0; i<NUMBER_OF_ULSCH_MAX; i++)
}
// for (i=0; i<NUMBER_OF_ULSCH_MAX; i++)
const
bool
decode
=
proc
->
nbDecode
;
const
bool
decode
=
proc
->
nbDecode
;
#ifdef TASK_MANAGER_LTE
assert
(
t_info
.
len
==
proc
->
nbDecode
);
assert
(
t_info
.
len
==
proc
->
nbDecode
);
if
(
proc
->
nbDecode
>
0
)
{
if
(
proc
->
nbDecode
>
0
)
{
join_task_ans
(
t_info
.
ans
,
t_info
.
len
);
join_task_ans
(
t_info
.
ans
,
t_info
.
len
);
...
@@ -1426,17 +1415,6 @@ void pusch_procedures(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc) {
...
@@ -1426,17 +1415,6 @@ void pusch_procedures(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc) {
postDecode
(
proc
,
&
arr
[
i
]);
postDecode
(
proc
,
&
arr
[
i
]);
}
}
}
}
#else
while
(
proc
->
nbDecode
>
0
)
{
notifiedFIFO_elt_t
*
req
=
pullTpool
(
proc
->
respDecode
,
proc
->
threadPool
);
if
(
req
==
NULL
)
break
;
// Tpool has been stopped
postDecode
(
proc
,
req
);
const
time_stats_t
ts
=
exec_time_stats_NotifiedFIFO
(
req
);
merge_meas
(
&
eNB
->
ulsch_turbo_decoding_stats
,
&
ts
);
delNotifiedFIFO_elt
(
req
);
}
#endif
if
(
decode
)
if
(
decode
)
stop_meas
(
&
eNB
->
ulsch_decoding_stats
);
stop_meas
(
&
eNB
->
ulsch_decoding_stats
);
}
}
...
...
openair1/SIMULATION/LTE_PHY/dlsim.c
View file @
7d5ea3e9
...
@@ -590,9 +590,7 @@ int main(int argc, char **argv) {
...
@@ -590,9 +590,7 @@ int main(int argc, char **argv) {
nfapi_tx_request_t
TX_req
;
nfapi_tx_request_t
TX_req
;
Sched_Rsp_t
sched_resp
;
Sched_Rsp_t
sched_resp
;
int
pa
=
dB0
;
int
pa
=
dB0
;
#ifdef TASK_MANAGER_LTE
task_manager_t
man
=
{
0
};
task_manager_t
man
=
{
0
};
#endif
cpu_freq_GHz
=
get_cpu_freq_GHz
();
cpu_freq_GHz
=
get_cpu_freq_GHz
();
printf
(
"Detected cpu_freq %f GHz
\n
"
,
cpu_freq_GHz
);
printf
(
"Detected cpu_freq %f GHz
\n
"
,
cpu_freq_GHz
);
memset
((
void
*
)
&
sched_resp
,
0
,
sizeof
(
sched_resp
));
memset
((
void
*
)
&
sched_resp
,
0
,
sizeof
(
sched_resp
));
...
@@ -1260,14 +1258,10 @@ int main(int argc, char **argv) {
...
@@ -1260,14 +1258,10 @@ int main(int argc, char **argv) {
L1_rxtx_proc_t
*
proc_eNB
=
&
eNB
->
proc
.
L1_proc
;
L1_rxtx_proc_t
*
proc_eNB
=
&
eNB
->
proc
.
L1_proc
;
proc_eNB
->
respDecode
=
(
notifiedFIFO_t
*
)
malloc
(
sizeof
(
notifiedFIFO_t
));
proc_eNB
->
respDecode
=
(
notifiedFIFO_t
*
)
malloc
(
sizeof
(
notifiedFIFO_t
));
initNotifiedFIFO
(
proc_eNB
->
respDecode
);
initNotifiedFIFO
(
proc_eNB
->
respDecode
);
#ifdef TASK_MANAGER_LTE
int
const
n_threads
=
parse_num_threads
(
"n"
);
int
const
n_threads
=
parse_num_threads
(
"n"
);
init_task_manager
(
&
man
,
n_threads
);
init_task_manager
(
&
man
,
n_threads
);
proc_eNB
->
man
=
&
man
;
proc_eNB
->
man
=
&
man
;
#else
proc_eNB
->
threadPool
=
(
tpool_t
*
)
malloc
(
sizeof
(
tpool_t
));
initTpool
(
"n"
,
proc_eNB
->
threadPool
,
true
);
#endif
proc_eNB
->
frame_tx
=
0
;
proc_eNB
->
frame_tx
=
0
;
...
...
openair1/SIMULATION/LTE_PHY/ulsim.c
View file @
7d5ea3e9
...
@@ -789,15 +789,11 @@ int main(int argc, char **argv) {
...
@@ -789,15 +789,11 @@ int main(int argc, char **argv) {
proc_rxtx_ue
->
subframe_tx
=
proc_rxtx
->
subframe_rx
;
proc_rxtx_ue
->
subframe_tx
=
proc_rxtx
->
subframe_rx
;
proc_rxtx_ue
->
subframe_rx
=
(
proc_rxtx
->
subframe_tx
+
6
)
%
10
;
proc_rxtx_ue
->
subframe_rx
=
(
proc_rxtx
->
subframe_tx
+
6
)
%
10
;
#ifdef TASK_MANAGER_LTE
int
const
n_threads
=
parse_num_threads
(
"n"
);
int
const
n_threads
=
parse_num_threads
(
"n"
);
proc_rxtx
->
man
=
calloc
(
1
,
sizeof
(
task_manager_t
));
proc_rxtx
->
man
=
calloc
(
1
,
sizeof
(
task_manager_t
));
assert
(
proc_rxtx
->
man
!=
NULL
&&
"Memory exhausted"
);
assert
(
proc_rxtx
->
man
!=
NULL
&&
"Memory exhausted"
);
init_task_manager
(
proc_rxtx
->
man
,
n_threads
);
init_task_manager
(
proc_rxtx
->
man
,
n_threads
);
#else
proc_rxtx
->
threadPool
=
(
tpool_t
*
)
malloc
(
sizeof
(
tpool_t
));
initTpool
(
"n"
,
proc_rxtx
->
threadPool
,
true
);
#endif
proc_rxtx
->
respDecode
=
(
notifiedFIFO_t
*
)
malloc
(
sizeof
(
notifiedFIFO_t
));
proc_rxtx
->
respDecode
=
(
notifiedFIFO_t
*
)
malloc
(
sizeof
(
notifiedFIFO_t
));
initNotifiedFIFO
(
proc_rxtx
->
respDecode
);
initNotifiedFIFO
(
proc_rxtx
->
respDecode
);
...
...
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