Commit 70e4bfda authored by Sakthivel Velumani's avatar Sakthivel Velumani
Browse files

Storing Z inside harq_process structure

The LDPC lifting size has to be stored for each harq_process as its only assigned in the first round.
parent cc2cc95f
......@@ -328,8 +328,7 @@ int nr_dlsch_encoding(PHY_VARS_gNB *gNB,
uint16_t nb_rb = rel15->rbSize;
uint8_t nb_symb_sch = rel15->NrOfSymbols;
uint32_t A, Kb, F=0;
static uint32_t Z = 0;
uint32_t *Zc = &Z;
uint32_t *Zc = &dlsch->harq_processes[harq_pid]->Z;
uint8_t mod_order = rel15->qamModOrder[0];
uint16_t Kr=0,r;
uint32_t r_offset=0;
......
......@@ -141,6 +141,8 @@ typedef struct {
uint8_t decode_phich;
// Encoder BG
uint8_t BG;
// LDPC lifting size
uint32_t Z;
} NR_UL_UE_HARQ_t;
typedef struct {
......
......@@ -227,8 +227,7 @@ int nr_ulsch_encoding(NR_UE_ULSCH_t *ulsch,
NR_UL_UE_HARQ_t *harq_process;
uint16_t nb_rb ;
uint32_t A, F;
static uint32_t Z = 0;
uint32_t *pz = &Z;
uint32_t *pz;
uint8_t mod_order;
uint16_t Kr,r;
uint32_t r_offset;
......@@ -249,7 +248,7 @@ int nr_ulsch_encoding(NR_UE_ULSCH_t *ulsch,
harq_process = ulsch->harq_processes[harq_pid];
nb_rb = harq_process->pusch_pdu.rb_size;
A = harq_process->pusch_pdu.pusch_data.tb_size*8;
pz = &Z;
pz = &harq_process->Z;
mod_order = nr_get_Qm_ul(harq_process->pusch_pdu.mcs_index, harq_process->pusch_pdu.mcs_table);
R = nr_get_code_rate_ul(harq_process->pusch_pdu.mcs_index, harq_process->pusch_pdu.mcs_table);
Kr=0;
......
......@@ -112,6 +112,8 @@ typedef struct {
uint32_t F;
/// Encoder BG
uint8_t BG;
/// LDPC lifting size
uint32_t Z;
} NR_DL_gNB_HARQ_t;
typedef struct {
......
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