Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
openairinterface5G
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Bin He
openairinterface5G
Commits
896463a9
Commit
896463a9
authored
5 years ago
by
Hongzhi Wang
Browse files
Options
Downloads
Patches
Plain Diff
update dlsch thread
parent
71369b5c
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_decoding.c
+24
-15
24 additions, 15 deletions
openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_decoding.c
with
24 additions
and
15 deletions
openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_decoding.c
+
24
−
15
View file @
896463a9
...
...
@@ -51,8 +51,9 @@
static
uint64_t
nb_total_decod
=
0
;
static
uint64_t
nb_error_decod
=
0
;
notifiedFIFO_t
freeBlocks
;
notifiedFIFO_elt_t
*
msgToPush
;
notifiedFIFO_t
freeBlocks_dl
;
notifiedFIFO_elt_t
*
msgToPush_dl
;
int
nbDlProcessing
=
0
;
//extern double cpuf;
...
...
@@ -787,6 +788,7 @@ uint32_t nr_dlsch_decoding_mthread(PHY_VARS_NR_UE *phy_vars_ue,
uint16_t
length_dmrs
=
1
;
//cfg->pdsch_config.dmrs_max_length.value;
uint32_t
i
,
j
;
// int nbDlProcessing =0;
__m128i
*
pv
=
(
__m128i
*
)
&
z
;
__m128i
*
pl
=
(
__m128i
*
)
&
l
;
...
...
@@ -939,17 +941,20 @@ uint32_t nr_dlsch_decoding_mthread(PHY_VARS_NR_UE *phy_vars_ue,
printf
(
"Segmentation: C %d, K %d
\n
"
,
harq_process
->
C
,
harq_process
->
K
);
#endif
notifiedFIFO_elt_t
*
res
;
notifiedFIFO_elt_t
*
res
_dl
;
opp_enabled
=
1
;
if
(
harq_process
->
C
>
1
)
{
for
(
int
nb_seg
=
1
;
nb_seg
<
harq_process
->
C
;
nb_seg
++
){
if
(
(
res
=
tryPullTpool
(
&
nf
,
Tpool_dl
))
!=
NULL
)
{
pushNotifiedFIFO_nothreadSafe
(
&
freeBlocks
,
res
);
if
(
(
res
_dl
=
tryPullTpool
(
&
nf
,
Tpool_dl
))
!=
NULL
)
{
pushNotifiedFIFO_nothreadSafe
(
&
freeBlocks
_dl
,
res
_dl
);
}
AssertFatal
((
msgToPush
=
pullNotifiedFIFO_nothreadSafe
(
&
freeBlocks
))
!=
NULL
,
"chained list failure"
);
nr_rxtx_thread_data_t
*
curMsg
=
(
nr_rxtx_thread_data_t
*
)
NotifiedFifoData
(
msgToPush
);
AssertFatal
((
msgToPush
_dl
=
pullNotifiedFIFO_nothreadSafe
(
&
freeBlocks
_dl
))
!=
NULL
,
"chained list failure"
);
nr_rxtx_thread_data_t
*
curMsg
=
(
nr_rxtx_thread_data_t
*
)
NotifiedFifoData
(
msgToPush
_dl
);
curMsg
->
UE
=
phy_vars_ue
;
nbDlProcessing
++
;
memset
(
&
curMsg
->
proc
,
0
,
sizeof
(
curMsg
->
proc
));
curMsg
->
proc
.
frame_rx
=
proc
->
frame_rx
;
...
...
@@ -960,8 +965,8 @@ uint32_t nr_dlsch_decoding_mthread(PHY_VARS_NR_UE *phy_vars_ue,
curMsg
->
proc
.
harq_pid
=
harq_pid
;
curMsg
->
proc
.
llr8_flag
=
llr8_flag
;
msgToPush
->
key
=
nb_seg
;
pushTpool
(
Tpool_dl
,
msgToPush
);
msgToPush
_dl
->
key
=
(
nr_tti_rx
%
2
)
?
(
nb_seg
+
30
)
:
nb_seg
;
pushTpool
(
Tpool_dl
,
msgToPush
_dl
);
/*Qm= harq_process->Qm;
Nl=harq_process->Nl;
...
...
@@ -1741,11 +1746,11 @@ void *dlsch_thread(void *arg) {
PHY_VARS_NR_UE
*
UE
=
(
PHY_VARS_NR_UE
*
)
arg
;
notifiedFIFO_t
nf
;
initNotifiedFIFO
(
&
nf
);
int
nbDlProcessing
=
0
;
initNotifiedFIFO_nothreadSafe
(
&
freeBlocks
);
notifiedFIFO_elt_t
*
res_dl
;
initNotifiedFIFO_nothreadSafe
(
&
freeBlocks
_dl
);
for
(
int
i
=
0
;
i
<
RX_NB_TH_DL
+
1
;
i
++
){
pushNotifiedFIFO_nothreadSafe
(
&
freeBlocks
,
pushNotifiedFIFO_nothreadSafe
(
&
freeBlocks
_dl
,
newNotifiedFIFO_elt
(
sizeof
(
nr_rxtx_thread_data_t
),
0
,
&
nf
,
nr_dlsch_decoding_process
));}
while
(
!
oai_exit
)
{
...
...
@@ -1755,14 +1760,18 @@ void *dlsch_thread(void *arg) {
while
(
nbDlProcessing
>=
RX_NB_TH_DL
)
{
if
(
(
res
=
tryPullTpool
(
&
nf
,
Tpool_dl
))
!=
NULL
)
{
nr_rxtx_thread_data_t
*
tmp
=
(
nr_rxtx_thread_data_t
*
)
res
->
msgData
;
nbDlProcessing
--
;
pushNotifiedFIFO_nothreadSafe
(
&
freeBlocks
,
res
);
//
nbDlProcessing--;
pushNotifiedFIFO_nothreadSafe
(
&
freeBlocks
_dl
,
res
);
}
usleep
(
200
);
}
res_dl
=
pullTpool
(
&
nf
,
Tpool_dl
);
nbDlProcessing
--
;
pushNotifiedFIFO_nothreadSafe
(
&
freeBlocks_dl
,
res_dl
);
nbDlProcessing
++
;
//msgToPush->key=0;
//pushTpool(Tpool, msgToPush);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment