Commit 8b39d307 authored by Sakthivel Velumani's avatar Sakthivel Velumani

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