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
promise
OpenXG-RAN
Commits
68c07e29
Commit
68c07e29
authored
Sep 10, 2018
by
Guy De Souza
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'nr_pdsch' of
https://gitlab.eurecom.fr/oai/openairinterface5g
into nr_pdsch
parents
3feb84ca
6e29ff08
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
749 additions
and
164 deletions
+749
-164
cmake_targets/build_oai
cmake_targets/build_oai
+1
-1
openair1/PHY/CODING/TESTBENCH/ldpctest.c
openair1/PHY/CODING/TESTBENCH/ldpctest.c
+466
-103
openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_decoder.c
openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_decoder.c
+3
-0
openair1/PHY/CODING/nrLDPC_encoder/ldpc_encoder.c
openair1/PHY/CODING/nrLDPC_encoder/ldpc_encoder.c
+1
-1
openair1/PHY/CODING/nrLDPC_encoder/ldpc_encoder2.c
openair1/PHY/CODING/nrLDPC_encoder/ldpc_encoder2.c
+251
-28
openair1/PHY/CODING/nrLDPC_encoder/ldpc_generate_coefficient.c
...ir1/PHY/CODING/nrLDPC_encoder/ldpc_generate_coefficient.c
+27
-31
No files found.
cmake_targets/build_oai
View file @
68c07e29
...
...
@@ -686,7 +686,7 @@ function main() {
echo_info
"Compiling unitary tests simulators"
# TODO: fix: dlsim_tm4 pucchsim prachsim pdcchsim pbchsim mbmssim
#simlist="dlsim_tm4 dlsim ulsim pucchsim prachsim pdcchsim pbchsim mbmssim"
simlist
=
"dlsim ulsim"
simlist
=
"dlsim ulsim
polartest ldpctest
"
for
f
in
$simlist
;
do
compilations
\
lte-simulators
$f
\
...
...
openair1/PHY/CODING/TESTBENCH/ldpctest.c
View file @
68c07e29
This diff is collapsed.
Click to expand it.
openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_decoder.c
View file @
68c07e29
...
...
@@ -38,6 +38,9 @@
#include "nrLDPC_cnProc.h"
#include "nrLDPC_bnProc.h"
#define NR_LDPC_ENABLE_PARITY_CHECK
#define NR_LDPC_PROFILER_DETAIL
#ifdef NR_LDPC_DEBUG_MODE
#include "nrLDPC_tools/nrLDPC_debug.h"
#endif
...
...
openair1/PHY/CODING/nrLDPC_encoder/ldpc_encoder.c
View file @
68c07e29
...
...
@@ -68,7 +68,7 @@ int encode_parity_check_part_orig(unsigned char *c,unsigned char *d, short BG,sh
printf
(
"problem with BG
\n
"
);
return
(
-
1
);
}
no_punctured_columns
=
(
int
)((
nrows
-
2
)
*
Zc
+
block_length
-
block_length
*
3
)
/
Zc
;
...
...
openair1/PHY/CODING/nrLDPC_encoder/ldpc_encoder2.c
View file @
68c07e29
This diff is collapsed.
Click to expand it.
openair1/PHY/CODING/nrLDPC_encoder/ldpc_generate_coefficient.c
View file @
68c07e29
...
...
@@ -361,7 +361,7 @@ short *choose_generator_matrix(short BG,short Zc)
return
Gen_shift_values
;
}
int
ldpc_encoder_orig
(
unsigned
char
*
test_input
,
unsigned
char
*
channel_input
,
short
block_length
,
short
BG
,
unsigned
char
gen_code
)
int
ldpc_encoder_orig
(
unsigned
char
*
test_input
,
unsigned
char
*
channel_input
,
short
block_length
,
short
BG
,
unsigned
char
gen_code
)
{
unsigned
char
c
[
22
*
384
];
//padded input, unpacked, max size
unsigned
char
d
[
68
*
384
];
//coded output, unpacked, max size
...
...
@@ -378,26 +378,30 @@ int ldpc_encoder_orig(unsigned char *test_input,unsigned char *channel_input,sho
int
indlist2
[
1000
];
//determine number of bits in codeword
if
(
BG
==
1
)
{
Kb
=
22
;
nrows
=
46
;
//parity check bits
ncols
=
22
;
//info bits
}
else
if
(
BG
==
2
)
{
nrows
=
42
;
//parity check bits
ncols
=
10
;
// info bits
if
(
block_length
>
640
)
Kb
=
10
;
else
if
(
block_length
>
560
)
Kb
=
9
;
else
if
(
block_length
>
192
)
Kb
=
8
;
else
Kb
=
6
;
}
//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
ncols
=
10
;
// info bits
if
(
block_length
>
640
)
Kb
=
10
;
else
if
(
block_length
>
560
)
Kb
=
9
;
else
if
(
block_length
>
192
)
Kb
=
8
;
else
Kb
=
6
;
}
//find minimum value in all sets of lifting size
Zc
=
0
;
...
...
@@ -415,8 +419,6 @@ int ldpc_encoder_orig(unsigned char *test_input,unsigned char *channel_input,sho
return
(
-
1
);
}
int
K
=
ncols
*
Zc
;
Gen_shift_values
=
choose_generator_matrix
(
BG
,
Zc
);
if
(
Gen_shift_values
==
NULL
)
{
printf
(
"ldpc_encoder_orig: could not find generator matrix
\n
"
);
...
...
@@ -438,15 +440,9 @@ int ldpc_encoder_orig(unsigned char *test_input,unsigned char *channel_input,sho
}
no_punctured_columns
=
(
int
)((
nrows
-
2
)
*
Zc
+
block_length
-
block_length
*
3
)
/
Zc
;
//nrows - no_punctured_columns = 2 +2*block_length/Zc
removed_bit
=
(
nrows
-
no_punctured_columns
-
2
)
*
Zc
+
block_length
-
(
block_length
*
3
);
// ((nrows-no_punctured_columns) * Zc-removed_bit) =
// 2Zc + 2*block_length
//printf("%d\n",no_punctured_columns);
//printf("%d\n",removed_bit);
//printf("%d\n",nrows-no_punctured_columns);
//printf("%d\n",((nrows-no_punctured_columns) * Zc-removed_bit));
// unpack input
memset
(
c
,
0
,
sizeof
(
unsigned
char
)
*
ncols
*
Zc
);
memset
(
d
,
0
,
sizeof
(
unsigned
char
)
*
nrows
*
Zc
);
...
...
@@ -614,8 +610,8 @@ int ldpc_encoder_orig(unsigned char *test_input,unsigned char *channel_input,sho
}
// information part and puncture columns
memcpy
(
&
channel_input
[
0
],
&
c
[
2
*
Zc
],
(
block_length
-
2
*
Zc
)
*
sizeof
(
unsigned
char
));
//systematic bits
memcpy
(
&
channel_input
[
block_length
-
2
*
Zc
],
&
d
[
0
],
((
nrows
-
no_punctured_columns
)
*
Zc
-
removed_bit
)
*
sizeof
(
unsigned
char
));
//systematic bits 2Zc + 2*block_length
memcpy
(
&
channel_input
[
0
],
&
c
[
2
*
Zc
],
(
block_length
-
2
*
Zc
)
*
sizeof
(
unsigned
char
));
memcpy
(
&
channel_input
[
block_length
-
2
*
Zc
],
&
d
[
0
],
((
nrows
-
no_punctured_columns
)
*
Zc
-
removed_bit
)
*
sizeof
(
unsigned
char
));
//memcpy(channel_input,c,Kb*Zc*sizeof(unsigned char));
return
0
;
}
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