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
canghaiwuhen
OpenXG-RAN
Commits
a8bf0b23
Commit
a8bf0b23
authored
Oct 10, 2019
by
Raymond Knopp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
andmask for both optimized encoder routines. Minor changes in ldpctest
parent
0b9d0158
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
7 deletions
+7
-7
openair1/PHY/CODING/TESTBENCH/ldpctest.c
openair1/PHY/CODING/TESTBENCH/ldpctest.c
+2
-2
openair1/PHY/CODING/nrLDPC_encoder/ldpc_encoder2.c
openair1/PHY/CODING/nrLDPC_encoder/ldpc_encoder2.c
+5
-5
No files found.
openair1/PHY/CODING/TESTBENCH/ldpctest.c
View file @
a8bf0b23
...
...
@@ -362,7 +362,7 @@ int test_ldpc(short No_iteration,
printf
(
"
\n
e %d..%d: "
,
i
,
i
+
15
);
#endif
if
(
channel_input
[
j
][
i
-
2
*
Zc
]
==
0
)
if
(
channel_input
_optim
[
j
][
i
-
2
*
Zc
]
==
0
)
modulated_input
[
j
][
i
]
=
1
.
0
;
///sqrt(2); //QPSK
else
modulated_input
[
j
][
i
]
=-
1
.
0
;
///sqrt(2);
...
...
@@ -386,7 +386,7 @@ int test_ldpc(short No_iteration,
else
channel_output_uncoded
[
j
][
i
]
=
0
;
if
(
channel_output_uncoded
[
j
][
i
]
!=
channel_input
[
j
][
i
-
2
*
Zc
])
if
(
channel_output_uncoded
[
j
][
i
]
!=
channel_input
_optim
[
j
][
i
-
2
*
Zc
])
*
errors_bit_uncoded
=
(
*
errors_bit_uncoded
)
+
1
;
}
...
...
openair1/PHY/CODING/nrLDPC_encoder/ldpc_encoder2.c
View file @
a8bf0b23
...
...
@@ -273,7 +273,7 @@ int ldpc_encoder_optim(unsigned char *test_input,unsigned char *channel_input,sh
if
(
tinput
!=
NULL
)
start_meas
(
tinput
);
for
(
i
=
0
;
i
<
block_length
;
i
++
)
{
c
[
i
]
=
(
test_input
[
i
/
8
]
&
(
128
>>
(
i
&
7
)))
>>
(
i
&
7
);
c
[
i
]
=
(
test_input
[
i
/
8
]
&
(
128
>>
(
i
&
7
)))
>>
(
7
-
(
i
&
7
)
);
//printf("c(%d,%d)=%d\n",j,i,temp);
}
...
...
@@ -330,7 +330,7 @@ int ldpc_encoder_optim_8seg(unsigned char **test_input,unsigned char **channel_i
#ifdef __AVX2__
__m256i
shufmask
=
_mm256_set_epi64x
(
0x0303030303030303
,
0x0202020202020202
,
0x0101010101010101
,
0x0000000000000000
);
__m256i
andmask
=
_mm256_set1_epi64x
(
0x
8040201008040201
);
// every 8 bits -> 8 bytes, pattern repeats.
__m256i
andmask
=
_mm256_set1_epi64x
(
0x
0102040810204080
);
// every 8 bits -> 8 bytes, pattern repeats.
__m256i
zero256
=
_mm256_setzero_si256
();
__m256i
masks
[
8
];
register
__m256i
c256
;
...
...
@@ -413,7 +413,7 @@ int ldpc_encoder_optim_8seg(unsigned char **test_input,unsigned char **channel_i
for (i=0; i<block_length; i++) {
for (j=0; j<n_segments; j++) {
temp = (test_input[j][i/8]&(1
<<(i&7)))>>(i&7
);
temp = (test_input[j][i/8]&(1
28>>(i&7)))>>(7-(i&7)
);
//printf("c(%d,%d)=%d\n",j,i,temp);
c[i] |= (temp << j);
}
...
...
@@ -431,7 +431,7 @@ int ldpc_encoder_optim_8seg(unsigned char **test_input,unsigned char **channel_i
for
(
i
=
(
block_length
>>
5
)
<<
5
;
i
<
block_length
;
i
++
)
{
for
(
j
=
0
;
j
<
n_segments
;
j
++
)
{
temp
=
(
test_input
[
j
][
i
/
8
]
&
(
128
>>
(
i
&
7
)))
>>
(
i
&
7
);
temp
=
(
test_input
[
j
][
i
/
8
]
&
(
128
>>
(
i
&
7
)))
>>
(
7
-
(
i
&
7
)
);
//printf("c(%d,%d)=%d\n",j,i,temp);
c
[
i
]
|=
(
temp
<<
j
);
}
...
...
@@ -639,7 +639,7 @@ int ldpc_encoder_optim_8seg_multi(unsigned char **test_input,unsigned char **cha
//for (j=0; j<n_segments; j++) {
for
(
j
=
macro_segment
;
j
<
macro_segment_end
;
j
++
)
{
temp
=
(
test_input
[
j
][
i
/
8
]
&
(
128
>>
(
i
&
7
)))
>>
(
i
&
7
);
temp
=
(
test_input
[
j
][
i
/
8
]
&
(
128
>>
(
i
&
7
)))
>>
(
7
-
(
i
&
7
)
);
//printf("c(%d,%d)=%d\n",j,i,temp);
c
[
i
]
|=
(
temp
<<
(
j
-
macro_segment
));
}
...
...
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