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
a8841a53
Commit
a8841a53
authored
Nov 15, 2019
by
Florian Kaltenberger
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/ldpc_bg2_bug_fix' into integration-develop-nr-2019w46
parents
080acb63
daa6dd40
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
18 deletions
+27
-18
openair1/PHY/CODING/nrLDPC_encoder/ldpc_encoder.c
openair1/PHY/CODING/nrLDPC_encoder/ldpc_encoder.c
+4
-2
openair1/PHY/CODING/nrLDPC_encoder/ldpc_encoder2.c
openair1/PHY/CODING/nrLDPC_encoder/ldpc_encoder2.c
+18
-12
openair1/PHY/CODING/nrLDPC_encoder/ldpc_generate_coefficient.c
...ir1/PHY/CODING/nrLDPC_encoder/ldpc_generate_coefficient.c
+5
-4
No files found.
openair1/PHY/CODING/nrLDPC_encoder/ldpc_encoder.c
View file @
a8841a53
...
...
@@ -46,7 +46,7 @@ int encode_parity_check_part_orig(unsigned char *c,unsigned char *d, short BG,sh
short
*
Gen_shift_values
=
choose_generator_matrix
(
BG
,
Zc
);
short
*
no_shift_values
,
*
pointer_shift_values
;
int
no_punctured_columns
;
short
nrows
,
ncols
;
short
nrows
,
ncols
,
rate
=
3
;
int
i1
,
i2
,
i3
,
i4
,
i5
,
temp_prime
;
unsigned
char
channel_temp
,
temp
;
...
...
@@ -56,6 +56,7 @@ int encode_parity_check_part_orig(unsigned char *c,unsigned char *d, short BG,sh
pointer_shift_values
=
(
short
*
)
pointer_shift_values_BG1
;
nrows
=
46
;
//parity check bits
ncols
=
22
;
//info bits
rate
=
3
;
}
else
if
(
BG
==
2
)
{
...
...
@@ -63,6 +64,7 @@ int encode_parity_check_part_orig(unsigned char *c,unsigned char *d, short BG,sh
pointer_shift_values
=
(
short
*
)
pointer_shift_values_BG2
;
nrows
=
42
;
//parity check bits
ncols
=
10
;
//info bits
rate
=
5
;
}
else
{
printf
(
"problem with BG
\n
"
);
...
...
@@ -70,7 +72,7 @@ int encode_parity_check_part_orig(unsigned char *c,unsigned char *d, short BG,sh
}
no_punctured_columns
=
(
int
)((
nrows
-
2
)
*
Zc
+
block_length
-
block_length
*
3
)
/
Zc
;
no_punctured_columns
=
(
int
)((
nrows
-
2
)
*
Zc
+
block_length
-
block_length
*
rate
)
/
Zc
;
//printf("no_punctured_columns = %d\n",no_punctured_columns);
...
...
openair1/PHY/CODING/nrLDPC_encoder/ldpc_encoder2.c
View file @
a8841a53
...
...
@@ -202,7 +202,7 @@ int ldpc_encoder_optim(unsigned char *test_input,unsigned char *channel_input,in
{
short
nrows
=
0
,
ncols
=
0
;
int
i
,
i1
;
int
i
,
i1
,
rate
=
3
;
int
no_punctured_columns
,
removed_bit
;
int
simd_size
;
...
...
@@ -214,6 +214,7 @@ int ldpc_encoder_optim(unsigned char *test_input,unsigned char *channel_input,in
//BG=1;
nrows
=
46
;
//parity check bits
ncols
=
22
;
//info bits
rate
=
3
;
}
//else if (block_length<=3840)
else
if
(
BG
==
2
)
...
...
@@ -221,6 +222,7 @@ int ldpc_encoder_optim(unsigned char *test_input,unsigned char *channel_input,in
//BG=2;
nrows
=
42
;
//parity check bits
ncols
=
10
;
// info bits
rate
=
5
;
}
...
...
@@ -239,8 +241,8 @@ int ldpc_encoder_optim(unsigned char *test_input,unsigned char *channel_input,in
unsigned
char
c_extension
[
2
*
22
*
Zc
*
simd_size
]
__attribute__
((
aligned
(
32
)));
//double size matrix of c
// calculate number of punctured bits
no_punctured_columns
=
(
int
)((
nrows
-
2
)
*
Zc
+
block_length
-
block_length
*
3
)
/
Zc
;
removed_bit
=
(
nrows
-
no_punctured_columns
-
2
)
*
Zc
+
block_length
-
(
int
)(
block_length
*
3
);
no_punctured_columns
=
(
int
)((
nrows
-
2
)
*
Zc
+
block_length
-
block_length
*
rate
)
/
Zc
;
removed_bit
=
(
nrows
-
no_punctured_columns
-
2
)
*
Zc
+
block_length
-
(
int
)(
block_length
*
rate
);
// printf("%d\n",no_punctured_columns);
// printf("%d\n",removed_bit);
// unpack input
...
...
@@ -297,7 +299,7 @@ int ldpc_encoder_optim_8seg(unsigned char **test_input,unsigned char **channel_i
{
short
nrows
=
0
,
ncols
=
0
;
int
i
,
i1
,
j
;
int
i
,
i1
,
j
,
rate
=
3
;
int
no_punctured_columns
,
removed_bit
;
char
temp
;
int
simd_size
;
...
...
@@ -326,6 +328,7 @@ int ldpc_encoder_optim_8seg(unsigned char **test_input,unsigned char **channel_i
{
nrows
=
46
;
//parity check bits
ncols
=
22
;
//info bits
rate
=
3
;
}
//else if (block_length<=3840)
else
if
(
BG
==
2
)
...
...
@@ -333,6 +336,7 @@ int ldpc_encoder_optim_8seg(unsigned char **test_input,unsigned char **channel_i
//BG=2;
nrows
=
42
;
//parity check bits
ncols
=
10
;
// info bits
rate
=
5
;
}
...
...
@@ -352,8 +356,8 @@ int ldpc_encoder_optim_8seg(unsigned char **test_input,unsigned char **channel_i
unsigned
char
c_extension
[
2
*
22
*
Zc
*
simd_size
]
__attribute__
((
aligned
(
32
)));
//double size matrix of c
// calculate number of punctured bits
no_punctured_columns
=
(
int
)((
nrows
-
2
)
*
Zc
+
block_length
-
block_length
*
3
)
/
Zc
;
removed_bit
=
(
nrows
-
no_punctured_columns
-
2
)
*
Zc
+
block_length
-
(
int
)(
block_length
*
3
);
no_punctured_columns
=
(
int
)((
nrows
-
2
)
*
Zc
+
block_length
-
block_length
*
rate
)
/
Zc
;
removed_bit
=
(
nrows
-
no_punctured_columns
-
2
)
*
Zc
+
block_length
-
(
int
)(
block_length
*
rate
);
// printf("%d\n",no_punctured_columns);
// printf("%d\n",removed_bit);
// unpack input
...
...
@@ -473,7 +477,7 @@ int ldpc_encoder_optim_8seg_multi(unsigned char **test_input,unsigned char **cha
{
short
nrows
=
0
,
ncols
=
0
;
int
i
,
i1
,
j
;
int
i
,
i1
,
j
,
rate
=
3
;
int
no_punctured_columns
,
removed_bit
;
//Table of possible lifting sizes
char
temp
;
...
...
@@ -509,11 +513,13 @@ int ldpc_encoder_optim_8seg_multi(unsigned char **test_input,unsigned char **cha
{
nrows
=
46
;
//parity check bits
ncols
=
22
;
//info bits
rate
=
3
;
}
else
if
(
BG
==
2
)
{
nrows
=
42
;
//parity check bits
ncols
=
10
;
// info bits
rate
=
5
;
}
#ifdef DEBUG_LDPC
...
...
@@ -532,10 +538,10 @@ int ldpc_encoder_optim_8seg_multi(unsigned char **test_input,unsigned char **cha
unsigned
char
c_extension
[
2
*
22
*
Zc
*
simd_size
]
__attribute__
((
aligned
(
32
)));
//double size matrix of c
// calculate number of punctured bits
no_punctured_columns
=
(
int
)((
nrows
-
2
)
*
Zc
+
block_length
-
block_length
*
3
)
/
Zc
;
removed_bit
=
(
nrows
-
no_punctured_columns
-
2
)
*
Zc
+
block_length
-
(
int
)(
block_length
*
3
);
//
printf("%d\n",no_punctured_columns);
//
printf("%d\n",removed_bit);
no_punctured_columns
=
(
int
)((
nrows
-
2
)
*
Zc
+
block_length
-
block_length
*
rate
)
/
Zc
;
removed_bit
=
(
nrows
-
no_punctured_columns
-
2
)
*
Zc
+
block_length
-
(
int
)(
block_length
*
rate
);
//printf("%d\n",no_punctured_columns);
//printf("%d\n",removed_bit);
// unpack input
memset
(
c
,
0
,
sizeof
(
unsigned
char
)
*
ncols
*
Zc
);
memset
(
d
,
0
,
sizeof
(
unsigned
char
)
*
nrows
*
Zc
);
...
...
openair1/PHY/CODING/nrLDPC_encoder/ldpc_generate_coefficient.c
View file @
a8841a53
...
...
@@ -373,7 +373,7 @@ int ldpc_encoder_orig(unsigned char *test_input,unsigned char *channel_input,int
int
i
,
i1
,
i2
,
i3
,
i4
,
i5
,
temp_prime
,
var
;
int
no_punctured_columns
,
removed_bit
;
int
no_punctured_columns
,
removed_bit
,
rate
=
3
;
int
nind
=
0
;
int
indlist
[
1000
];
int
indlist2
[
1000
];
...
...
@@ -384,6 +384,7 @@ int ldpc_encoder_orig(unsigned char *test_input,unsigned char *channel_input,int
{
nrows
=
46
;
//parity check bits
ncols
=
22
;
//info bits
rate
=
3
;
}
//else if (block_length<=3840)
else
if
(
BG
==
2
)
...
...
@@ -391,7 +392,7 @@ int ldpc_encoder_orig(unsigned char *test_input,unsigned char *channel_input,int
//BG=2;
nrows
=
42
;
//parity check bits
ncols
=
10
;
// info bits
rate
=
5
;
}
Gen_shift_values
=
choose_generator_matrix
(
BG
,
Zc
);
...
...
@@ -417,8 +418,8 @@ int ldpc_encoder_orig(unsigned char *test_input,unsigned char *channel_input,int
AssertFatal
(
0
,
"BG %d is not supported yet
\n
"
,
BG
);
}
no_punctured_columns
=
(
int
)((
nrows
-
2
)
*
Zc
+
block_length
-
block_length
*
3
)
/
Zc
;
removed_bit
=
(
nrows
-
no_punctured_columns
-
2
)
*
Zc
+
block_length
-
(
block_length
*
3
);
no_punctured_columns
=
(
int
)((
nrows
-
2
)
*
Zc
+
block_length
-
block_length
*
rate
)
/
Zc
;
removed_bit
=
(
nrows
-
no_punctured_columns
-
2
)
*
Zc
+
block_length
-
(
block_length
*
rate
);
//printf("%d\n",no_punctured_columns);
//printf("%d\n",removed_bit);
// unpack input
...
...
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