Commit 97278014 authored by Sebastian Wagner's avatar Sebastian Wagner

WIP: Version to be tested

parent f187b0e1
Pipeline #11313 failed with stage
in 0 seconds
......@@ -100,23 +100,7 @@
#define NR_LDPC_MAX_NUM_LLR 26112
// ==============================================================================
// GLOBAL VARIABLES
// Aligned on 32 bytes = 256 bits for AVX2
/** CN processing buffer */
//static int8_t cnProcBuf [NR_LDPC_SIZE_CN_PROC_BUF] __attribute__ ((aligned(32)));
/** Buffer for CN processing results */
//static int8_t cnProcBufRes[NR_LDPC_SIZE_CN_PROC_BUF] __attribute__ ((aligned(32)));
/** BN processing buffer */
//static int8_t bnProcBuf [NR_LDPC_SIZE_BN_PROC_BUF] __attribute__ ((aligned(32)));
/** Buffer for BN processing results */
//static int8_t bnProcBufRes[NR_LDPC_SIZE_BN_PROC_BUF] __attribute__ ((aligned(32)));
/** Buffer for LLR results */
//static int8_t llrRes [NR_LDPC_MAX_NUM_LLR] __attribute__ ((aligned(32)));
/** LLR processing buffer */
//static int8_t llrProcBuf[NR_LDPC_MAX_NUM_LLR] __attribute__ ((aligned(32)));
// GLOBAL CONSTANT VARIABLES
/** Start addresses for the cnProcBuf for each CN group in BG1*/
static const uint32_t lut_startAddrCnGroups_BG1[NR_LDPC_NUM_CN_GROUPS_BG1] = {0, 1152, 8832, 43392, 61824, 75264, 81408, 88320, 92160};
......
......@@ -937,9 +937,6 @@ void init_nr_ue_transport(PHY_VARS_NR_UE *ue,int abstraction_flag) {
ue->dlsch_MCH[0] = new_nr_ue_dlsch(1,NUMBER_OF_HARQ_PID_MAX,NSOFT,MAX_LDPC_ITERATIONS_MBSFN,ue->frame_parms.N_RB_DL,0);
// LDPC processing buffer allocation
ue->p_nrLDPC_procBuf[0] = nrLDPC_init_mem();
ue->p_nrLDPC_procBuf[1] = nrLDPC_init_mem();
}
void phy_init_nr_top(PHY_VARS_NR_UE *ue)
......
......@@ -81,6 +81,8 @@ void free_nr_ue_dlsch(NR_UE_DLSCH_t *dlsch)
}
}
nrLDPC_free_mem(dlsch->p_nrLDPC_procBuf);
free16(dlsch,sizeof(NR_UE_DLSCH_t));
dlsch = NULL;
}
......@@ -120,6 +122,7 @@ NR_UE_DLSCH_t *new_nr_ue_dlsch(uint8_t Kmimo,uint8_t Mdlharq,uint32_t Nsoft,uint
dlsch->Mdlharq = Mdlharq;
dlsch->Nsoft = Nsoft;
dlsch->max_ldpc_iterations = max_ldpc_iterations;
dlsch->p_nrLDPC_procBuf = nrLDPC_init_mem();
for (i=0; i<Mdlharq; i++) {
// printf("new_ue_dlsch: Harq process %d\n",i);
......@@ -219,8 +222,7 @@ uint32_t nr_dlsch_decoding(PHY_VARS_NR_UE *phy_vars_ue,
t_nrLDPC_dec_params* p_decParams = &decParams;
t_nrLDPC_time_stats procTime;
t_nrLDPC_time_stats* p_procTime =&procTime ;
// Pointer to LDPC processing buffer of thread 0
t_nrLDPC_procBuf* p_nrLDPC_procBuf = phy_vars_ue->p_nrLDPC_procBuf[0];
t_nrLDPC_procBuf* p_nrLDPC_procBuf = dlsch->p_nrLDPC_procBuf;
int16_t z [68*384];
int8_t l [68*384];
......@@ -696,8 +698,7 @@ uint32_t nr_dlsch_decoding_mthread(PHY_VARS_NR_UE *phy_vars_ue,
t_nrLDPC_dec_params* p_decParams = &decParams;
t_nrLDPC_time_stats procTime;
t_nrLDPC_time_stats* p_procTime =&procTime ;
// Pointer to LDPC processing buffer of thread 0
t_nrLDPC_procBuf* p_nrLDPC_procBuf = phy_vars_ue->p_nrLDPC_procBuf[0];
t_nrLDPC_procBuf* p_nrLDPC_procBuf = dlsch->p_nrLDPC_procBuf;
int16_t z [68*384];
int8_t l [68*384];
//__m128i l;
......@@ -1281,8 +1282,7 @@ void *nr_dlsch_decoding_2thread0(void *arg)
t_nrLDPC_dec_params* p_decParams = &decParams;
t_nrLDPC_time_stats procTime;
t_nrLDPC_time_stats* p_procTime =&procTime ;
// Pointer to LDPC processing buffer of thread 0
t_nrLDPC_procBuf* p_nrLDPC_procBuf = phy_vars_ue->p_nrLDPC_procBuf[0];
t_nrLDPC_procBuf* p_nrLDPC_procBuf = dlsch->p_nrLDPC_procBuf;
int16_t z [68*384];
int8_t l [68*384];
//__m128i l;
......@@ -1789,8 +1789,7 @@ void *nr_dlsch_decoding_2thread1(void *arg)
t_nrLDPC_dec_params* p_decParams = &decParams;
t_nrLDPC_time_stats procTime;
t_nrLDPC_time_stats* p_procTime =&procTime ;
// Pointer to LDPC processing buffer of thread 1
t_nrLDPC_procBuf* p_nrLDPC_procBuf = phy_vars_ue->p_nrLDPC_procBuf[1];
t_nrLDPC_procBuf* p_nrLDPC_procBuf = dlsch->p_nrLDPC_procBuf;
int16_t z [68*384];
int8_t l [68*384];
//__m128i l;
......
......@@ -34,7 +34,7 @@
#include <limits.h>
#include "PHY/impl_defs_top.h"
#include "PHY/CODING/nrLDPC_decoder/nrLDPC_types.h"
//#include "PHY/defs_nr_UE.h"
#include "../NR_TRANSPORT/nr_transport_common_proto.h"
......@@ -352,10 +352,10 @@ typedef struct {
uint32_t Nsoft;
/// Maximum number of LDPC iterations
uint8_t max_ldpc_iterations;
/// LDPC processing buffers
t_nrLDPC_procBuf* p_nrLDPC_procBuf;
/// number of iterations used in last turbo decoding
uint8_t last_iteration_cnt;
uint8_t last_iteration_cnt;
} NR_UE_DLSCH_t;
typedef enum {format0_0,
......
......@@ -158,7 +158,6 @@
#include "targets/ARCH/COMMON/common_lib.h"
#include "NR_IF_Module.h"
#include "PHY/CODING/nrLDPC_decoder/nrLDPC_init_mem.h"
/// Context data structure for RX/TX portion of subframe processing
typedef struct {
......@@ -1064,9 +1063,6 @@ typedef struct {
#endif
t_nrPolar_params *nrPolar_params;
/// LDPC processing buffers for 2 segments in parallel
t_nrLDPC_procBuf* p_nrLDPC_procBuf[2];
/// PBCH DMRS sequence
uint32_t nr_gold_pbch[2][64][NR_PBCH_DMRS_LENGTH_DWORD];
......
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