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
ZhouShuya
OpenXG-RAN
Commits
c1e3513e
Commit
c1e3513e
authored
Feb 08, 2018
by
root
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bugfixes
parent
75684d75
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
7 deletions
+10
-7
openair1/PHY/CODING/defs.h
openair1/PHY/CODING/defs.h
+3
-3
openair1/PHY/CODING/ldpc_encoder.c
openair1/PHY/CODING/ldpc_encoder.c
+1
-0
openair1/PHY/CODING/ldpc_encoder2.c
openair1/PHY/CODING/ldpc_encoder2.c
+5
-3
openair1/PHY/LTE_TRANSPORT/dlsch_coding.c
openair1/PHY/LTE_TRANSPORT/dlsch_coding.c
+1
-1
No files found.
openair1/PHY/CODING/defs.h
View file @
c1e3513e
...
...
@@ -572,10 +572,10 @@ int16_t reverseBits(int32_t ,int32_t);
void
phy_viterbi_dot11
(
int8_t
*
,
uint8_t
*
,
uint16_t
);
short
*
ldpc_decoder
(
short
*
msgChannel
,
short
block_length
,
short
No_iteration
,
double
rate
);
int
encode_parity_check_part
(
u
int16_t
*
c
,
uint16_t
*
d
,
short
BG
,
short
Zc
,
short
Kb
);
int
encode_parity_check_part
(
u
nsigned
char
*
c
,
unsigned
char
*
d
,
short
BG
,
short
Zc
,
short
Kb
);
int
encode_parity_check_part_orig
(
unsigned
char
*
c
,
unsigned
char
*
d
,
short
BG
,
short
Zc
,
short
Kb
,
short
block_length
);
int
ldpc_encoder
(
unsigned
char
*
test_input
,
unsigned
char
*
channel_input
,
short
block_length
,
int
nom_rate
,
int
denom_
rate
);
int
ldpc_encoder_orig
(
unsigned
char
*
test_input
,
unsigned
char
*
channel_input
,
short
block_length
,
int
nom_rate
,
int
denom_
rate
,
unsigned
char
gen_code
);
int
ldpc_encoder
(
unsigned
char
*
test_input
,
unsigned
char
*
channel_input
,
short
block_length
,
double
rate
);
int
ldpc_encoder_orig
(
unsigned
char
*
test_input
,
unsigned
char
*
channel_input
,
short
block_length
,
double
rate
,
unsigned
char
gen_code
);
int
ldpc_encoder_multi_segment
(
unsigned
char
**
test_input
,
unsigned
char
**
channel_input
,
short
block_length
,
double
rate
,
uint8_t
n_segments
);
int
ldpc_encoder_optim
(
unsigned
char
*
test_input
,
unsigned
char
*
channel_input
,
short
block_length
,
int
nom_rate
,
int
denom_rate
,
time_stats_t
*
tinput
,
time_stats_t
*
tprep
,
time_stats_t
*
tparity
,
time_stats_t
*
toutput
);
...
...
openair1/PHY/CODING/ldpc_encoder.c
View file @
c1e3513e
...
...
@@ -3,6 +3,7 @@
#include <stdio.h>
#include <string.h>
#include <types.h>
#include "defs.h"
int encode_parity_check_part(unsigned char *c,unsigned char *d, short BG,short Zc,short Kb)
{
...
...
openair1/PHY/CODING/ldpc_encoder2.c
View file @
c1e3513e
...
...
@@ -5,6 +5,7 @@
#include <types.h>
#include "assertions.h"
#include "PHY/TOOLS/time_meas.h"
#include "defs.h"
#include "ldpc384_byte.c"
#include "ldpc352_byte.c"
...
...
@@ -139,12 +140,13 @@ int ldpc_encoder_optim(unsigned char *test_input,unsigned char *channel_input,sh
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
/
((
float
)
nom_rate
/
(
float
)
denom_rate
)
)
/
Zc
;
removed_bit
=
(
nrows
-
no_punctured_columns
-
2
)
*
Zc
+
block_length
-
(
int
)(
block_length
/
((
float
)
nom_rate
/
(
float
)
denom_rate
)
);
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);
// unpack input
// memset(c,0,sizeof(unsigned char) * ncols * Zc);
memset
(
c
,
0
,
sizeof
(
unsigned
char
)
*
ncols
*
Zc
);
memset
(
d
,
0
,
sizeof
(
unsigned
char
)
*
nrows
*
Zc
);
start_meas
(
tinput
);
for
(
i
=
0
;
i
<
block_length
;
i
++
)
...
...
openair1/PHY/LTE_TRANSPORT/dlsch_coding.c
View file @
c1e3513e
...
...
@@ -905,7 +905,7 @@ int dlsch_encoding(PHY_VARS_eNB *eNB,
start_meas
(
te_stats
);
memset
(
dlsch
->
harq_processes
[
harq_pid
]
->
d
[
r
],
0
,(
96
+
12
+
3
+
3
*
8448
)
*
sizeof
(
uint8_t
));
//ldpc_encoder((unsigned char*)dlsch->harq_processes[harq_pid]->c[r],(unsigned char*)&dlsch->harq_processes[harq_pid]->d[r][96],Kr,1
,3
);
//ldpc_encoder((unsigned char*)dlsch->harq_processes[harq_pid]->c[r],(unsigned char*)&dlsch->harq_processes[harq_pid]->d[r][96],Kr,1
.0/3.0
);
ldpc_encoder_optim
((
unsigned
char
*
)
dlsch
->
harq_processes
[
harq_pid
]
->
c
[
r
],(
unsigned
char
*
)
&
dlsch
->
harq_processes
[
harq_pid
]
->
d
[
r
][
96
],
Kr
,
1
,
3
,
NULL
,
NULL
,
NULL
,
NULL
);
stop_meas
(
te_stats
);
...
...
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