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
lizhongxiao
OpenXG-RAN
Commits
e005717a
Commit
e005717a
authored
Jan 18, 2018
by
Wolfgang A. Mozart
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
some error checking
parent
e0443bb0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
2 deletions
+24
-2
openair1/PHY/CODING/ldpc_encoder.c
openair1/PHY/CODING/ldpc_encoder.c
+19
-0
openair1/PHY/LTE_TRANSPORT/dlsch_coding.c
openair1/PHY/LTE_TRANSPORT/dlsch_coding.c
+5
-2
No files found.
openair1/PHY/CODING/ldpc_encoder.c
View file @
e005717a
...
...
@@ -319,6 +319,7 @@ int ldpc_encoder(unsigned char *test_input,unsigned char *channel_input,short bl
} */
//find minimum value in all sets of lifting size
Zc
=
0
;
for
(
i1
=
0
;
i1
<
51
;
i1
++
)
{
if
(
lift_size
[
i1
]
>=
(
double
)
block_length
/
Kb
)
...
...
@@ -328,6 +329,11 @@ int ldpc_encoder(unsigned char *test_input,unsigned char *channel_input,short bl
break
;
}
}
if
(
Zc
==
0
)
{
printf
(
"ldpc_encoder: no lift_size found, problem in block_length %d
\n
"
,
block_length
);
return
(
-
1
);
}
// load base graph of generator matrix
/* if (BG==1)
...
...
@@ -577,6 +583,14 @@ int ldpc_encoder(unsigned char *test_input,unsigned char *channel_input,short bl
d
[
t
+
45
*
Zc
]
=
c
[
518
]
^
c
[
2452
]
^
c
[
3854
];
}
}
else
{
printf
(
"lifting size Zc %d not optimized
\n
"
,
Zc
);
return
(
-
1
);
}
}
else
{
printf
(
"BG %d not optimized
\n
"
,
BG
);
return
(
-
1
);
}
// information part and puncture columns
...
...
@@ -621,6 +635,7 @@ int ldpc_encoder_orig(unsigned char *test_input,unsigned char *channel_input,sho
}*/
//find minimum value in all sets of lifting size
Zc
=
0
;
for
(
i1
=
0
;
i1
<
51
;
i1
++
)
{
if
(
lift_size
[
i1
]
>=
(
double
)
block_length
/
Kb
)
...
...
@@ -630,6 +645,10 @@ int ldpc_encoder_orig(unsigned char *test_input,unsigned char *channel_input,sho
break
;
}
}
if
(
Zc
==
0
)
{
printf
(
"ldpc_encoder: no lift_size found, problem in block_length %d
\n
"
,
block_length
);
return
(
-
1
);
}
// load base graph of generator matrix
if
(
BG
==
1
)
...
...
openair1/PHY/LTE_TRANSPORT/dlsch_coding.c
View file @
e005717a
...
...
@@ -1019,7 +1019,9 @@ int dlsch_encoding(PHY_VARS_eNB *eNB,
unsigned
int
G
;
unsigned
int
crc
=
1
;
#ifdef TD_DECODING
unsigned
short
iind
;
#endif
LTE_DL_FRAME_PARMS
*
frame_parms
=
&
eNB
->
frame_parms
;
unsigned
char
harq_pid
=
dlsch
->
harq_ids
[
subframe
];
...
...
@@ -1103,6 +1105,7 @@ int dlsch_encoding(PHY_VARS_eNB *eNB,
Kr_bytes
=
Kr
>>
3
;
#ifdef TD_DECODING
// get interleaver index for Turbo code (lookup in Table 5.1.3-3 36-212, V8.6 2009-03, p. 13-14)
if
(
Kr_bytes
<=
64
)
iind
=
(
Kr_bytes
-
5
);
...
...
@@ -1114,9 +1117,9 @@ int dlsch_encoding(PHY_VARS_eNB *eNB,
iind
=
123
+
((
Kr_bytes
-
256
)
>>
3
);
else
{
printf
(
"dlsch_coding: Illegal codeword size %d!!!
\n
"
,
Kr_bytes
);
//
return(-1);
return
(
-
1
);
}
#endif
#ifdef DEBUG_DLSCH_CODING
printf
(
"Generating Code Segment %d (%d bits)
\n
"
,
r
,
Kr
);
...
...
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