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
Michael Black
OpenXG-RAN
Commits
262177f4
Commit
262177f4
authored
Sep 14, 2018
by
Florian Kaltenberger
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
patch 2 from Milan Zivkovic (Nokia Bell Labs)
parent
d6f3297f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
12 deletions
+20
-12
openair1/PHY/CODING/TESTBENCH/ldpctest.c
openair1/PHY/CODING/TESTBENCH/ldpctest.c
+15
-8
openair1/PHY/CODING/nrLDPC_encoder/defs.h
openair1/PHY/CODING/nrLDPC_encoder/defs.h
+1
-0
openair1/PHY/CODING/nrLDPC_encoder/ldpc_encoder2.c
openair1/PHY/CODING/nrLDPC_encoder/ldpc_encoder2.c
+4
-4
No files found.
openair1/PHY/CODING/TESTBENCH/ldpctest.c
View file @
262177f4
...
...
@@ -310,12 +310,18 @@ int test_ldpc(short No_iteration,
}
stop_meas
(
&
time
);
start_meas
(
time_optim
);
/*
start_meas(time_optim);
ldpc_encoder_optim_8seg(test_input,channel_input_optim,block_length,BG,n_segments,&tinput,&tprep,&tparity,&toutput);
/*
for(j=0;j<n_segments;j++) {
for(j=0;j<n_segments;j++) {
ldpc_encoder_optim(test_input[j],channel_input_optim[j],block_length,BG,&tinput,&tprep,&tparity,&toutput);
}*/
stop_meas
(
time_optim
);
}
stop_meas(time_optim);*/
for
(
j
=
0
;
j
<
(
n_segments
%
8
+
1
);
j
++
)
{
start_meas
(
time_optim
);
ldpc_encoder_optim_8seg_multi
(
test_input
,
channel_input_optim
,
block_length
,
BG
,
n_segments
,
j
,
&
tinput
,
&
tprep
,
&
tparity
,
&
toutput
);
stop_meas
(
time_optim
);
}
if
(
ntrials
==
1
)
for
(
j
=
0
;
j
<
n_segments
;
j
++
)
...
...
@@ -398,15 +404,18 @@ int test_ldpc(short No_iteration,
decParams
.
outMode
=
nrLDPC_outMode_BIT
;
//decParams.outMode =nrLDPC_outMode_LLRINT8;
start_meas
(
time_decoder
);
for
(
j
=
0
;
j
<
n_segments
;
j
++
)
{
start_meas
(
time_decoder
);
// decode the sequence
// decoder supports BG2, Z=128 & 256
//esimated_output=ldpc_decoder(channel_output_fixed, block_length, No_iteration, (double)((float)nom_rate/(float)denom_rate));
///nrLDPC_decoder(&decParams, channel_output_fixed, estimated_output, NULL);
n_iter
=
nrLDPC_decoder
(
&
decParams
,
(
int8_t
*
)
channel_output_fixed
[
j
],
(
int8_t
*
)
estimated_output
[
j
],
p_decoder_profiler
);
stop_meas
(
time_decoder
);
}
stop_meas
(
time_decoder
);
//for (i=(Kb+nrows) * Zc-5;i<(Kb+nrows) * Zc;i++)
// printf("esimated_output[%d]=%d\n",i,esimated_output[i]);
...
...
@@ -528,8 +537,6 @@ int main(int argc, char *argv[])
time_stats_t
time_optim
[
10
],
time_decoder
[
10
];
n_iter_stats_t
dec_iter
[
3
];
short
BG
,
Zc
,
Kb
;
while
((
c
=
getopt
(
argc
,
argv
,
"q:r:s:S:l:n:d:i:t:u:h"
))
!=
-
1
)
...
...
openair1/PHY/CODING/nrLDPC_encoder/defs.h
View file @
262177f4
...
...
@@ -38,6 +38,7 @@ int encode_parity_check_part_orig(unsigned char *c,unsigned char *d, short BG,sh
void
encode_parity_check_part_optim
(
uint8_t
*
c
,
uint8_t
*
d
,
short
BG
,
short
Zc
,
short
Kb
);
int
ldpc_encoder_optim
(
unsigned
char
*
test_input
,
unsigned
char
*
channel_input
,
short
block_length
,
short
BG
,
time_stats_t
*
tinput
,
time_stats_t
*
tprep
,
time_stats_t
*
tparity
,
time_stats_t
*
toutput
);
int
ldpc_encoder_optim_8seg
(
unsigned
char
**
test_input
,
unsigned
char
**
channel_input
,
short
block_length
,
short
BG
,
int
n_segments
,
time_stats_t
*
tinput
,
time_stats_t
*
tprep
,
time_stats_t
*
tparity
,
time_stats_t
*
toutput
);
int
ldpc_encoder_optim_8seg_multi
(
unsigned
char
**
test_input
,
unsigned
char
**
channel_input
,
short
block_length
,
short
BG
,
int
n_segments
,
unsigned
int
macro_num
,
time_stats_t
*
tinput
,
time_stats_t
*
tprep
,
time_stats_t
*
tparity
,
time_stats_t
*
toutput
);
/*ldpc_generate_coefficient.c*/
int
ldpc_encoder_orig
(
unsigned
char
*
test_input
,
unsigned
char
*
channel_input
,
short
block_length
,
short
BG
,
unsigned
char
gen_code
);
...
...
openair1/PHY/CODING/nrLDPC_encoder/ldpc_encoder2.c
View file @
262177f4
...
...
@@ -518,10 +518,10 @@ int ldpc_encoder_optim_8seg(unsigned char **test_input,unsigned char **channel_i
return
0
;
}
int
ldpc_encoder_optim_8seg_multi
(
unsigned
char
**
test_input
,
unsigned
char
**
channel_input
,
short
block_length
,
int
nom_rate
,
int
denom_rate
,
int
n_segments
,
unsigned
int
macro_num
,
time_stats_t
*
tinput
,
time_stats_t
*
tprep
,
time_stats_t
*
tparity
,
time_stats_t
*
toutput
)
int
ldpc_encoder_optim_8seg_multi
(
unsigned
char
**
test_input
,
unsigned
char
**
channel_input
,
short
block_length
,
short
BG
,
int
n_segments
,
unsigned
int
macro_num
,
time_stats_t
*
tinput
,
time_stats_t
*
tprep
,
time_stats_t
*
tparity
,
time_stats_t
*
toutput
)
{
short
BG
,
Zc
,
Kb
,
nrows
,
ncols
;
short
Zc
,
Kb
,
nrows
,
ncols
;
int
i
,
i1
,
j
;
int
no_punctured_columns
,
removed_bit
;
//Table of possible lifting sizes
...
...
@@ -555,14 +555,14 @@ int ldpc_encoder_optim_8seg_multi(unsigned char **test_input,unsigned char **cha
///AssertFatal(n_segments>0&&n_segments<=8,"0 < n_segments %d <= 8\n",n_segments);
//determine number of bits in codeword
if
(
block_length
>
3840
)
if
(
BG
==
1
)
{
BG
=
1
;
Kb
=
22
;
nrows
=
46
;
//parity check bits
ncols
=
22
;
//info bits
}
else
if
(
block_length
<=
3840
)
else
if
(
BG
==
2
)
{
BG
=
2
;
nrows
=
42
;
//parity check bits
...
...
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