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
69d378da
Commit
69d378da
authored
Jan 17, 2024
by
mir
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
TASK_MANAGER_UE_DECODING flag removed
parent
c4caf487
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
17 additions
and
61 deletions
+17
-61
common/utils/thread_pool/task_manager.h
common/utils/thread_pool/task_manager.h
+0
-2
executables/nr-uesoftmodem.c
executables/nr-uesoftmodem.c
+0
-2
executables/nr-uesoftmodem.h
executables/nr-uesoftmodem.h
+0
-3
openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_decoding.c
openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_decoding.c
+7
-42
openair1/PHY/defs_gNB.h
openair1/PHY/defs_gNB.h
+8
-2
openair1/PHY/defs_nr_UE.h
openair1/PHY/defs_nr_UE.h
+0
-2
openair1/SIMULATION/NR_PHY/dlsim.c
openair1/SIMULATION/NR_PHY/dlsim.c
+2
-8
No files found.
common/utils/thread_pool/task_manager.h
View file @
69d378da
#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_UE_DECODING
#define TASK_MANAGER_SIM
#define TASK_MANAGER_SIM
#define TASK_MANAGER_LTE
#define TASK_MANAGER_LTE
...
...
executables/nr-uesoftmodem.c
View file @
69d378da
...
@@ -489,10 +489,8 @@ int main(int argc, char **argv)
...
@@ -489,10 +489,8 @@ int main(int argc, char **argv)
T_Config_Init
();
T_Config_Init
();
#endif
#endif
#if defined TASK_MANAGER_UE_DECODING
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
(
&
nrUE_params
.
man
,
num_threads
);
init_task_manager
(
&
nrUE_params
.
man
,
num_threads
);
#endif
//randominit (0);
//randominit (0);
set_taus_seed
(
0
);
set_taus_seed
(
0
);
...
...
executables/nr-uesoftmodem.h
View file @
69d378da
...
@@ -70,10 +70,7 @@ typedef struct {
...
@@ -70,10 +70,7 @@ typedef struct {
uint64_t
optmask
;
//mask to store boolean config options
uint64_t
optmask
;
//mask to store boolean config options
uint32_t
ofdm_offset_divisor
;
// Divisor for sample offset computation for each OFDM symbol
uint32_t
ofdm_offset_divisor
;
// Divisor for sample offset computation for each OFDM symbol
int
max_ldpc_iterations
;
// number of maximum LDPC iterations
int
max_ldpc_iterations
;
// number of maximum LDPC iterations
#ifdef TASK_MANAGER_UE_DECODING
task_manager_t
man
;
task_manager_t
man
;
#endif
// tpool_t Tpool; // thread pool
int
UE_scan_carrier
;
int
UE_scan_carrier
;
int
UE_fo_compensation
;
int
UE_fo_compensation
;
int
timing_advance
;
int
timing_advance
;
...
...
openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_decoding.c
View file @
69d378da
...
@@ -74,7 +74,6 @@ void nr_dlsch_unscrambling(int16_t *llr, uint32_t size, uint8_t q, uint32_t Nid,
...
@@ -74,7 +74,6 @@ void nr_dlsch_unscrambling(int16_t *llr, uint32_t size, uint8_t q, uint32_t Nid,
#ifdef TASK_MANAGER_UE_DECODING
static
bool
nr_ue_postDecode
(
PHY_VARS_NR_UE
*
phy_vars_ue
,
static
bool
nr_ue_postDecode
(
PHY_VARS_NR_UE
*
phy_vars_ue
,
ldpcDecode_ue_t
*
rdata
,
ldpcDecode_ue_t
*
rdata
,
bool
last
,
bool
last
,
...
@@ -83,18 +82,6 @@ static bool nr_ue_postDecode(PHY_VARS_NR_UE *phy_vars_ue,
...
@@ -83,18 +82,6 @@ static bool nr_ue_postDecode(PHY_VARS_NR_UE *phy_vars_ue,
int
*
num_seg_ok
,
int
*
num_seg_ok
,
UE_nr_rxtx_proc_t
*
proc
)
UE_nr_rxtx_proc_t
*
proc
)
{
{
#else
static
bool
nr_ue_postDecode
(
PHY_VARS_NR_UE
*
phy_vars_ue
,
notifiedFIFO_elt_t
*
req
,
notifiedFIFO_t
*
nf_p
,
const
bool
last
,
int
b_size
,
uint8_t
b
[
b_size
],
int
*
num_seg_ok
,
const
UE_nr_rxtx_proc_t
*
proc
)
{
ldpcDecode_ue_t
*
rdata
=
(
ldpcDecode_ue_t
*
)
NotifiedFifoData
(
req
);
#endif
NR_DL_UE_HARQ_t
*
harq_process
=
rdata
->
harq_process
;
NR_DL_UE_HARQ_t
*
harq_process
=
rdata
->
harq_process
;
NR_UE_DLSCH_t
*
dlsch
=
(
NR_UE_DLSCH_t
*
)
rdata
->
dlsch
;
NR_UE_DLSCH_t
*
dlsch
=
(
NR_UE_DLSCH_t
*
)
rdata
->
dlsch
;
int
r
=
rdata
->
segment_r
;
int
r
=
rdata
->
segment_r
;
...
@@ -236,9 +223,8 @@ static void nr_processDLSegment(void *arg)
...
@@ -236,9 +223,8 @@ static void nr_processDLSegment(void *arg)
stop_meas
(
&
rdata
->
ts_rate_unmatch
);
stop_meas
(
&
rdata
->
ts_rate_unmatch
);
LOG_E
(
PHY
,
"dlsch_decoding.c: Problem in rate_matching
\n
"
);
LOG_E
(
PHY
,
"dlsch_decoding.c: Problem in rate_matching
\n
"
);
#ifdef TASK_MANAGER_UE_DECODING
// Task completed in parallel
completed_task_ans
(
rdata
->
ans
);
completed_task_ans
(
rdata
->
ans
);
#endif
return
;
return
;
}
}
stop_meas
(
&
rdata
->
ts_rate_unmatch
);
stop_meas
(
&
rdata
->
ts_rate_unmatch
);
...
@@ -280,9 +266,9 @@ static void nr_processDLSegment(void *arg)
...
@@ -280,9 +266,9 @@ static void nr_processDLSegment(void *arg)
memcpy
(
harq_process
->
c
[
r
],
LDPCoutput
,
Kr
>>
3
);
memcpy
(
harq_process
->
c
[
r
],
LDPCoutput
,
Kr
>>
3
);
stop_meas
(
&
rdata
->
ts_ldpc_decode
);
stop_meas
(
&
rdata
->
ts_ldpc_decode
);
}
}
#ifdef TASK_MANAGER_UE_DECODING
// Task completed in parallel
completed_task_ans
(
rdata
->
ans
);
completed_task_ans
(
rdata
->
ans
);
#endif
}
}
uint32_t
nr_dlsch_decoding
(
PHY_VARS_NR_UE
*
phy_vars_ue
,
uint32_t
nr_dlsch_decoding
(
PHY_VARS_NR_UE
*
phy_vars_ue
,
...
@@ -422,24 +408,17 @@ uint32_t nr_dlsch_decoding(PHY_VARS_NR_UE *phy_vars_ue,
...
@@ -422,24 +408,17 @@ uint32_t nr_dlsch_decoding(PHY_VARS_NR_UE *phy_vars_ue,
initNotifiedFIFO
(
&
nf
);
initNotifiedFIFO
(
&
nf
);
set_abort
(
&
harq_process
->
abort_decode
,
false
);
set_abort
(
&
harq_process
->
abort_decode
,
false
);
#ifdef TASK_MANAGER_UE_DECODING
ldpcDecode_ue_t
arr
[
harq_process
->
C
];
ldpcDecode_ue_t
arr
[
harq_process
->
C
];
task_ans_t
ans
[
harq_process
->
C
];
task_ans_t
ans
[
harq_process
->
C
];
memset
(
ans
,
0
,
harq_process
->
C
*
sizeof
(
task_ans_t
));
memset
(
ans
,
0
,
harq_process
->
C
*
sizeof
(
task_ans_t
));
#endif
for
(
r
=
0
;
r
<
harq_process
->
C
;
r
++
)
{
for
(
r
=
0
;
r
<
harq_process
->
C
;
r
++
)
{
//printf("start rx segment %d\n",r);
//printf("start rx segment %d\n",r);
uint32_t
E
=
nr_get_E
(
G
,
harq_process
->
C
,
dlsch
->
dlsch_config
.
qamModOrder
,
dlsch
->
Nl
,
r
);
uint32_t
E
=
nr_get_E
(
G
,
harq_process
->
C
,
dlsch
->
dlsch_config
.
qamModOrder
,
dlsch
->
Nl
,
r
);
decParams
.
R
=
nr_get_R_ldpc_decoder
(
dlsch
->
dlsch_config
.
rv
,
E
,
decParams
.
BG
,
decParams
.
Z
,
&
harq_process
->
llrLen
,
harq_process
->
DLround
);
decParams
.
R
=
nr_get_R_ldpc_decoder
(
dlsch
->
dlsch_config
.
rv
,
E
,
decParams
.
BG
,
decParams
.
Z
,
&
harq_process
->
llrLen
,
harq_process
->
DLround
);
#ifdef TASK_MANAGER_UE_DECODING
ldpcDecode_ue_t
*
rdata
=
&
arr
[
r
];
ldpcDecode_ue_t
*
rdata
=
&
arr
[
r
];
rdata
->
ans
=
&
ans
[
r
];
rdata
->
ans
=
&
ans
[
r
];
#else
union
ldpcReqUnion
id
=
{.
s
=
{
dlsch
->
rnti
,
frame
,
nr_slot_rx
,
0
,
0
}};
notifiedFIFO_elt_t
*
req
=
newNotifiedFIFO_elt
(
sizeof
(
ldpcDecode_ue_t
),
id
.
p
,
&
nf
,
&
nr_processDLSegment
);
ldpcDecode_ue_t
*
rdata
=
(
ldpcDecode_ue_t
*
)
NotifiedFifoData
(
req
);
#endif
rdata
->
phy_vars_ue
=
phy_vars_ue
;
rdata
->
phy_vars_ue
=
phy_vars_ue
;
rdata
->
harq_process
=
harq_process
;
rdata
->
harq_process
=
harq_process
;
rdata
->
decoderParms
=
decParams
;
rdata
->
decoderParms
=
decParams
;
...
@@ -462,12 +441,9 @@ uint32_t nr_dlsch_decoding(PHY_VARS_NR_UE *phy_vars_ue,
...
@@ -462,12 +441,9 @@ uint32_t nr_dlsch_decoding(PHY_VARS_NR_UE *phy_vars_ue,
reset_meas
(
&
rdata
->
ts_deinterleave
);
reset_meas
(
&
rdata
->
ts_deinterleave
);
reset_meas
(
&
rdata
->
ts_rate_unmatch
);
reset_meas
(
&
rdata
->
ts_rate_unmatch
);
reset_meas
(
&
rdata
->
ts_ldpc_decode
);
reset_meas
(
&
rdata
->
ts_ldpc_decode
);
#ifdef TASK_MANAGER_UE_DECODING
task_t
t
=
{.
args
=
rdata
,
.
func
=
nr_processDLSegment
};
task_t
t
=
{.
args
=
rdata
,
.
func
=
nr_processDLSegment
};
async_task_manager
(
&
get_nrUE_params
()
->
man
,
t
);
async_task_manager
(
&
get_nrUE_params
()
->
man
,
t
);
#else
pushTpool
(
&
get_nrUE_params
()
->
Tpool
,
req
);
#endif
LOG_D
(
PHY
,
"Added a block to decode, in pipe: %d
\n
"
,
r
);
LOG_D
(
PHY
,
"Added a block to decode, in pipe: %d
\n
"
,
r
);
r_offset
+=
E
;
r_offset
+=
E
;
offset
+=
(
Kr_bytes
-
(
harq_process
->
F
>>
3
)
-
((
harq_process
->
C
>
1
)
?
3
:
0
));
offset
+=
(
Kr_bytes
-
(
harq_process
->
F
>>
3
)
-
((
harq_process
->
C
>
1
)
?
3
:
0
));
...
@@ -475,23 +451,12 @@ uint32_t nr_dlsch_decoding(PHY_VARS_NR_UE *phy_vars_ue,
...
@@ -475,23 +451,12 @@ uint32_t nr_dlsch_decoding(PHY_VARS_NR_UE *phy_vars_ue,
}
}
int
num_seg_ok
=
0
;
int
num_seg_ok
=
0
;
int
nbDecode
=
harq_process
->
C
;
int
nbDecode
=
harq_process
->
C
;
#ifdef TASK_MANAGER_UE_DECODING
if
(
nbDecode
>
0
){
if
(
nbDecode
>
0
){
join_task_ans
(
ans
,
nbDecode
);
join_task_ans
(
ans
,
nbDecode
);
for
(
size_t
i
=
0
;
i
<
nbDecode
;
++
i
){
for
(
size_t
i
=
0
;
i
<
nbDecode
;
++
i
){
nr_ue_postDecode
(
phy_vars_ue
,
&
arr
[
i
],
i
==
nbDecode
-
1
,
b_size
,
b
,
&
num_seg_ok
,
proc
);
nr_ue_postDecode
(
phy_vars_ue
,
&
arr
[
i
],
i
==
nbDecode
-
1
,
b_size
,
b
,
&
num_seg_ok
,
proc
);
}
}
}
}
#else
while
(
nbDecode
)
{
notifiedFIFO_elt_t
*
req
=
pullTpool
(
&
nf
,
&
get_nrUE_params
()
->
Tpool
);
if
(
req
==
NULL
)
break
;
// Tpool has been stopped
nr_ue_postDecode
(
phy_vars_ue
,
req
,
&
nf
,
nbDecode
==
1
,
b_size
,
b
,
&
num_seg_ok
,
proc
);
delNotifiedFIFO_elt
(
req
);
nbDecode
--
;
}
#endif
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_DLSCH_COMBINE_SEG
,
VCD_FUNCTION_OUT
);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_DLSCH_COMBINE_SEG
,
VCD_FUNCTION_OUT
);
ret
=
dlsch
->
last_iteration_cnt
;
ret
=
dlsch
->
last_iteration_cnt
;
...
...
openair1/PHY/defs_gNB.h
View file @
69d378da
...
@@ -729,10 +729,16 @@ typedef struct PHY_VARS_gNB_s {
...
@@ -729,10 +729,16 @@ typedef struct PHY_VARS_gNB_s {
void
*
scopeData
;
void
*
scopeData
;
/// structure for analyzing high-level RT measurements
/// structure for analyzing high-level RT measurements
rt_L1_profiling_t
rt_L1_profiling
;
rt_L1_profiling_t
rt_L1_profiling
;
#if defined(TASK_MANAGER_RU) || defined(TASK_MANAGER_SIM)
task_manager_t
man
;
task_manager_t
man
;
// Second tp needed to avoid a cycle at rx_func tx_func
// T0 -> waiting L1_tx_free -> fills L1_tx_filled (rx_func)
// T1 -> waiting join_task_ans -> fills L1_tx_out (tx_func)
// The task that let's join_task_ans continue is in the T1's queue
// i.e., cycle/deadlock as waiting to a task that the same
// thread should work on
// T3 -> waiting L1_tx_out -> fills L1_tx_free
task_manager_t
man_rx_tx_ru
;
task_manager_t
man_rx_tx_ru
;
#endif
}
PHY_VARS_gNB
;
}
PHY_VARS_gNB
;
typedef
struct
puschSymbolProc_s
{
typedef
struct
puschSymbolProc_s
{
...
...
openair1/PHY/defs_nr_UE.h
View file @
69d378da
...
@@ -676,9 +676,7 @@ typedef struct LDPCDecode_ue_s {
...
@@ -676,9 +676,7 @@ typedef struct LDPCDecode_ue_s {
time_stats_t
ts_rate_unmatch
;
time_stats_t
ts_rate_unmatch
;
time_stats_t
ts_ldpc_decode
;
time_stats_t
ts_ldpc_decode
;
UE_nr_rxtx_proc_t
proc
;
UE_nr_rxtx_proc_t
proc
;
#ifdef TASK_MANAGER_UE_DECODING
task_ans_t
*
ans
;
task_ans_t
*
ans
;
#endif
}
ldpcDecode_ue_t
;
}
ldpcDecode_ue_t
;
#include "SIMULATION/ETH_TRANSPORT/defs.h"
#include "SIMULATION/ETH_TRANSPORT/defs.h"
...
...
openair1/SIMULATION/NR_PHY/dlsim.c
View file @
69d378da
...
@@ -858,11 +858,8 @@ int main(int argc, char **argv)
...
@@ -858,11 +858,8 @@ int main(int argc, char **argv)
unsigned
char
*
test_input_bit
;
unsigned
char
*
test_input_bit
;
unsigned
int
errors_bit
=
0
;
unsigned
int
errors_bit
=
0
;
#ifdef TASK_MANAGER_UE_DECODING
init_task_manager
(
&
nrUE_params
.
man
,
max
(
1
,
dlsch_threads
));
init_task_manager
(
&
nrUE_params
.
man
,
max
(
1
,
dlsch_threads
));
#else
initFloatingCoresTpool
(
dlsch_threads
,
&
nrUE_params
.
Tpool
,
false
,
"UE-tpool"
);
#endif
test_input_bit
=
(
unsigned
char
*
)
malloc16
(
sizeof
(
unsigned
char
)
*
16
*
68
*
384
);
test_input_bit
=
(
unsigned
char
*
)
malloc16
(
sizeof
(
unsigned
char
)
*
16
*
68
*
384
);
estimated_output_bit
=
(
unsigned
char
*
)
malloc16
(
sizeof
(
unsigned
char
)
*
16
*
68
*
384
);
estimated_output_bit
=
(
unsigned
char
*
)
malloc16
(
sizeof
(
unsigned
char
)
*
16
*
68
*
384
);
...
@@ -890,12 +887,9 @@ int main(int argc, char **argv)
...
@@ -890,12 +887,9 @@ int main(int argc, char **argv)
//NR_COMMON_channels_t *cc = RC.nrmac[0]->common_channels;
//NR_COMMON_channels_t *cc = RC.nrmac[0]->common_channels;
int
n_errs
=
0
;
int
n_errs
=
0
;
#ifdef TASK_MANAGER_UE_DECODING
int
const
num_threads
=
parse_num_threads
(
gNBthreads
);
int
const
num_threads
=
parse_num_threads
(
gNBthreads
);
init_task_manager
(
&
gNB
->
man
,
num_threads
);
init_task_manager
(
&
gNB
->
man
,
num_threads
);
#else
initNamedTpool
(
gNBthreads
,
&
gNB
->
threadPool
,
true
,
"gNB-tpool"
);
#endif
initNotifiedFIFO
(
&
gNB
->
L1_tx_free
);
initNotifiedFIFO
(
&
gNB
->
L1_tx_free
);
initNotifiedFIFO
(
&
gNB
->
L1_tx_filled
);
initNotifiedFIFO
(
&
gNB
->
L1_tx_filled
);
initNotifiedFIFO
(
&
gNB
->
L1_tx_out
);
initNotifiedFIFO
(
&
gNB
->
L1_tx_out
);
...
...
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