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
wangwenhui
OpenXG-RAN
Commits
37bb310a
Commit
37bb310a
authored
Jun 15, 2020
by
WANG Tsu-Han
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
redefine conflict resolve
parent
527c3bcd
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
36 additions
and
268 deletions
+36
-268
openair1/PHY/CODING/nrLDPC_decoder_LYC/nrLDPC_decoder_LYC.cu
openair1/PHY/CODING/nrLDPC_decoder_LYC/nrLDPC_decoder_LYC.cu
+2
-2
openair1/PHY/CODING/nrLDPC_decoder_LYC/nrLDPC_defs.h
openair1/PHY/CODING/nrLDPC_decoder_LYC/nrLDPC_defs.h
+0
-162
openair1/PHY/CODING/nrLDPC_decoder_LYC/nrLDPC_init_mem.h
openair1/PHY/CODING/nrLDPC_decoder_LYC/nrLDPC_init_mem.h
+34
-33
openair1/PHY/CODING/nrLDPC_decoder_LYC/nrLDPC_types.h
openair1/PHY/CODING/nrLDPC_decoder_LYC/nrLDPC_types.h
+0
-71
No files found.
openair1/PHY/CODING/nrLDPC_decoder_LYC/nrLDPC_decoder_LYC.cu
View file @
37bb310a
...
...
@@ -12,8 +12,8 @@
#include <unistd.h>
#include <cuda_runtime.h>
#include <cuda.h>
#include "PHY/CODING/nrLDPC_decoder
_LYC
/nrLDPC_types.h"
#include "PHY/CODING/nrLDPC_decoder
_LYC/nrLDPC
_defs.h"
#include "PHY/CODING/nrLDPC_decoder/nrLDPC_types.h"
#include "PHY/CODING/nrLDPC_decoder
/nrLDPCdecoder
_defs.h"
#include "bgs/BG1_I0"
#include "bgs/BG1_I1"
...
...
openair1/PHY/CODING/nrLDPC_decoder_LYC/nrLDPC_defs.h
View file @
37bb310a
This diff is collapsed.
Click to expand it.
openair1/PHY/CODING/nrLDPC_decoder_LYC/nrLDPC_init_mem.h
View file @
37bb310a
...
...
@@ -24,7 +24,7 @@
* \author Sebastian Wagner (TCL Communications) Email: <mailto:sebastian.wagner@tcl.com>
* \date 07-12-2018
* \version 1.0
* \note
* \note
* \warning
*/
...
...
@@ -32,8 +32,9 @@
#define __NR_LDPC_DECODER_LYC__NR_LDPC_INIT_MEM__H__
#include <stdlib.h>
#include "nrLDPC_defs.h"
#include "nrLDPC_types.h"
#include "PHY/CODING/nrLDPC_decoder/nrLDPC_types.h"
#include "PHY/CODING/nrLDPC_decoder/nrLDPCdecoder_defs.h"
#include "PHY/CODING/nrLDPC_decoder/nrLDPC_init_mem.h"
#ifndef malloc32_clear
/**
...
...
@@ -41,12 +42,12 @@
\param size Input size in bytes
\return Pointer to memory
*/
static
inline
void
*
malloc32_clear
(
size_t
size
)
{
void
*
ptr
=
(
void
*
)
memalign
(
32
,
size
+
32
);
memset
(
ptr
,
0
,
size
);
return
ptr
;
}
//
static inline void* malloc32_clear(size_t size)
//
{
//
void* ptr = (void*) memalign(32, size+32);
//
memset(ptr, 0, size);
//
return ptr;
//
}
#endif
/**
...
...
@@ -55,32 +56,32 @@ static inline void* malloc32_clear(size_t size)
\param p_lut Pointer to decoder LUTs
\return Number of LLR values
*/
static
inline
t_nrLDPC_procBuf
*
nrLDPC_init_mem
(
void
)
{
t_nrLDPC_procBuf
*
p_procBuf
=
(
t_nrLDPC_procBuf
*
)
malloc32_clear
(
sizeof
(
t_nrLDPC_procBuf
));
//
static inline t_nrLDPC_procBuf* nrLDPC_init_mem(void)
//
{
//
t_nrLDPC_procBuf* p_procBuf = (t_nrLDPC_procBuf*) malloc32_clear(sizeof(t_nrLDPC_procBuf));
if
(
p_procBuf
)
{
p_procBuf
->
cnProcBuf
=
(
int8_t
*
)
malloc32_clear
(
NR_LDPC_SIZE_CN_PROC_BUF
*
sizeof
(
int8_t
));
p_procBuf
->
cnProcBufRes
=
(
int8_t
*
)
malloc32_clear
(
NR_LDPC_SIZE_CN_PROC_BUF
*
sizeof
(
int8_t
));
p_procBuf
->
bnProcBuf
=
(
int8_t
*
)
malloc32_clear
(
NR_LDPC_SIZE_BN_PROC_BUF
*
sizeof
(
int8_t
));
p_procBuf
->
bnProcBufRes
=
(
int8_t
*
)
malloc32_clear
(
NR_LDPC_SIZE_BN_PROC_BUF
*
sizeof
(
int8_t
));
p_procBuf
->
llrRes
=
(
int8_t
*
)
malloc32_clear
(
NR_LDPC_MAX_NUM_LLR
*
sizeof
(
int8_t
));
p_procBuf
->
llrProcBuf
=
(
int8_t
*
)
malloc32_clear
(
NR_LDPC_MAX_NUM_LLR
*
sizeof
(
int8_t
));
}
//
if (p_procBuf)
//
{
//
p_procBuf->cnProcBuf = (int8_t*) malloc32_clear(NR_LDPC_SIZE_CN_PROC_BUF*sizeof(int8_t));
//
p_procBuf->cnProcBufRes = (int8_t*) malloc32_clear(NR_LDPC_SIZE_CN_PROC_BUF*sizeof(int8_t));
//
p_procBuf->bnProcBuf = (int8_t*) malloc32_clear(NR_LDPC_SIZE_BN_PROC_BUF*sizeof(int8_t));
//
p_procBuf->bnProcBufRes = (int8_t*) malloc32_clear(NR_LDPC_SIZE_BN_PROC_BUF*sizeof(int8_t));
//
p_procBuf->llrRes = (int8_t*) malloc32_clear(NR_LDPC_MAX_NUM_LLR *sizeof(int8_t));
//
p_procBuf->llrProcBuf = (int8_t*) malloc32_clear(NR_LDPC_MAX_NUM_LLR *sizeof(int8_t));
//
}
return
(
p_procBuf
);
}
//
return(p_procBuf);
//
}
static
inline
void
nrLDPC_free_mem
(
t_nrLDPC_procBuf
*
p_procBuf
)
{
free
(
p_procBuf
->
cnProcBuf
);
free
(
p_procBuf
->
cnProcBufRes
);
free
(
p_procBuf
->
bnProcBuf
);
free
(
p_procBuf
->
bnProcBufRes
);
free
(
p_procBuf
->
llrRes
);
free
(
p_procBuf
->
llrProcBuf
);
//
static inline void nrLDPC_free_mem(t_nrLDPC_procBuf* p_procBuf)
//
{
//
free(p_procBuf->cnProcBuf);
//
free(p_procBuf->cnProcBufRes);
//
free(p_procBuf->bnProcBuf);
//
free(p_procBuf->bnProcBufRes);
//
free(p_procBuf->llrRes);
//
free(p_procBuf->llrProcBuf);
free
(
p_procBuf
);
}
//
free(p_procBuf);
//
}
#endif
openair1/PHY/CODING/nrLDPC_decoder_LYC/nrLDPC_types.h
View file @
37bb310a
...
...
@@ -31,76 +31,5 @@
#ifndef __NR_LDPC_DECODER_LYC__NR_LDPC_TYPES__H__
#define __NR_LDPC_DECODER_LYC__NR_LDPC_TYPES__H__
#include "PHY/TOOLS/time_meas.h"
#include "nrLDPC_defs.h"
// ==============================================================================
// TYPES
/**
Structure containing the pointers to the LUTs.
*/
typedef
struct
nrLDPC_lut
{
const
uint32_t
*
startAddrCnGroups
;
/**< Start addresses for CN groups in CN processing buffer */
const
uint8_t
*
numCnInCnGroups
;
/**< Number of CNs in every CN group */
const
uint8_t
*
numBnInBnGroups
;
/**< Number of CNs in every BN group */
const
uint32_t
*
startAddrBnGroups
;
/**< Start addresses for BN groups in BN processing buffer */
const
uint16_t
*
startAddrBnGroupsLlr
;
/**< Start addresses for BN groups in LLR processing buffer */
const
uint16_t
**
circShift
[
NR_LDPC_NUM_CN_GROUPS_BG1
];
/**< LUT for circular shift values for all CN groups and Zs */
const
uint32_t
**
startAddrBnProcBuf
[
NR_LDPC_NUM_CN_GROUPS_BG1
];
/**< LUT of start addresses of CN groups in BN proc buffer */
const
uint8_t
**
bnPosBnProcBuf
[
NR_LDPC_NUM_CN_GROUPS_BG1
];
/**< LUT of BN positions in BG for CN groups */
const
uint16_t
*
llr2llrProcBufAddr
;
/**< LUT for transferring input LLRs to LLR processing buffer */
const
uint8_t
*
llr2llrProcBufBnPos
;
/**< LUT BN position in BG */
const
uint8_t
**
posBnInCnProcBuf
[
NR_LDPC_NUM_CN_GROUPS_BG1
];
/**< LUT for llr2cnProcBuf */
}
t_nrLDPC_lut
;
/**
Enum with possible LDPC output formats.
*/
typedef
enum
nrLDPC_outMode
{
nrLDPC_outMode_BIT
,
/**< 32 bits per uint32_t output */
nrLDPC_outMode_BITINT8
,
/**< 1 bit per int8_t output */
nrLDPC_outMode_LLRINT8
/**< Single LLR value per int8_t output */
}
e_nrLDPC_outMode
;
/**
Structure containing LDPC decoder parameters.
*/
typedef
struct
nrLDPC_dec_params
{
uint8_t
BG
;
/**< Base graph */
uint16_t
Z
;
/**< Lifting size */
uint8_t
R
;
/**< Decoding rate: Format 15,13,... for code rates 1/5, 1/3,... */
uint8_t
numMaxIter
;
/**< Maximum number of iterations */
e_nrLDPC_outMode
outMode
;
/**< Output format */
}
t_nrLDPC_dec_params
;
/**
Structure containing LDPC decoder processing time statistics.
*/
typedef
struct
nrLDPC_time_stats
{
time_stats_t
llr2llrProcBuf
;
/**< Statistics for function llr2llrProcBuf */
time_stats_t
llr2CnProcBuf
;
/**< Statistics for function llr2CnProcBuf */
time_stats_t
cnProc
;
/**< Statistics for function cnProc */
time_stats_t
cnProcPc
;
/**< Statistics for function cnProcPc */
time_stats_t
bnProcPc
;
/**< Statistics for function bnProcPc */
time_stats_t
bnProc
;
/**< Statistics for function bnProc */
time_stats_t
cn2bnProcBuf
;
/**< Statistics for function cn2bnProcBuf */
time_stats_t
bn2cnProcBuf
;
/**< Statistics for function bn2cnProcBuf */
time_stats_t
llrRes2llrOut
;
/**< Statistics for function llrRes2llrOut */
time_stats_t
llr2bit
;
/**< Statistics for function llr2bit */
time_stats_t
total
;
/**< Statistics for total processing time */
}
t_nrLDPC_time_stats
;
/**
Structure containing the processing buffers
*/
typedef
struct
nrLDPC_procBuf
{
int8_t
*
cnProcBuf
;
/**< CN processing buffer */
int8_t
*
cnProcBufRes
;
/**< Buffer for CN processing results */
int8_t
*
bnProcBuf
;
/**< BN processing buffer */
int8_t
*
bnProcBufRes
;
/**< Buffer for BN processing results */
int8_t
*
llrRes
;
/**< Buffer for LLR results */
int8_t
*
llrProcBuf
;
/**< LLR processing buffer */
}
t_nrLDPC_procBuf
;
#endif
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