Commit c9ef299d authored by Jaroslava Fiedlerova's avatar Jaroslava Fiedlerova

Create NR_LDPC_MAX_NUM_CB constant for max number of codeblocks

parent 375556f5
...@@ -90,13 +90,13 @@ typedef struct nrLDPC_dec_params { ...@@ -90,13 +90,13 @@ typedef struct nrLDPC_dec_params {
uint8_t rv; uint8_t rv;
uint8_t numMaxIter; /**< Maximum number of iterations */ uint8_t numMaxIter; /**< Maximum number of iterations */
int E; int E;
uint32_t E_cb[64]; uint32_t E_cb[NR_LDPC_MAX_NUM_CB];
e_nrLDPC_outMode outMode; /**< Output format */ e_nrLDPC_outMode outMode; /**< Output format */
int crc_type; int crc_type;
int (*check_crc)(uint8_t* decoded_bytes, uint32_t n, uint8_t crc_type); int (*check_crc)(uint8_t* decoded_bytes, uint32_t n, uint8_t crc_type);
uint8_t setCombIn; uint8_t setCombIn;
uint8_t setCombIn_cb[64]; uint8_t setCombIn_cb[NR_LDPC_MAX_NUM_CB];
uint8_t status_cb[64]; uint8_t status_cb[NR_LDPC_MAX_NUM_CB];
} t_nrLDPC_dec_params; } t_nrLDPC_dec_params;
typedef struct nrLDPCoffload_params { typedef struct nrLDPCoffload_params {
...@@ -105,15 +105,15 @@ typedef struct nrLDPCoffload_params { ...@@ -105,15 +105,15 @@ typedef struct nrLDPCoffload_params {
uint16_t Kr; uint16_t Kr;
uint8_t rv; uint8_t rv;
uint32_t E; uint32_t E;
uint32_t E_cb[64]; uint32_t E_cb[NR_LDPC_MAX_NUM_CB];
uint16_t n_cb; uint16_t n_cb;
uint16_t F; /**< Filler bits */ uint16_t F; /**< Filler bits */
uint8_t Qm; /**< Modulation */ uint8_t Qm; /**< Modulation */
uint8_t C; uint8_t C;
uint8_t numMaxIter; uint8_t numMaxIter;
uint8_t setCombIn; uint8_t setCombIn;
uint8_t setCombIn_cb[64]; uint8_t setCombIn_cb[NR_LDPC_MAX_NUM_CB];
uint8_t *status_cb[64]; uint8_t *status_cb[NR_LDPC_MAX_NUM_CB];
} t_nrLDPCoffload_params; } t_nrLDPCoffload_params;
/** /**
......
...@@ -99,6 +99,8 @@ ...@@ -99,6 +99,8 @@
/** Maximum number of possible input LLR = NR_LDPC_NCOL_BG1*NR_LDPC_ZMAX */ /** Maximum number of possible input LLR = NR_LDPC_NCOL_BG1*NR_LDPC_ZMAX */
#define NR_LDPC_MAX_NUM_LLR 27000 #define NR_LDPC_MAX_NUM_LLR 27000
#define NR_LDPC_MAX_NUM_CB 72
// ============================================================================== // ==============================================================================
// GLOBAL CONSTANT VARIABLES // GLOBAL CONSTANT VARIABLES
......
...@@ -60,8 +60,8 @@ typedef struct { ...@@ -60,8 +60,8 @@ typedef struct {
/// Modulation order /// Modulation order
uint8_t Qm; uint8_t Qm;
uint32_t E; uint32_t E;
uint32_t E_cb[64]; uint32_t E_cb[NR_LDPC_MAX_NUM_CB];
uint8_t status_cb[64]; uint8_t status_cb[NR_LDPC_MAX_NUM_CB];
unsigned int G; unsigned int G;
// Redundancy version index // Redundancy version index
uint8_t rv; uint8_t rv;
......
...@@ -23,7 +23,6 @@ ...@@ -23,7 +23,6 @@
#include "openair1/PHY/CODING/nrLDPC_defs.h" #include "openair1/PHY/CODING/nrLDPC_defs.h"
/* LDPC maximum code block size - maximum E */ /* LDPC maximum code block size - maximum E */
#define LDPC_MAX_CB_SIZE 32768 #define LDPC_MAX_CB_SIZE 32768
#define LDPC_MAX_NUM_CB 80
/* ldpc coder/decoder API*/ /* ldpc coder/decoder API*/
typedef struct ldpc_interface_s { typedef struct ldpc_interface_s {
LDPC_initfunc_t *LDPCinit; LDPC_initfunc_t *LDPCinit;
......
...@@ -232,8 +232,8 @@ int decode_offload(PHY_VARS_gNB *phy_vars_gNB, ...@@ -232,8 +232,8 @@ int decode_offload(PHY_VARS_gNB *phy_vars_gNB,
{ {
NR_gNB_ULSCH_t *ulsch = &phy_vars_gNB->ulsch[ULSCH_id]; NR_gNB_ULSCH_t *ulsch = &phy_vars_gNB->ulsch[ULSCH_id];
NR_UL_gNB_HARQ_t *harq_process = ulsch->harq_process; NR_UL_gNB_HARQ_t *harq_process = ulsch->harq_process;
int16_t z_ol[LDPC_MAX_NUM_CB * LDPC_MAX_CB_SIZE] __attribute__((aligned(16))); int16_t z_ol[NR_LDPC_MAX_NUM_CB * LDPC_MAX_CB_SIZE] __attribute__((aligned(16)));
int8_t l_ol[LDPC_MAX_NUM_CB * LDPC_MAX_CB_SIZE] __attribute__((aligned(16))); int8_t l_ol[NR_LDPC_MAX_NUM_CB * LDPC_MAX_CB_SIZE] __attribute__((aligned(16)));
const int kc = decParams->BG == 2 ? 52 : 68; const int kc = decParams->BG == 2 ? 52 : 68;
uint32_t A = (harq_process->TBS) << 3; uint32_t A = (harq_process->TBS) << 3;
const int Kr = harq_process->K; const int Kr = harq_process->K;
......
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