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
c4a05d7e
Commit
c4a05d7e
authored
Jan 16, 2020
by
Raphael Defosseux
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/nr-dlsch-multi-thread' into integration-develop-nr-2020w03
parents
4174ca50
36276a23
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
87 additions
and
65 deletions
+87
-65
executables/nr-uesoftmodem.c
executables/nr-uesoftmodem.c
+11
-0
executables/nr-uesoftmodem.h
executables/nr-uesoftmodem.h
+1
-0
openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_decoding.c
openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_decoding.c
+68
-62
openair1/PHY/defs_common.h
openair1/PHY/defs_common.h
+1
-1
openair1/SCHED_NR_UE/phy_procedures_nr_ue.c
openair1/SCHED_NR_UE/phy_procedures_nr_ue.c
+6
-2
No files found.
executables/nr-uesoftmodem.c
View file @
c4a05d7e
...
@@ -27,6 +27,7 @@
...
@@ -27,6 +27,7 @@
#include "assertions.h"
#include "assertions.h"
#include "PHY/types.h"
#include "PHY/types.h"
#include "PHY/defs_nr_UE.h"
#include "PHY/defs_nr_UE.h"
#include "SCHED_NR_UE/defs.h"
#include "common/ran_context.h"
#include "common/ran_context.h"
#include "common/config/config_userapi.h"
#include "common/config/config_userapi.h"
//#include "common/utils/threadPool/thread-pool.h"
//#include "common/utils/threadPool/thread-pool.h"
...
@@ -216,6 +217,10 @@ int oaisim_flag=0;
...
@@ -216,6 +217,10 @@ int oaisim_flag=0;
int
emulate_rf
=
0
;
int
emulate_rf
=
0
;
tpool_t
*
Tpool
;
tpool_t
*
Tpool
;
#ifdef UE_DLSCH_PARALLELISATION
tpool_t
*
Tpool_dl
;
#endif
char
*
usrp_args
=
NULL
;
char
*
usrp_args
=
NULL
;
...
@@ -684,6 +689,12 @@ int main( int argc, char **argv ) {
...
@@ -684,6 +689,12 @@ int main( int argc, char **argv ) {
Tpool
=
&
pool
;
Tpool
=
&
pool
;
char
params
[]
=
"-1,-1"
;
char
params
[]
=
"-1,-1"
;
initTpool
(
params
,
Tpool
,
false
);
initTpool
(
params
,
Tpool
,
false
);
#ifdef UE_DLSCH_PARALLELISATION
tpool_t
pool_dl
;
Tpool_dl
=
&
pool_dl
;
char
params_dl
[]
=
"-1,-1,-1,-1, -1,-1,-1,-1,-1,-1,-1,-1,-1,-1"
;
initTpool
(
params_dl
,
Tpool_dl
,
false
);
#endif
cpuf
=
get_cpu_freq_GHz
();
cpuf
=
get_cpu_freq_GHz
();
itti_init
(
TASK_MAX
,
THREAD_MAX
,
MESSAGES_ID_MAX
,
tasks_info
,
messages_info
);
itti_init
(
TASK_MAX
,
THREAD_MAX
,
MESSAGES_ID_MAX
,
tasks_info
,
messages_info
);
...
...
executables/nr-uesoftmodem.h
View file @
c4a05d7e
...
@@ -103,4 +103,5 @@ extern void print_opp_meas(void);
...
@@ -103,4 +103,5 @@ extern void print_opp_meas(void);
void
*
UE_thread
(
void
*
arg
);
void
*
UE_thread
(
void
*
arg
);
PHY_VARS_NR_UE
*
init_nr_ue_vars
(
NR_DL_FRAME_PARMS
*
frame_parms
,
uint8_t
UE_id
,
uint8_t
abstraction_flag
);
PHY_VARS_NR_UE
*
init_nr_ue_vars
(
NR_DL_FRAME_PARMS
*
frame_parms
,
uint8_t
UE_id
,
uint8_t
abstraction_flag
);
extern
tpool_t
*
Tpool
;
extern
tpool_t
*
Tpool
;
extern
tpool_t
*
Tpool_dl
;
#endif
#endif
openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_decoding.c
View file @
c4a05d7e
...
@@ -51,8 +51,9 @@
...
@@ -51,8 +51,9 @@
static
uint64_t
nb_total_decod
=
0
;
static
uint64_t
nb_total_decod
=
0
;
static
uint64_t
nb_error_decod
=
0
;
static
uint64_t
nb_error_decod
=
0
;
notifiedFIFO_t
freeBlocks
;
notifiedFIFO_t
freeBlocks_dl
;
notifiedFIFO_elt_t
*
msgToPush
;
notifiedFIFO_elt_t
*
msgToPush_dl
;
int
nbDlProcessing
=
0
;
//extern double cpuf;
//extern double cpuf;
...
@@ -257,6 +258,8 @@ uint32_t nr_dlsch_decoding(PHY_VARS_NR_UE *phy_vars_ue,
...
@@ -257,6 +258,8 @@ uint32_t nr_dlsch_decoding(PHY_VARS_NR_UE *phy_vars_ue,
__m128i
*
pv
=
(
__m128i
*
)
&
z
;
__m128i
*
pv
=
(
__m128i
*
)
&
z
;
__m128i
*
pl
=
(
__m128i
*
)
&
l
;
__m128i
*
pl
=
(
__m128i
*
)
&
l
;
vcd_signal_dumper_dump_function_by_name
(
VCD_SIGNAL_DUMPER_FUNCTIONS_DLSCH_SEGMENTATION
,
VCD_FUNCTION_IN
);
//NR_DL_UE_HARQ_t *harq_process = dlsch->harq_processes[0];
//NR_DL_UE_HARQ_t *harq_process = dlsch->harq_processes[0];
...
@@ -312,8 +315,6 @@ uint32_t nr_dlsch_decoding(PHY_VARS_NR_UE *phy_vars_ue,
...
@@ -312,8 +315,6 @@ uint32_t nr_dlsch_decoding(PHY_VARS_NR_UE *phy_vars_ue,
LOG_I
(
PHY
,
"DLSCH Decoding, harq_pid %d TBS %d G %d mcs %d Nl %d nb_symb_sch %d nb_rb %d
\n
"
,
harq_pid
,
A
,
G
,
harq_process
->
mcs
,
harq_process
->
Nl
,
nb_symb_sch
,
nb_rb
);
LOG_I
(
PHY
,
"DLSCH Decoding, harq_pid %d TBS %d G %d mcs %d Nl %d nb_symb_sch %d nb_rb %d
\n
"
,
harq_pid
,
A
,
G
,
harq_process
->
mcs
,
harq_process
->
Nl
,
nb_symb_sch
,
nb_rb
);
vcd_signal_dumper_dump_function_by_name
(
VCD_SIGNAL_DUMPER_FUNCTIONS_DLSCH_SEGMENTATION
,
VCD_FUNCTION_IN
);
if
((
harq_process
->
R
)
<
1024
)
if
((
harq_process
->
R
)
<
1024
)
Coderate
=
(
float
)
(
harq_process
->
R
)
/
(
float
)
1024
;
Coderate
=
(
float
)
(
harq_process
->
R
)
/
(
float
)
1024
;
else
else
...
@@ -374,7 +375,7 @@ uint32_t nr_dlsch_decoding(PHY_VARS_NR_UE *phy_vars_ue,
...
@@ -374,7 +375,7 @@ uint32_t nr_dlsch_decoding(PHY_VARS_NR_UE *phy_vars_ue,
#endif
#endif
}
}
vcd_signal_dumper_dump_function_by_name
(
VCD_SIGNAL_DUMPER_FUNCTIONS_DLSCH_SEGMENTATION
,
VCD_FUNCTION_OUT
);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_DLSCH_SEGMENTATION
,
VCD_FUNCTION_OUT
);
p_decParams
->
Z
=
harq_process
->
Z
;
p_decParams
->
Z
=
harq_process
->
Z
;
//printf("dlsch decoding nr segmentation Z %d\n", p_decParams->Z);
//printf("dlsch decoding nr segmentation Z %d\n", p_decParams->Z);
...
@@ -424,14 +425,14 @@ uint32_t nr_dlsch_decoding(PHY_VARS_NR_UE *phy_vars_ue,
...
@@ -424,14 +425,14 @@ uint32_t nr_dlsch_decoding(PHY_VARS_NR_UE *phy_vars_ue,
start_meas
(
dlsch_deinterleaving_stats
);
start_meas
(
dlsch_deinterleaving_stats
);
#endif
#endif
vcd_signal_dumper_dump_function_by_name
(
VCD_SIGNAL_DUMPER_FUNCTIONS_DLSCH_DEINTERLEAVING
,
VCD_FUNCTION_IN
);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_DLSCH_DEINTERLEAVING
,
VCD_FUNCTION_IN
);
nr_deinterleaving_ldpc
(
E
,
nr_deinterleaving_ldpc
(
E
,
harq_process
->
Qm
,
harq_process
->
Qm
,
harq_process
->
w
[
r
],
// [hna] w is e
harq_process
->
w
[
r
],
// [hna] w is e
dlsch_llr
+
r_offset
);
dlsch_llr
+
r_offset
);
vcd_signal_dumper_dump_function_by_name
(
VCD_SIGNAL_DUMPER_FUNCTIONS_DLSCH_DEINTERLEAVING
,
VCD_FUNCTION_OUT
);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_DLSCH_DEINTERLEAVING
,
VCD_FUNCTION_OUT
);
//for (int i =0; i<16; i++)
//for (int i =0; i<16; i++)
// printf("rx output deinterleaving w[%d]= %d r_offset %d\n", i,harq_process->w[r][i], r_offset);
// printf("rx output deinterleaving w[%d]= %d r_offset %d\n", i,harq_process->w[r][i], r_offset);
...
@@ -456,7 +457,7 @@ uint32_t nr_dlsch_decoding(PHY_VARS_NR_UE *phy_vars_ue,
...
@@ -456,7 +457,7 @@ uint32_t nr_dlsch_decoding(PHY_VARS_NR_UE *phy_vars_ue,
harq_process
->
round
);
harq_process
->
round
);
#endif
#endif
vcd_signal_dumper_dump_function_by_name
(
VCD_SIGNAL_DUMPER_FUNCTIONS_DLSCH_RATE_MATCHING
,
VCD_FUNCTION_IN
);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_DLSCH_RATE_MATCHING
,
VCD_FUNCTION_IN
);
if
((
harq_process
->
Nl
)
<
4
)
if
((
harq_process
->
Nl
)
<
4
)
Tbslbrm
=
nr_compute_tbslbrm
(
harq_process
->
mcs_table
,
nb_rb
,
harq_process
->
Nl
,
harq_process
->
C
);
Tbslbrm
=
nr_compute_tbslbrm
(
harq_process
->
mcs_table
,
nb_rb
,
harq_process
->
Nl
,
harq_process
->
C
);
...
@@ -473,7 +474,7 @@ uint32_t nr_dlsch_decoding(PHY_VARS_NR_UE *phy_vars_ue,
...
@@ -473,7 +474,7 @@ uint32_t nr_dlsch_decoding(PHY_VARS_NR_UE *phy_vars_ue,
harq_process
->
rvidx
,
harq_process
->
rvidx
,
(
harq_process
->
round
==
0
)
?
1
:
0
,
(
harq_process
->
round
==
0
)
?
1
:
0
,
E
)
==-
1
)
{
E
)
==-
1
)
{
vcd_signal_dumper_dump_function_by_name
(
VCD_SIGNAL_DUMPER_FUNCTIONS_DLSCH_RATE_MATCHING
,
VCD_FUNCTION_OUT
);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_DLSCH_RATE_MATCHING
,
VCD_FUNCTION_OUT
);
#if UE_TIMING_TRACE
#if UE_TIMING_TRACE
stop_meas
(
dlsch_rate_unmatching_stats
);
stop_meas
(
dlsch_rate_unmatching_stats
);
#endif
#endif
...
@@ -481,7 +482,6 @@ uint32_t nr_dlsch_decoding(PHY_VARS_NR_UE *phy_vars_ue,
...
@@ -481,7 +482,6 @@ uint32_t nr_dlsch_decoding(PHY_VARS_NR_UE *phy_vars_ue,
return
(
dlsch
->
max_ldpc_iterations
+
1
);
return
(
dlsch
->
max_ldpc_iterations
+
1
);
}
else
{
}
else
{
vcd_signal_dumper_dump_function_by_name
(
VCD_SIGNAL_DUMPER_FUNCTIONS_DLSCH_RATE_MATCHING
,
VCD_FUNCTION_OUT
);
#if UE_TIMING_TRACE
#if UE_TIMING_TRACE
stop_meas
(
dlsch_rate_unmatching_stats
);
stop_meas
(
dlsch_rate_unmatching_stats
);
#endif
#endif
...
@@ -531,7 +531,7 @@ uint32_t nr_dlsch_decoding(PHY_VARS_NR_UE *phy_vars_ue,
...
@@ -531,7 +531,7 @@ uint32_t nr_dlsch_decoding(PHY_VARS_NR_UE *phy_vars_ue,
//LOG_E(PHY,"AbsSubframe %d.%d Start LDPC segment %d/%d A %d ",frame%1024,nr_tti_rx,r,harq_process->C-1, A);
//LOG_E(PHY,"AbsSubframe %d.%d Start LDPC segment %d/%d A %d ",frame%1024,nr_tti_rx,r,harq_process->C-1, A);
//
printf("harq process dr iteration %d\n", p_decParams->numMaxIter);
printf
(
"harq process dr iteration %d
\n
"
,
p_decParams
->
numMaxIter
);
memset
(
pv
,
0
,
2
*
harq_process
->
Z
*
sizeof
(
int16_t
));
memset
(
pv
,
0
,
2
*
harq_process
->
Z
*
sizeof
(
int16_t
));
//memset(pl,0,2*p_decParams->Z*sizeof(int8_t));
//memset(pl,0,2*p_decParams->Z*sizeof(int8_t));
...
@@ -552,7 +552,7 @@ uint32_t nr_dlsch_decoding(PHY_VARS_NR_UE *phy_vars_ue,
...
@@ -552,7 +552,7 @@ uint32_t nr_dlsch_decoding(PHY_VARS_NR_UE *phy_vars_ue,
pl
[
j
]
=
_mm_packs_epi16
(
pv
[
i
],
pv
[
i
+
1
]);
pl
[
j
]
=
_mm_packs_epi16
(
pv
[
i
],
pv
[
i
+
1
]);
}
}
vcd_signal_dumper_dump_function_by_name
(
VCD_SIGNAL_DUMPER_FUNCTIONS_DLSCH_LDPC
,
VCD_FUNCTION_IN
);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_DLSCH_LDPC
,
VCD_FUNCTION_IN
);
no_iteration_ldpc
=
nrLDPC_decoder
(
p_decParams
,
no_iteration_ldpc
=
nrLDPC_decoder
(
p_decParams
,
(
int8_t
*
)
&
pl
[
0
],
(
int8_t
*
)
&
pl
[
0
],
...
@@ -560,7 +560,7 @@ uint32_t nr_dlsch_decoding(PHY_VARS_NR_UE *phy_vars_ue,
...
@@ -560,7 +560,7 @@ uint32_t nr_dlsch_decoding(PHY_VARS_NR_UE *phy_vars_ue,
p_nrLDPC_procBuf
[
r
],
p_nrLDPC_procBuf
[
r
],
p_procTime
);
p_procTime
);
vcd_signal_dumper_dump_function_by_name
(
VCD_SIGNAL_DUMPER_FUNCTIONS_DLSCH_LDPC
,
VCD_FUNCTION_OUT
);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_DLSCH_LDPC
,
VCD_FUNCTION_OUT
);
// Fixme: correct type is unsigned, but nrLDPC_decoder and all called behind use signed int
// Fixme: correct type is unsigned, but nrLDPC_decoder and all called behind use signed int
if
(
check_crc
((
uint8_t
*
)
llrProcBuf
,
length_dec
,
harq_process
->
F
,
crc_type
))
{
if
(
check_crc
((
uint8_t
*
)
llrProcBuf
,
length_dec
,
harq_process
->
F
,
crc_type
))
{
...
@@ -570,7 +570,7 @@ uint32_t nr_dlsch_decoding(PHY_VARS_NR_UE *phy_vars_ue,
...
@@ -570,7 +570,7 @@ uint32_t nr_dlsch_decoding(PHY_VARS_NR_UE *phy_vars_ue,
ret
=
no_iteration_ldpc
;
ret
=
no_iteration_ldpc
;
}
}
else
{
else
{
printf
(
"
\x1B
[33m"
"
CRC NOK
\n\033
[0m"
);
printf
(
"
\x1B
[33m"
"
Segment %d CRC NOK
\n
"
,
r
);
ret
=
1
+
dlsch
->
max_ldpc_iterations
;
ret
=
1
+
dlsch
->
max_ldpc_iterations
;
}
}
...
@@ -686,7 +686,7 @@ uint32_t nr_dlsch_decoding(PHY_VARS_NR_UE *phy_vars_ue,
...
@@ -686,7 +686,7 @@ uint32_t nr_dlsch_decoding(PHY_VARS_NR_UE *phy_vars_ue,
printf("C %d\n",harq_process->C);
printf("C %d\n",harq_process->C);
*/
*/
vcd_signal_dumper_dump_function_by_name
(
VCD_SIGNAL_DUMPER_FUNCTIONS_DLSCH_COMBINE_SEG
,
VCD_FUNCTION_IN
);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_DLSCH_COMBINE_SEG
,
VCD_FUNCTION_IN
);
for
(
r
=
0
;
r
<
harq_process
->
C
;
r
++
)
{
for
(
r
=
0
;
r
<
harq_process
->
C
;
r
++
)
{
...
@@ -721,7 +721,7 @@ uint32_t nr_dlsch_decoding(PHY_VARS_NR_UE *phy_vars_ue,
...
@@ -721,7 +721,7 @@ uint32_t nr_dlsch_decoding(PHY_VARS_NR_UE *phy_vars_ue,
}
}
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
);
dlsch
->
last_iteration_cnt
=
ret
;
dlsch
->
last_iteration_cnt
=
ret
;
...
@@ -775,25 +775,27 @@ uint32_t nr_dlsch_decoding_mthread(PHY_VARS_NR_UE *phy_vars_ue,
...
@@ -775,25 +775,27 @@ uint32_t nr_dlsch_decoding_mthread(PHY_VARS_NR_UE *phy_vars_ue,
int16_t
z
[
68
*
384
];
int16_t
z
[
68
*
384
];
int8_t
l
[
68
*
384
];
int8_t
l
[
68
*
384
];
//__m128i l;
//__m128i l;
int16_t
inv_d
[
68
*
384
];
//
int16_t inv_d [68*384];
//int16_t *p_invd =&inv_d;
//int16_t *p_invd =&inv_d;
uint8_t
kb
,
kc
;
uint8_t
kb
,
kc
;
uint8_t
Ilbrm
=
1
;
uint8_t
Ilbrm
=
1
;
uint32_t
Tbslbrm
=
950984
;
uint32_t
Tbslbrm
=
950984
;
uint16_t
nb_rb
=
30
;
uint16_t
nb_rb
=
30
;
double
Coderate
=
0
.
0
;
double
Coderate
=
0
.
0
;
nfapi_nr_config_request_t
*
cfg
=
&
phy_vars_ue
->
nrUE_config
;
//
nfapi_nr_config_request_t *cfg = &phy_vars_ue->nrUE_config;
uint8_t
dmrs_type
=
cfg
->
pdsch_config
.
dmrs_type
.
value
;
//
uint8_t dmrs_type = cfg->pdsch_config.dmrs_type.value;
uint8_t
nb_re_dmrs
=
(
dmrs_type
==
NFAPI_NR_DMRS_TYPE1
)
?
6
:
4
;
uint8_t
nb_re_dmrs
=
6
;
//
(dmrs_type==NFAPI_NR_DMRS_TYPE1)?6:4;
uint16_t
length_dmrs
=
1
;
//cfg->pdsch_config.dmrs_max_length.value;
uint16_t
length_dmrs
=
1
;
//cfg->pdsch_config.dmrs_max_length.value;
uint32_t
i
,
j
;
uint32_t
i
,
j
;
// int nbDlProcessing =0;
__m128i
*
pv
=
(
__m128i
*
)
&
z
;
__m128i
*
pv
=
(
__m128i
*
)
&
z
;
__m128i
*
pl
=
(
__m128i
*
)
&
l
;
__m128i
*
pl
=
(
__m128i
*
)
&
l
;
notifiedFIFO_t
nf
;
notifiedFIFO_t
nf
;
initNotifiedFIFO
(
&
nf
);
initNotifiedFIFO
(
&
nf
);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_DLSCH_SEGMENTATION
,
VCD_FUNCTION_IN
);
if
(
!
dlsch_llr
)
{
if
(
!
dlsch_llr
)
{
printf
(
"dlsch_decoding.c: NULL dlsch_llr pointer
\n
"
);
printf
(
"dlsch_decoding.c: NULL dlsch_llr pointer
\n
"
);
...
@@ -845,7 +847,7 @@ uint32_t nr_dlsch_decoding_mthread(PHY_VARS_NR_UE *phy_vars_ue,
...
@@ -845,7 +847,7 @@ uint32_t nr_dlsch_decoding_mthread(PHY_VARS_NR_UE *phy_vars_ue,
G
=
harq_process
->
G
;
G
=
harq_process
->
G
;
LOG_
I
(
PHY
,
"DLSCH Decoding main, harq_pid %d TBS %d G %d mcs %d Nl %d nb_symb_sch %d nb_rb %d
\n
"
,
harq_pid
,
A
,
G
,
harq_process
->
mcs
,
harq_process
->
Nl
,
nb_symb_sch
,
nb_rb
);
LOG_
D
(
PHY
,
"DLSCH Decoding main, harq_pid %d TBS %d G %d mcs %d Nl %d nb_symb_sch %d nb_rb %d
\n
"
,
harq_pid
,
A
,
G
,
harq_process
->
mcs
,
harq_process
->
Nl
,
nb_symb_sch
,
nb_rb
);
proc
->
decoder_main_available
=
1
;
proc
->
decoder_main_available
=
1
;
...
@@ -939,17 +941,20 @@ uint32_t nr_dlsch_decoding_mthread(PHY_VARS_NR_UE *phy_vars_ue,
...
@@ -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
);
printf
(
"Segmentation: C %d, K %d
\n
"
,
harq_process
->
C
,
harq_process
->
K
);
#endif
#endif
notifiedFIFO_elt_t
*
res
;
notifiedFIFO_elt_t
*
res
_dl
;
opp_enabled
=
1
;
opp_enabled
=
1
;
if
(
harq_process
->
C
>
1
)
{
if
(
harq_process
->
C
>
1
)
{
for
(
int
nb_seg
=
1
;
nb_seg
<
harq_process
->
C
;
nb_seg
++
){
for
(
int
nb_seg
=
1
;
nb_seg
<
harq_process
->
C
;
nb_seg
++
){
if
(
(
res
=
tryPullTpool
(
&
nf
,
Tpoo
l
))
!=
NULL
)
{
if
(
(
res
_dl
=
tryPullTpool
(
&
nf
,
Tpool_d
l
))
!=
NULL
)
{
pushNotifiedFIFO_nothreadSafe
(
&
freeBlocks
,
res
);
pushNotifiedFIFO_nothreadSafe
(
&
freeBlocks
_dl
,
res_dl
);
}
}
AssertFatal
((
msgToPush
=
pullNotifiedFIFO_nothreadSafe
(
&
freeBlocks
))
!=
NULL
,
"chained list failure"
);
AssertFatal
((
msgToPush
_dl
=
pullNotifiedFIFO_nothreadSafe
(
&
freeBlocks_dl
))
!=
NULL
,
"chained list failure"
);
nr_rxtx_thread_data_t
*
curMsg
=
(
nr_rxtx_thread_data_t
*
)
NotifiedFifoData
(
msgToPush
);
nr_rxtx_thread_data_t
*
curMsg
=
(
nr_rxtx_thread_data_t
*
)
NotifiedFifoData
(
msgToPush_dl
);
curMsg
->
UE
=
phy_vars_ue
;
curMsg
->
UE
=
phy_vars_ue
;
nbDlProcessing
++
;
memset
(
&
curMsg
->
proc
,
0
,
sizeof
(
curMsg
->
proc
));
memset
(
&
curMsg
->
proc
,
0
,
sizeof
(
curMsg
->
proc
));
curMsg
->
proc
.
frame_rx
=
proc
->
frame_rx
;
curMsg
->
proc
.
frame_rx
=
proc
->
frame_rx
;
...
@@ -960,8 +965,8 @@ uint32_t nr_dlsch_decoding_mthread(PHY_VARS_NR_UE *phy_vars_ue,
...
@@ -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
.
harq_pid
=
harq_pid
;
curMsg
->
proc
.
llr8_flag
=
llr8_flag
;
curMsg
->
proc
.
llr8_flag
=
llr8_flag
;
msgToPush
->
key
=
nb_seg
;
msgToPush
_dl
->
key
=
(
nr_tti_rx
%
2
)
?
(
nb_seg
+
30
)
:
nb_seg
;
pushTpool
(
Tpool
,
msgToPush
);
pushTpool
(
Tpool
_dl
,
msgToPush_dl
);
/*Qm= harq_process->Qm;
/*Qm= harq_process->Qm;
Nl=harq_process->Nl;
Nl=harq_process->Nl;
...
@@ -1034,7 +1039,7 @@ uint32_t nr_dlsch_decoding_mthread(PHY_VARS_NR_UE *phy_vars_ue,
...
@@ -1034,7 +1039,7 @@ uint32_t nr_dlsch_decoding_mthread(PHY_VARS_NR_UE *phy_vars_ue,
if
(
harq_process
->
Nl
<
Nl
)
if
(
harq_process
->
Nl
<
Nl
)
Nl
=
harq_process
->
Nl
;
Nl
=
harq_process
->
Nl
;
Tbslbrm
=
nr_compute_tbslbrm
(
rel15
.
mcs_table
,
nb_rb
,
Nl
,
dlsch
->
harq_processes
[
harq_pid
]
->
C
);
Tbslbrm
=
nr_compute_tbslbrm
(
harq_process
->
mcs_table
,
nb_rb
,
harq_process
->
Nl
,
harq_process
->
C
);
if
(
nr_rate_matching_ldpc_rx
(
Ilbrm
,
if
(
nr_rate_matching_ldpc_rx
(
Ilbrm
,
Tbslbrm
,
Tbslbrm
,
...
@@ -1162,9 +1167,9 @@ uint32_t nr_dlsch_decoding_mthread(PHY_VARS_NR_UE *phy_vars_ue,
...
@@ -1162,9 +1167,9 @@ uint32_t nr_dlsch_decoding_mthread(PHY_VARS_NR_UE *phy_vars_ue,
ret
=
1
+
dlsch
->
max_ldpc_iterations
;
ret
=
1
+
dlsch
->
max_ldpc_iterations
;
}
}
//
if (!nb_total_decod%10000){
if
(
!
nb_total_decod
%
10000
){
printf
(
"Error number of iteration LPDC %d %l
u/%lu
\n
"
,
no_iteration_ldpc
,
nb_error_decod
,
nb_total_decod
);
fflush
(
stdout
);
printf
(
"Error number of iteration LPDC %d %l
d/%ld
\n
"
,
no_iteration_ldpc
,
nb_error_decod
,
nb_total_decod
);
fflush
(
stdout
);
//
}
}
//else
//else
//printf("OK number of iteration LPDC %d\n", no_iteration_ldpc);
//printf("OK number of iteration LPDC %d\n", no_iteration_ldpc);
...
@@ -1269,21 +1274,13 @@ uint32_t nr_dlsch_decoding_mthread(PHY_VARS_NR_UE *phy_vars_ue,
...
@@ -1269,21 +1274,13 @@ uint32_t nr_dlsch_decoding_mthread(PHY_VARS_NR_UE *phy_vars_ue,
printf("F %d, Fbytes %d\n",harq_process->F,harq_process->F>>3);
printf("F %d, Fbytes %d\n",harq_process->F,harq_process->F>>3);
printf("C %d\n",harq_process->C);
printf("C %d\n",harq_process->C);
*/
*/
uint32_t
wait
=
0
;
//
uint32_t wait = 0;
/*if (harq_process->C==2){
while((proc->decoder_thread_available == 0) )
/*
while((proc->decoder_thread_available == 0) )
{
{
usleep(1);
usleep(1);
wait++;
}
}
}
else if ((harq_process->C==3) ){
proc->decoder_thread_available == 0;*/
while((proc->decoder_thread_available == 0) || (proc->decoder_thread_available1 == 0))
{
usleep(1);
wait++;
}
}*/
/*notifiedFIFO_elt_t *res1=tryPullTpool(&nf, Tpool);
/*notifiedFIFO_elt_t *res1=tryPullTpool(&nf, Tpool);
if (!res1) {
if (!res1) {
...
@@ -1291,6 +1288,8 @@ uint32_t nr_dlsch_decoding_mthread(PHY_VARS_NR_UE *phy_vars_ue,
...
@@ -1291,6 +1288,8 @@ uint32_t nr_dlsch_decoding_mthread(PHY_VARS_NR_UE *phy_vars_ue,
usleep(1);
usleep(1);
wait++;
wait++;
}*/
}*/
//usleep(50);
proc
->
decoder_main_available
=
0
;
proc
->
decoder_main_available
=
0
;
Kr
=
harq_process
->
K
;
//to check if same K in all segments
Kr
=
harq_process
->
K
;
//to check if same K in all segments
...
@@ -1313,6 +1312,8 @@ uint32_t nr_dlsch_decoding_mthread(PHY_VARS_NR_UE *phy_vars_ue,
...
@@ -1313,6 +1312,8 @@ uint32_t nr_dlsch_decoding_mthread(PHY_VARS_NR_UE *phy_vars_ue,
harq_process
->
c
[
r
]);
harq_process
->
c
[
r
]);
#endif
#endif
}
}
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_DLSCH_SEGMENTATION
,
VCD_FUNCTION_OUT
);
dlsch
->
last_iteration_cnt
=
ret
;
dlsch
->
last_iteration_cnt
=
ret
;
//proc->decoder_thread_available = 0;
//proc->decoder_thread_available = 0;
...
@@ -1323,7 +1324,7 @@ uint32_t nr_dlsch_decoding_mthread(PHY_VARS_NR_UE *phy_vars_ue,
...
@@ -1323,7 +1324,7 @@ uint32_t nr_dlsch_decoding_mthread(PHY_VARS_NR_UE *phy_vars_ue,
#endif
#endif
#ifdef UE_DLSCH_PARALLELISATION
#ifdef UE_DLSCH_PARALLELISATION
void
*
nr_dlsch_decoding_process
(
void
*
arg
)
void
nr_dlsch_decoding_process
(
void
*
arg
)
{
{
nr_rxtx_thread_data_t
*
rxtxD
=
(
nr_rxtx_thread_data_t
*
)
arg
;
nr_rxtx_thread_data_t
*
rxtxD
=
(
nr_rxtx_thread_data_t
*
)
arg
;
UE_nr_rxtx_proc_t
*
proc
=
&
rxtxD
->
proc
;
UE_nr_rxtx_proc_t
*
proc
=
&
rxtxD
->
proc
;
...
@@ -1340,8 +1341,8 @@ void *nr_dlsch_decoding_process(void *arg)
...
@@ -1340,8 +1341,8 @@ void *nr_dlsch_decoding_process(void *arg)
int16_t
z
[
68
*
384
];
int16_t
z
[
68
*
384
];
int8_t
l
[
68
*
384
];
int8_t
l
[
68
*
384
];
//__m128i l;
//__m128i l;
int16_t
inv_d
[
68
*
384
];
//
int16_t inv_d [68*384];
int16_t
*
p_invd
=&
inv_d
;
//
int16_t *p_invd =&inv_d;
uint8_t
kb
,
kc
;
uint8_t
kb
,
kc
;
uint8_t
Ilbrm
=
1
;
uint8_t
Ilbrm
=
1
;
uint32_t
Tbslbrm
=
950984
;
uint32_t
Tbslbrm
=
950984
;
...
@@ -1463,6 +1464,7 @@ void *nr_dlsch_decoding_process(void *arg)
...
@@ -1463,6 +1464,7 @@ void *nr_dlsch_decoding_process(void *arg)
}
}
}
}
harq_process
->
round
=
0
;
if
(
harq_process
->
round
==
0
)
{
if
(
harq_process
->
round
==
0
)
{
// This is a new packet, so compute quantities regarding segmentation
// This is a new packet, so compute quantities regarding segmentation
if
(
A
>
3824
)
if
(
A
>
3824
)
...
@@ -1482,8 +1484,9 @@ void *nr_dlsch_decoding_process(void *arg)
...
@@ -1482,8 +1484,9 @@ void *nr_dlsch_decoding_process(void *arg)
p_decParams
->
Z
=
harq_process
->
Z
;
p_decParams
->
Z
=
harq_process
->
Z
;
}
}
//printf("round %d Z %d K %d BG %d\n", harq_process->round, p_decParams->Z, harq_process->K, p_decParams->BG);
p_decParams
->
numMaxIter
=
dlsch
->
max_ldpc_iterations
;
p_decParams
->
numMaxIter
=
dlsch
->
max_ldpc_iterations
;
p_decParams
->
outMode
=
0
;
p_decParams
->
outMode
=
0
;
...
@@ -1654,9 +1657,9 @@ void *nr_dlsch_decoding_process(void *arg)
...
@@ -1654,9 +1657,9 @@ void *nr_dlsch_decoding_process(void *arg)
#endif
#endif
// LOG_D(PHY,"AbsSubframe %d.%d Start turbo segment %d/%d \n",frame%1024,subframe,r,harq_process->C-1);
// LOG_D(PHY,"AbsSubframe %d.%d Start turbo segment %d/%d \n",frame%1024,subframe,r,harq_process->C-1);
for
(
int
cnt
=
0
;
cnt
<
(
kc
-
2
)
*
p_decParams
->
Z
;
cnt
++
){
/*
for (int cnt =0; cnt < (kc-2)*p_decParams->Z; cnt++){
inv_d[cnt] = (1)*harq_process->d[r][cnt];
inv_d[cnt] = (1)*harq_process->d[r][cnt];
}
}
*/
memset
(
pv
,
0
,
2
*
p_decParams
->
Z
*
sizeof
(
int16_t
));
memset
(
pv
,
0
,
2
*
p_decParams
->
Z
*
sizeof
(
int16_t
));
//memset(pl,0,2*p_decParams->Z*sizeof(int8_t));
//memset(pl,0,2*p_decParams->Z*sizeof(int8_t));
...
@@ -1689,7 +1692,7 @@ void *nr_dlsch_decoding_process(void *arg)
...
@@ -1689,7 +1692,7 @@ void *nr_dlsch_decoding_process(void *arg)
ret
=
2
;
ret
=
2
;
}
}
else
{
else
{
printf
(
"
CRC NOK
\n
"
);
printf
(
"
Segment %d CRC NOK
\n
"
,
r
);
ret
=
1
+
dlsch
->
max_ldpc_iterations
;
ret
=
1
+
dlsch
->
max_ldpc_iterations
;
}
}
...
@@ -1743,35 +1746,38 @@ void *dlsch_thread(void *arg) {
...
@@ -1743,35 +1746,38 @@ void *dlsch_thread(void *arg) {
PHY_VARS_NR_UE
*
UE
=
(
PHY_VARS_NR_UE
*
)
arg
;
PHY_VARS_NR_UE
*
UE
=
(
PHY_VARS_NR_UE
*
)
arg
;
notifiedFIFO_t
nf
;
notifiedFIFO_t
nf
;
initNotifiedFIFO
(
&
nf
);
initNotifiedFIFO
(
&
nf
);
int
nbDlProcessing
=
0
;
notifiedFIFO_elt_t
*
res_dl
;
initNotifiedFIFO_nothreadSafe
(
&
freeBlocks
);
initNotifiedFIFO_nothreadSafe
(
&
freeBlocks
_dl
);
for
(
int
i
=
0
;
i
<
RX_NB_TH_DL
+
1
;
i
++
)
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
));
newNotifiedFIFO_elt
(
sizeof
(
nr_rxtx_thread_data_t
),
0
,
&
nf
,
nr_dlsch_decoding_process
));}
printf
(
"dlsch_thread
\n
"
);
displayList
(
&
freeBlocks
);
while
(
!
oai_exit
)
{
while
(
!
oai_exit
)
{
notifiedFIFO_elt_t
*
res
;
notifiedFIFO_elt_t
*
res
;
while
(
nbDlProcessing
>=
RX_NB_TH_DL
)
{
while
(
nbDlProcessing
>=
RX_NB_TH_DL
)
{
if
(
(
res
=
tryPullTpool
(
&
nf
,
Tpool
))
!=
NULL
)
{
if
(
(
res
=
tryPullTpool
(
&
nf
,
Tpool
_dl
))
!=
NULL
)
{
nr_rxtx_thread_data_t
*
tmp
=
(
nr_rxtx_thread_data_t
*
)
res
->
msgData
;
nr_rxtx_thread_data_t
*
tmp
=
(
nr_rxtx_thread_data_t
*
)
res
->
msgData
;
nbDlProcessing
--
;
//
nbDlProcessing--;
pushNotifiedFIFO_nothreadSafe
(
&
freeBlocks
,
res
);
pushNotifiedFIFO_nothreadSafe
(
&
freeBlocks
_dl
,
res
);
}
}
usleep
(
200
);
usleep
(
200
);
}
}
res_dl
=
pullTpool
(
&
nf
,
Tpool_dl
);
nbDlProcessing
--
;
pushNotifiedFIFO_nothreadSafe
(
&
freeBlocks_dl
,
res_dl
);
nbDlProcessing
++
;
//msgToPush->key=0;
//msgToPush->key=0;
//pushTpool(Tpool, msgToPush);
//pushTpool(Tpool, msgToPush);
}
// while !oai_exit
}
// while !oai_exit
return
NULL
;
}
}
#endif
#endif
openair1/PHY/defs_common.h
View file @
c4a05d7e
...
@@ -75,7 +75,7 @@
...
@@ -75,7 +75,7 @@
#define RX_NB_TH_MAX 2
#define RX_NB_TH_MAX 2
#define RX_NB_TH 2
#define RX_NB_TH 2
#define RX_NB_TH_DL
2
#define RX_NB_TH_DL
14
#define LTE_SLOTS_PER_SUBFRAME 2
#define LTE_SLOTS_PER_SUBFRAME 2
...
...
openair1/SCHED_NR_UE/phy_procedures_nr_ue.c
View file @
c4a05d7e
...
@@ -2626,6 +2626,8 @@ void nr_ue_measurement_procedures(uint16_t l, // symbol index of each slot [0
...
@@ -2626,6 +2626,8 @@ void nr_ue_measurement_procedures(uint16_t l, // symbol index of each slot [0
//printf("start adjust gain power avg db %d\n", ue->measurements.rx_power_avg_dB[eNB_id]);
//printf("start adjust gain power avg db %d\n", ue->measurements.rx_power_avg_dB[eNB_id]);
phy_adjust_gain_nr
(
ue
,
ue
->
measurements
.
rx_power_avg_dB
[
eNB_id
],
eNB_id
);
phy_adjust_gain_nr
(
ue
,
ue
->
measurements
.
rx_power_avg_dB
[
eNB_id
],
eNB_id
);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_UE_GAIN_CONTROL
,
VCD_FUNCTION_OUT
);
}
}
...
@@ -4152,6 +4154,8 @@ int phy_procedures_nrUE_RX(PHY_VARS_NR_UE *ue,
...
@@ -4152,6 +4154,8 @@ int phy_procedures_nrUE_RX(PHY_VARS_NR_UE *ue,
uint8_t
dci_cnt
=
0
;
uint8_t
dci_cnt
=
0
;
fapi_nr_pbch_config_t
*
pbch_config
=
&
ue
->
nrUE_config
.
pbch_config
;
fapi_nr_pbch_config_t
*
pbch_config
=
&
ue
->
nrUE_config
.
pbch_config
;
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_UE_RX
,
VCD_FUNCTION_IN
);
LOG_D
(
PHY
,
" ****** start RX-Chain for Frame.Slot %d.%d ******
\n
"
,
frame_rx
%
1024
,
nr_tti_rx
);
LOG_D
(
PHY
,
" ****** start RX-Chain for Frame.Slot %d.%d ******
\n
"
,
frame_rx
%
1024
,
nr_tti_rx
);
/*
/*
...
@@ -4284,7 +4288,7 @@ int phy_procedures_nrUE_RX(PHY_VARS_NR_UE *ue,
...
@@ -4284,7 +4288,7 @@ int phy_procedures_nrUE_RX(PHY_VARS_NR_UE *ue,
#endif
#endif
// do procedures for C-RNTI
// do procedures for C-RNTI
if
(
ue
->
dlsch
[
ue
->
current_thread_id
[
nr_tti_rx
]][
eNB_id
][
0
]
->
active
==
1
)
{
if
(
ue
->
dlsch
[
ue
->
current_thread_id
[
nr_tti_rx
]][
eNB_id
][
0
]
->
active
==
1
)
{
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_PROC
,
VCD_FUNCTION_IN
);
//
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_PROC, VCD_FUNCTION_IN);
nr_ue_pdsch_procedures
(
ue
,
nr_ue_pdsch_procedures
(
ue
,
proc
,
proc
,
eNB_id
,
eNB_id
,
...
@@ -4304,7 +4308,7 @@ int phy_procedures_nrUE_RX(PHY_VARS_NR_UE *ue,
...
@@ -4304,7 +4308,7 @@ int phy_procedures_nrUE_RX(PHY_VARS_NR_UE *ue,
write_output("rxF_llr.m","rxFllr",ue->pdsch_vars[ue->current_thread_id[nr_tti_rx]][eNB_id]->llr[0],(nb_symb_sch-1)*50*12+50*6,1,0);
write_output("rxF_llr.m","rxFllr",ue->pdsch_vars[ue->current_thread_id[nr_tti_rx]][eNB_id]->llr[0],(nb_symb_sch-1)*50*12+50*6,1,0);
*/
*/
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_PROC
,
VCD_FUNCTION_OUT
);
//
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_PROC, VCD_FUNCTION_OUT);
}
}
// do procedures for SI-RNTI
// do procedures for SI-RNTI
...
...
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