Commit e785891f authored by Sy's avatar Sy

integration of the generated file (nrLDPC_cnProc_BG1_Z384_13 with the LDPC decoder at the base

parent f8fbd26b
......@@ -1305,19 +1305,23 @@ set(PHY_TURBOIF
set(PHY_LDPC_ORIG_SRC
${OPENAIR1_DIR}/PHY/CODING/nrLDPC_decoder/nrLDPC_decoder.c
${OPENAIR1_DIR}/PHY/CODING/nrLDPC_encoder/ldpc_encoder.c
${OPENAIR1_DIR}/PHY/CODING/nrLDPC_decoder/nrLDPC_tools/ldpc_gen_files/nrLDPC_cnProc_BG1_Z384_13.c
)
set(PHY_LDPC_OPTIM_SRC
${OPENAIR1_DIR}/PHY/CODING/nrLDPC_decoder/nrLDPC_decoder.c
${OPENAIR1_DIR}/PHY/CODING/nrLDPC_encoder/ldpc_encoder_optim.c
${OPENAIR1_DIR}/PHY/CODING/nrLDPC_decoder/nrLDPC_tools/ldpc_gen_files/nrLDPC_cnProc_BG1_Z384_13.c
)
set(PHY_LDPC_OPTIM8SEG_SRC
${OPENAIR1_DIR}/PHY/CODING/nrLDPC_decoder/nrLDPC_decoder.c
${OPENAIR1_DIR}/PHY/CODING/nrLDPC_encoder/ldpc_encoder_optim8seg.c
${OPENAIR1_DIR}/PHY/CODING/nrLDPC_decoder/nrLDPC_tools/ldpc_gen_files/nrLDPC_cnProc_BG1_Z384_13.c
)
set(PHY_LDPC_OPTIM8SEGMULTI_SRC
${OPENAIR1_DIR}/PHY/CODING/nrLDPC_decoder/nrLDPC_decoder.c
${OPENAIR1_DIR}/PHY/CODING/nrLDPC_encoder/ldpc_encoder_optim8segmulti.c
${OPENAIR1_DIR}/PHY/CODING/nrLDPC_decoder/nrLDPC_tools/ldpc_gen_files/nrLDPC_cnProc_BG1_Z384_13.c
)
set(PHY_NR_CODINGIF
${OPENAIR1_DIR}/PHY/CODING/nrLDPC_load.c;
......
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
......@@ -37,7 +38,7 @@
#include "nrLDPC_mPass.h"
#include "nrLDPC_cnProc.h"
#include "nrLDPC_bnProc.h"
#include "nrLDPC_tools/ldpc_gen_files/nrLDPC_cnProc_BG1_Z384_13.h"
#define NR_LDPC_ENABLE_PARITY_CHECK
#define NR_LDPC_PROFILER_DETAIL
......@@ -80,6 +81,9 @@ static inline uint32_t nrLDPC_decoder_core(int8_t* p_llr, int8_t* p_out, t_nrLDP
uint8_t BG = p_decParams->BG;
uint8_t numMaxIter = p_decParams->numMaxIter;
e_nrLDPC_outMode outMode = p_decParams->outMode;
int8_t* cnProcBuf= p_procBuf->cnProcBuf;
int8_t* cnProcBufRes=p_procBuf->cnProcBufRes;
// Minimum number of iterations is 1
// 0 iterations means hard-decision on input LLRs
......@@ -142,9 +146,12 @@ static inline uint32_t nrLDPC_decoder_core(int8_t* p_llr, int8_t* p_out, t_nrLDP
start_meas(&p_profiler->cnProc);
#endif
if (BG == 1)
{
{ if(Z==384){
nrLDPC_cnProc_BG1_Z384_13(p_procBuf->cnProcBuf,p_procBuf->cnProcBufRes);
}else{
nrLDPC_cnProc_BG1(p_lut, p_procBuf, Z);
}
}
}
else
{
nrLDPC_cnProc_BG2(p_lut, p_procBuf, Z);
......@@ -242,8 +249,12 @@ static inline uint32_t nrLDPC_decoder_core(int8_t* p_llr, int8_t* p_out, t_nrLDP
#endif
if (BG == 1)
{
if(Z==384){
nrLDPC_cnProc_BG1_Z384_13(p_procBuf->cnProcBuf, p_procBuf->cnProcBufRes);
}else{
nrLDPC_cnProc_BG1(p_lut, p_procBuf, Z);
}
}
}
else
{
nrLDPC_cnProc_BG2(p_lut, p_procBuf, Z);
......@@ -351,9 +362,12 @@ static inline uint32_t nrLDPC_decoder_core(int8_t* p_llr, int8_t* p_out, t_nrLDP
start_meas(&p_profiler->cnProc);
#endif
if (BG == 1)
{
nrLDPC_cnProc_BG1(p_lut, p_procBuf, Z);
}
{ if(Z==384){
nrLDPC_cnProc_BG1_Z384_13(p_procBuf->cnProcBuf,p_procBuf->cnProcBufRes);
}else{
nrLDPC_cnProc_BG1(p_lut, p_procBuf, Z);
}
}
else
{
nrLDPC_cnProc_BG2(p_lut, p_procBuf, Z);
......
C=gcc
CFLAGS=-W -Wall -mavx2
CFLAGS=-W -Wall -mavx2
LDFLAGS=
EXEC=cnProc_gen
SRC= $(wildcard *.c)
......@@ -8,12 +8,12 @@ OBJ= $(SRC:.c=.o)
all: $(EXEC)
cnProc_gen: $(OBJ)
$(CC) -o $@ $^ $(LDFLAGS) -O
$(CC) -o $@ $^ $(LDFLAGS) -O2 -pg
main.o: cnProc_gen.h
%.o: %.c
$(CC) -o $@ -c $< $(CFLAGS) -I ${OPENAIR_HOME}/openair1 -g -ggdb
$(CC) -o $@ -c $< $(CFLAGS) -I ${OPENAIR_HOME}/openair1 -g -pg
.PHONY: clean mrproper
......
#ifndef NRLDPC_CN_GEN
#define NRLDPC_DN_GEN
void nrLDPC_cnProc_BG1(t_nrLDPC_lut* p_lut, t_nrLDPC_procBuf* p_procBuf, uint16_t Z);
#define NRLDPC_CN_GEN
void nrLDPC_cnProc_BG1_generator(uint16_t Z,int R);
#endif
#ifndef NR_CN_PROC_BG1_OPTIM
#define NR_CN_PROC_BG1_OPTIM
void nrLDPC_cnProc_BG1_Z384_13(int8_t* cnProcBuf,int8_t* cnProcBufRes);
#endif
......@@ -8,7 +8,7 @@
#include "../nrLDPC_bnProc.h"
#include "cnProc_gen.h"
int main(int argc, char *argv[])
int main(int argc, char *argv [])
{
//short lift_size[51]= {2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,18,20,22,24,26,28,30,32,36,40,44,48,52,56,60,64,72,80,88,96,104,112,120,128,144,160,176,192,208,224,240,256,288,320,352,384};
// unsigned int errors, errors_bit, crc_misses;
......
......@@ -31,7 +31,7 @@
#ifndef __NR_LDPC_TYPES__H__
#define __NR_LDPC_TYPES__H__
#include "PHY/TOOLS/time_meas.h"
#include "../../TOOLS/time_meas.h"
#include "nrLDPCdecoder_defs.h"
// ==============================================================================
// TYPES
......
......@@ -29,8 +29,8 @@
#include <errno.h>
#include <stdio.h>
#include <pthread.h>
#include <linux/kernel.h>
#include <linux/types.h>
//#include <linux/kernel.h>
//#include <linux/types.h>
// global var to enable openair performance profiler
extern int opp_enabled;
double cpu_freq_GHz __attribute__ ((aligned(32)));;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment