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
littleBu
OpenXG-RAN
Commits
f9c7057e
Commit
f9c7057e
authored
Jan 09, 2025
by
Romain Beurdouche
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(nrLDPC_coding): Apply clang-format to segment coding code
parent
c54e7a70
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
57 additions
and
84 deletions
+57
-84
openair1/PHY/CODING/nrLDPC_coding/nrLDPC_coding_segment/nrLDPC_coding_segment_decoder.c
...ing/nrLDPC_coding_segment/nrLDPC_coding_segment_decoder.c
+18
-27
openair1/PHY/CODING/nrLDPC_coding/nrLDPC_coding_segment/nrLDPC_coding_segment_encoder.c
...ing/nrLDPC_coding_segment/nrLDPC_coding_segment_encoder.c
+28
-38
openair1/PHY/CODING/nrLDPC_coding/nrLDPC_coding_xdma/nrLDPC_coding_xdma.c
...ING/nrLDPC_coding/nrLDPC_coding_xdma/nrLDPC_coding_xdma.c
+11
-19
No files found.
openair1/PHY/CODING/nrLDPC_coding/nrLDPC_coding_segment/nrLDPC_coding_segment_decoder.c
View file @
f9c7057e
...
...
@@ -20,9 +20,8 @@
*/
/*! \file PHY/CODING/nrLDPC_coding/nrLDPC_coding_segment/nrLDPC_coding_segment_decoder.c
* \brief Top-level routines for decoding LDPC transport channels
*/
* \brief Top-level routines for decoding LDPC transport channels
*/
// [from gNB coding]
#include "PHY/defs_gNB.h"
...
...
@@ -45,10 +44,10 @@
#include <stdint.h>
#include <syscall.h>
#include <time.h>
//#define gNB_DEBUG_TRACE
//
#define gNB_DEBUG_TRACE
#define OAI_LDPC_DECODER_MAX_NUM_LLR 27000 //26112 // NR_LDPC_NCOL_BG1*NR_LDPC_ZMAX = 68*384
//#define DEBUG_CRC
#define OAI_LDPC_DECODER_MAX_NUM_LLR 27000 //
26112 // NR_LDPC_NCOL_BG1*NR_LDPC_ZMAX = 68*384
//
#define DEBUG_CRC
#ifdef DEBUG_CRC
#define PRINT_CRC_CHECK(a) a
#else
...
...
@@ -76,7 +75,7 @@
* \var F filler bits size
* \var r segment index in TB
* \var E input llr segment size
* \var C number of segments
* \var C number of segments
* \var llr input llr segment array
* \var d Pointers to code blocks before LDPC decoding (38.212 V15.4.0 section 5.3.2)
* \var d_to_be_cleared
...
...
@@ -89,8 +88,7 @@
* \var p_ts_rate_unmatch pointer to rate unmatching time stats
* \var p_ts_ldpc_decode pointer to decoding time stats
*/
typedef
struct
nrLDPC_decoding_parameters_s
{
typedef
struct
nrLDPC_decoding_parameters_s
{
t_nrLDPC_dec_params
decoderParms
;
uint8_t
Qm
;
...
...
@@ -166,7 +164,6 @@ static void nr_process_decode_segment(void *arg)
///////////////////////// ulsch_harq->e =====> ulsch_harq->d /////////////////////////
if
(
nr_rate_matching_ldpc_rx
(
rdata
->
tbslbrm
,
p_decoderParms
->
BG
,
p_decoderParms
->
Z
,
...
...
@@ -179,7 +176,6 @@ static void nr_process_decode_segment(void *arg)
rdata
->
F
,
K
-
rdata
->
F
-
2
*
(
p_decoderParms
->
Z
))
==
-
1
)
{
stop_meas
(
rdata
->
p_ts_rate_unmatch
);
LOG_E
(
PHY
,
"nrLDPC_coding_segment_decoder.c: Problem in rate_matching
\n
"
);
...
...
@@ -225,7 +221,7 @@ static void nr_process_decode_segment(void *arg)
ldpc_interface_segment
.
LDPCdecoder
(
p_decoderParms
,
0
,
0
,
0
,
l
,
llrProcBuf
,
p_procTime
,
rdata
->
abort_decode
);
if
(
decodeIterations
<=
p_decoderParms
->
numMaxIter
)
{
memcpy
(
rdata
->
c
,
llrProcBuf
,
K
>>
3
);
memcpy
(
rdata
->
c
,
llrProcBuf
,
K
>>
3
);
*
rdata
->
decodeSuccess
=
true
;
}
else
{
memset
(
rdata
->
c
,
0
,
K
>>
3
);
...
...
@@ -237,9 +233,10 @@ static void nr_process_decode_segment(void *arg)
completed_task_ans
(
rdata
->
ans
);
}
int
nrLDPC_prepare_TB_decoding
(
nrLDPC_slot_decoding_parameters_t
*
nrLDPC_slot_decoding_parameters
,
int
pusch_id
,
thread_info_tm_t
*
t_info
)
int
nrLDPC_prepare_TB_decoding
(
nrLDPC_slot_decoding_parameters_t
*
nrLDPC_slot_decoding_parameters
,
int
pusch_id
,
thread_info_tm_t
*
t_info
)
{
nrLDPC_TB_decoding_parameters_t
*
nrLDPC_TB_decoding_parameters
=
&
nrLDPC_slot_decoding_parameters
->
TBs
[
pusch_id
];
*
nrLDPC_TB_decoding_parameters
->
processedSegments
=
0
;
...
...
@@ -250,7 +247,6 @@ int nrLDPC_prepare_TB_decoding(nrLDPC_slot_decoding_parameters_t *nrLDPC_slot_de
decParams
.
outMode
=
0
;
for
(
int
r
=
0
;
r
<
nrLDPC_TB_decoding_parameters
->
C
;
r
++
)
{
nrLDPC_decoding_parameters_t
*
rdata
=
&
((
nrLDPC_decoding_parameters_t
*
)
t_info
->
buf
)[
t_info
->
len
];
DevAssert
(
t_info
->
len
<
t_info
->
cap
);
rdata
->
ans
=
&
t_info
->
ans
[
t_info
->
len
];
...
...
@@ -286,29 +282,26 @@ int nrLDPC_prepare_TB_decoding(nrLDPC_slot_decoding_parameters_t *nrLDPC_slot_de
return
nrLDPC_TB_decoding_parameters
->
C
;
}
int32_t
nrLDPC_coding_init
(
void
)
{
int32_t
nrLDPC_coding_init
(
void
)
{
char
*
segment_shlibversion
=
NULL
;
paramdef_t
LoaderParams
[]
=
{
{
"segment_shlibversion"
,
NULL
,
0
,
.
strptr
=
&
segment_shlibversion
,
.
defstrval
=
"_optim8segmulti"
,
TYPE_STRING
,
0
,
NULL
}
};
{
"segment_shlibversion"
,
NULL
,
0
,
.
strptr
=
&
segment_shlibversion
,
.
defstrval
=
"_optim8segmulti"
,
TYPE_STRING
,
0
,
NULL
}};
config_get
(
config_get_if
(),
LoaderParams
,
sizeofArray
(
LoaderParams
),
"nrLDPC_coding_segment"
);
load_LDPClib
(
segment_shlibversion
,
&
ldpc_interface_segment
);
return
0
;
}
int32_t
nrLDPC_coding_shutdown
(
void
)
{
int32_t
nrLDPC_coding_shutdown
(
void
)
{
free_LDPClib
(
&
ldpc_interface_segment
);
return
0
;
}
int32_t
nrLDPC_coding_decoder
(
nrLDPC_slot_decoding_parameters_t
*
nrLDPC_slot_decoding_parameters
)
{
int32_t
nrLDPC_coding_decoder
(
nrLDPC_slot_decoding_parameters_t
*
nrLDPC_slot_decoding_parameters
)
{
int
nbSegments
=
0
;
for
(
int
pusch_id
=
0
;
pusch_id
<
nrLDPC_slot_decoding_parameters
->
nb_TBs
;
pusch_id
++
)
{
nrLDPC_TB_decoding_parameters_t
*
nrLDPC_TB_decoding_parameters
=
&
nrLDPC_slot_decoding_parameters
->
TBs
[
pusch_id
];
...
...
@@ -338,6 +331,4 @@ int32_t nrLDPC_coding_decoder(nrLDPC_slot_decoding_parameters_t *nrLDPC_slot_dec
}
}
return
0
;
}
openair1/PHY/CODING/nrLDPC_coding/nrLDPC_coding_segment/nrLDPC_coding_segment_encoder.c
View file @
f9c7057e
...
...
@@ -20,8 +20,8 @@
*/
/*! \file PHY/CODING/nrLDPC_coding/nrLDPC_coding_segment/nrLDPC_coding_segment_encoder.c
* \brief Top-level routines for implementing LDPC encoding of transport channels
*/
* \brief Top-level routines for implementing LDPC encoding of transport channels
*/
#include "PHY/defs_gNB.h"
#include "PHY/CODING/coding_extern.h"
...
...
@@ -40,8 +40,8 @@
#include <syscall.h>
//#define DEBUG_LDPC_ENCODING
//#define DEBUG_LDPC_ENCODING_FREE 1
//
#define DEBUG_LDPC_ENCODING
//
#define DEBUG_LDPC_ENCODING_FREE 1
extern
ldpc_interface_t
ldpc_interface_segment
;
...
...
@@ -61,35 +61,34 @@ static void ldpc8blocks_coding_segment(void *p)
uint32_t
A
=
nrLDPC_TB_encoding_parameters
->
A
;
unsigned
int
G
=
nrLDPC_TB_encoding_parameters
->
G
;
LOG_D
(
PHY
,
"dlsch coding A %d K %d G %d (nb_rb %d, mod_order %d)
\n
"
,
A
,
impp
->
K
,
G
,
nb_rb
,(
int
)
mod_order
);
LOG_D
(
PHY
,
"dlsch coding A %d K %d G %d (nb_rb %d, mod_order %d)
\n
"
,
A
,
impp
->
K
,
G
,
nb_rb
,
(
int
)
mod_order
);
// nrLDPC_encoder output is in "d"
// let's make this interface happy!
uint8_t
tmp
[
8
][
68
*
384
]
__attribute__
((
aligned
(
32
)));
uint8_t
tmp
[
8
][
68
*
384
]
__attribute__
((
aligned
(
32
)));
uint8_t
*
d
[
impp
->
n_segments
];
for
(
int
rr
=
impp
->
macro_num
*
8
,
i
=
0
;
rr
<
impp
->
n_segments
&&
rr
<
(
impp
->
macro_num
+
1
)
*
8
;
rr
++
,
i
++
)
for
(
int
rr
=
impp
->
macro_num
*
8
,
i
=
0
;
rr
<
impp
->
n_segments
&&
rr
<
(
impp
->
macro_num
+
1
)
*
8
;
rr
++
,
i
++
)
d
[
rr
]
=
tmp
[
i
];
uint8_t
*
c
[
nrLDPC_TB_encoding_parameters
->
C
];
for
(
int
r
=
0
;
r
<
nrLDPC_TB_encoding_parameters
->
C
;
r
++
)
c
[
r
]
=
nrLDPC_TB_encoding_parameters
->
segments
[
r
].
c
;
start_meas
(
&
nrLDPC_TB_encoding_parameters
->
segments
[
impp
->
macro_num
*
8
].
ts_ldpc_encode
);
c
[
r
]
=
nrLDPC_TB_encoding_parameters
->
segments
[
r
].
c
;
start_meas
(
&
nrLDPC_TB_encoding_parameters
->
segments
[
impp
->
macro_num
*
8
].
ts_ldpc_encode
);
ldpc_interface_segment
.
LDPCencoder
(
c
,
d
,
impp
);
stop_meas
(
&
nrLDPC_TB_encoding_parameters
->
segments
[
impp
->
macro_num
*
8
].
ts_ldpc_encode
);
stop_meas
(
&
nrLDPC_TB_encoding_parameters
->
segments
[
impp
->
macro_num
*
8
].
ts_ldpc_encode
);
// Compute where to place in output buffer that is concatenation of all segments
uint32_t
r_offset
=
0
;
for
(
int
i
=
0
;
i
<
impp
->
macro_num
*
8
;
i
++
)
r_offset
+=
nrLDPC_TB_encoding_parameters
->
segments
[
i
].
E
;
for
(
int
rr
=
impp
->
macro_num
*
8
;
rr
<
impp
->
n_segments
&&
rr
<
(
impp
->
macro_num
+
1
)
*
8
;
rr
++
)
{
if
(
impp
->
F
>
0
)
{
uint32_t
r_offset
=
0
;
for
(
int
i
=
0
;
i
<
impp
->
macro_num
*
8
;
i
++
)
r_offset
+=
nrLDPC_TB_encoding_parameters
->
segments
[
i
].
E
;
for
(
int
rr
=
impp
->
macro_num
*
8
;
rr
<
impp
->
n_segments
&&
rr
<
(
impp
->
macro_num
+
1
)
*
8
;
rr
++
)
{
if
(
impp
->
F
>
0
)
{
// writing into positions d[r][k-2Zc] as in clause 5.3.2 step 2) in 38.212
memset
(
&
d
[
rr
][
impp
->
K
-
impp
->
F
-
2
*
impp
->
Zc
],
NR_NULL
,
impp
->
F
);
}
#ifdef DEBUG_LDPC_ENCODING
LOG_D
(
PHY
,
"rvidx in encoding = %d
\n
"
,
rel15
->
rvIndex
[
0
]);
LOG_D
(
PHY
,
"rvidx in encoding = %d
\n
"
,
rel15
->
rvIndex
[
0
]);
#endif
uint32_t
E
=
nrLDPC_TB_encoding_parameters
->
segments
[
rr
].
E
;
LOG_D
(
NR_PHY
,
...
...
@@ -108,7 +107,7 @@ static void ldpc8blocks_coding_segment(void *p)
uint32_t
Tbslbrm
=
nrLDPC_TB_encoding_parameters
->
tbslbrm
;
uint8_t
e
[
E
];
bzero
(
e
,
E
);
bzero
(
e
,
E
);
start_meas
(
&
nrLDPC_TB_encoding_parameters
->
segments
[
rr
].
ts_rate_match
);
nr_rate_matching_ldpc
(
Tbslbrm
,
impp
->
BG
,
...
...
@@ -122,13 +121,7 @@ static void ldpc8blocks_coding_segment(void *p)
E
);
stop_meas
(
&
nrLDPC_TB_encoding_parameters
->
segments
[
rr
].
ts_rate_match
);
if
(
impp
->
K
-
impp
->
F
-
2
*
impp
->
Zc
>
E
)
{
LOG_E
(
PHY
,
"dlsch coding A %d K %d G %d (nb_rb %d, mod_order %d)
\n
"
,
A
,
impp
->
K
,
G
,
nb_rb
,
(
int
)
mod_order
);
LOG_E
(
PHY
,
"dlsch coding A %d K %d G %d (nb_rb %d, mod_order %d)
\n
"
,
A
,
impp
->
K
,
G
,
nb_rb
,
(
int
)
mod_order
);
LOG_E
(
NR_PHY
,
"Rate Matching, Code segment %d/%d (coded bits (G) %u, E %d, K %d, Filler bits %d, Filler offset %d mod_order %d, "
...
...
@@ -145,23 +138,20 @@ static void ldpc8blocks_coding_segment(void *p)
}
#ifdef DEBUG_LDPC_ENCODING
for
(
int
i
=
0
;
i
<
16
;
i
++
)
printf
(
"output ratematching e[%d]= %d r_offset %u
\n
"
,
i
,
e
[
i
],
r_offset
);
for
(
int
i
=
0
;
i
<
16
;
i
++
)
printf
(
"output ratematching e[%d]= %d r_offset %u
\n
"
,
i
,
e
[
i
],
r_offset
);
#endif
start_meas
(
&
nrLDPC_TB_encoding_parameters
->
segments
[
rr
].
ts_interleave
);
nr_interleaving_ldpc
(
E
,
mod_order
,
e
,
impp
->
output
+
r_offset
);
nr_interleaving_ldpc
(
E
,
mod_order
,
e
,
impp
->
output
+
r_offset
);
stop_meas
(
&
nrLDPC_TB_encoding_parameters
->
segments
[
rr
].
ts_interleave
);
#ifdef DEBUG_LDPC_ENCODING
for
(
int
i
=
0
;
i
<
16
;
i
++
)
printf
(
"output interleaving f[%d]= %d r_offset %u
\n
"
,
i
,
impp
->
output
[
i
+
r_offset
],
r_offset
);
for
(
int
i
=
0
;
i
<
16
;
i
++
)
printf
(
"output interleaving f[%d]= %d r_offset %u
\n
"
,
i
,
impp
->
output
[
i
+
r_offset
],
r_offset
);
if
(
r
==
impp
->
n_segments
-
1
)
write_output
(
"enc_output.m"
,
"enc"
,
impp
->
output
,
G
,
1
,
4
);
if
(
r
==
impp
->
n_segments
-
1
)
write_output
(
"enc_output.m"
,
"enc"
,
impp
->
output
,
G
,
1
,
4
);
#endif
r_offset
+=
E
;
...
...
@@ -171,7 +161,9 @@ static void ldpc8blocks_coding_segment(void *p)
completed_task_ans
(
impp
->
ans
);
}
static
int
nrLDPC_prepare_TB_encoding
(
nrLDPC_slot_encoding_parameters_t
*
nrLDPC_slot_encoding_parameters
,
int
dlsch_id
,
thread_info_tm_t
*
t_info
)
static
int
nrLDPC_prepare_TB_encoding
(
nrLDPC_slot_encoding_parameters_t
*
nrLDPC_slot_encoding_parameters
,
int
dlsch_id
,
thread_info_tm_t
*
t_info
)
{
nrLDPC_TB_encoding_parameters_t
*
nrLDPC_TB_encoding_parameters
=
&
nrLDPC_slot_encoding_parameters
->
TBs
[
dlsch_id
];
...
...
@@ -211,7 +203,6 @@ static int nrLDPC_prepare_TB_encoding(nrLDPC_slot_encoding_parameters_t *nrLDPC_
int
nrLDPC_coding_encoder
(
nrLDPC_slot_encoding_parameters_t
*
nrLDPC_slot_encoding_parameters
)
{
int
nbTasks
=
0
;
for
(
int
dlsch_id
=
0
;
dlsch_id
<
nrLDPC_slot_encoding_parameters
->
nb_TBs
;
dlsch_id
++
)
{
nrLDPC_TB_encoding_parameters_t
*
nrLDPC_TB_encoding_parameters
=
&
nrLDPC_slot_encoding_parameters
->
TBs
[
dlsch_id
];
...
...
@@ -234,5 +225,4 @@ int nrLDPC_coding_encoder(nrLDPC_slot_encoding_parameters_t *nrLDPC_slot_encodin
join_task_ans
(
ans
,
nbEncode
);
return
0
;
}
openair1/PHY/CODING/nrLDPC_coding/nrLDPC_coding_xdma/nrLDPC_coding_xdma.c
View file @
f9c7057e
...
...
@@ -92,24 +92,20 @@ int32_t nrLDPC_coding_init(void);
int32_t
nrLDPC_coding_shutdown
(
void
);
int32_t
nrLDPC_coding_decoder
(
nrLDPC_slot_decoding_parameters_t
*
slot_params
,
int
frame_rx
,
int
slot_rx
);
// int32_t nrLDPC_coding_encoder(void);
int
decoder_xdma
(
nrLDPC_TB_decoding_parameters_t
*
TB_params
,
int
frame_rx
,
int
slot_rx
,
tpool_t
*
ldpc_threadPool
);
int
decoder_xdma
(
nrLDPC_TB_decoding_parameters_t
*
TB_params
,
int
frame_rx
,
int
slot_rx
,
tpool_t
*
ldpc_threadPool
);
void
nr_ulsch_FPGA_decoding_prepare_blocks
(
void
*
args
);
int32_t
nrLDPC_coding_init
(
void
)
{
char
*
encoder_shlibversion
=
NULL
;
paramdef_t
LoaderParams
[]
=
{
{
"num_threads_prepare"
,
NULL
,
0
,
.
iptr
=
&
num_threads_prepare_max
,
.
defintval
=
0
,
TYPE_INT
,
0
,
NULL
},
{
"encoder_shlibversion"
,
NULL
,
0
,
.
strptr
=
&
encoder_shlibversion
,
.
defstrval
=
"_optim8segmulti"
,
TYPE_STRING
,
0
,
NULL
},
{
"user_device"
,
NULL
,
0
,
.
strptr
=
&
user_device
,
.
defstrval
=
DEVICE_NAME_DEFAULT_USER
,
TYPE_STRING
,
0
,
NULL
},
{
"enc_read_device"
,
NULL
,
0
,
.
strptr
=
&
enc_read_device
,
.
defstrval
=
DEVICE_NAME_DEFAULT_ENC_READ
,
TYPE_STRING
,
0
,
NULL
},
{
"enc_write_device"
,
NULL
,
0
,
.
strptr
=
&
enc_write_device
,
.
defstrval
=
DEVICE_NAME_DEFAULT_ENC_WRITE
,
TYPE_STRING
,
0
,
NULL
},
{
"dec_read_device"
,
NULL
,
0
,
.
strptr
=
&
dec_read_device
,
.
defstrval
=
DEVICE_NAME_DEFAULT_DEC_READ
,
TYPE_STRING
,
0
,
NULL
},
{
"dec_write_device"
,
NULL
,
0
,
.
strptr
=
&
dec_write_device
,
.
defstrval
=
DEVICE_NAME_DEFAULT_DEC_WRITE
,
TYPE_STRING
,
0
,
NULL
}
};
{
"num_threads_prepare"
,
NULL
,
0
,
.
iptr
=
&
num_threads_prepare_max
,
.
defintval
=
0
,
TYPE_INT
,
0
,
NULL
},
{
"encoder_shlibversion"
,
NULL
,
0
,
.
strptr
=
&
encoder_shlibversion
,
.
defstrval
=
"_optim8segmulti"
,
TYPE_STRING
,
0
,
NULL
},
{
"user_device"
,
NULL
,
0
,
.
strptr
=
&
user_device
,
.
defstrval
=
DEVICE_NAME_DEFAULT_USER
,
TYPE_STRING
,
0
,
NULL
},
{
"enc_read_device"
,
NULL
,
0
,
.
strptr
=
&
enc_read_device
,
.
defstrval
=
DEVICE_NAME_DEFAULT_ENC_READ
,
TYPE_STRING
,
0
,
NULL
},
{
"enc_write_device"
,
NULL
,
0
,
.
strptr
=
&
enc_write_device
,
.
defstrval
=
DEVICE_NAME_DEFAULT_ENC_WRITE
,
TYPE_STRING
,
0
,
NULL
},
{
"dec_read_device"
,
NULL
,
0
,
.
strptr
=
&
dec_read_device
,
.
defstrval
=
DEVICE_NAME_DEFAULT_DEC_READ
,
TYPE_STRING
,
0
,
NULL
},
{
"dec_write_device"
,
NULL
,
0
,
.
strptr
=
&
dec_write_device
,
.
defstrval
=
DEVICE_NAME_DEFAULT_DEC_WRITE
,
TYPE_STRING
,
0
,
NULL
}};
config_get
(
config_get_if
(),
LoaderParams
,
sizeofArray
(
LoaderParams
),
"nrLDPC_coding_xdma"
);
AssertFatal
(
num_threads_prepare_max
!=
0
,
"nrLDPC_coding_xdma.num_threads_prepare was not provided"
);
...
...
@@ -138,10 +134,7 @@ int32_t nrLDPC_coding_encoder(void)
}
*/
int
decoder_xdma
(
nrLDPC_TB_decoding_parameters_t
*
TB_params
,
int
frame_rx
,
int
slot_rx
,
tpool_t
*
ldpc_threadPool
)
int
decoder_xdma
(
nrLDPC_TB_decoding_parameters_t
*
TB_params
,
int
frame_rx
,
int
slot_rx
,
tpool_t
*
ldpc_threadPool
)
{
const
uint32_t
K
=
TB_params
->
K
;
const
int
Kc
=
TB_params
->
BG
==
2
?
52
:
68
;
...
...
@@ -220,10 +213,9 @@ int decoder_xdma(nrLDPC_TB_decoding_parameters_t *TB_params,
// calculate required number of jobs
uint32_t
r_while
=
0
;
while
(
r_while
<
TB_params
->
C
)
{
// calculate number of segments processed in the new job
uint32_t
modulus
=
(
TB_params
->
C
-
r_while
)
%
(
num_threads_prepare_max
-
num_threads_prepare
);
uint32_t
quotient
=
(
TB_params
->
C
-
r_while
)
/
(
num_threads_prepare_max
-
num_threads_prepare
);
uint32_t
quotient
=
(
TB_params
->
C
-
r_while
)
/
(
num_threads_prepare_max
-
num_threads_prepare
);
uint32_t
r_span_max
=
modulus
==
0
?
quotient
:
quotient
+
1
;
// saturate to be sure to not go above C
...
...
@@ -257,7 +249,7 @@ int decoder_xdma(nrLDPC_TB_decoding_parameters_t *TB_params,
args
->
r_first
=
r
;
uint32_t
modulus
=
(
TB_params
->
C
-
r
)
%
(
num_threads_prepare_max
-
num_threads_prepare
);
uint32_t
quotient
=
(
TB_params
->
C
-
r
)
/
(
num_threads_prepare_max
-
num_threads_prepare
);
uint32_t
quotient
=
(
TB_params
->
C
-
r
)
/
(
num_threads_prepare_max
-
num_threads_prepare
);
uint32_t
r_span_max
=
modulus
==
0
?
quotient
:
quotient
+
1
;
uint32_t
r_span
=
TB_params
->
C
-
r
<
r_span_max
?
TB_params
->
C
-
r
:
r_span_max
;
...
...
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