Commit 7c86b9c2 authored by Sakthivel Velumani's avatar Sakthivel Velumani

Ulsch coding fix

Do encoding only if NDI toggles instead of doing on first round. Both are same but we now remove the dependancy on rv_round_mapping.
parent f62095fb
...@@ -105,6 +105,8 @@ typedef struct { ...@@ -105,6 +105,8 @@ typedef struct {
uint8_t O_ACK; uint8_t O_ACK;
/// Index of current HARQ round for this ULSCH /// Index of current HARQ round for this ULSCH
uint8_t round; uint8_t round;
/// Last Ndi for this harq process
uint8_t ndi;
/// pointer to pdu from MAC interface (TS 36.212 V15.4.0, Sec 5.1 p. 8) /// pointer to pdu from MAC interface (TS 36.212 V15.4.0, Sec 5.1 p. 8)
unsigned char *a; unsigned char *a;
/// Pointer to the payload + CRC /// Pointer to the payload + CRC
......
...@@ -202,7 +202,6 @@ NR_UE_ULSCH_t *new_nr_ue_ulsch(uint16_t N_RB_UL, ...@@ -202,7 +202,6 @@ NR_UE_ULSCH_t *new_nr_ue_ulsch(uint16_t N_RB_UL,
for (i=0; i<number_of_harq_pids; i++) { for (i=0; i<number_of_harq_pids; i++) {
ulsch->harq_processes[i]->round=0; ulsch->harq_processes[i]->round=0;
} }
return(ulsch); return(ulsch);
} }
} }
...@@ -257,7 +256,6 @@ int nr_ulsch_encoding(NR_UE_ULSCH_t *ulsch, ...@@ -257,7 +256,6 @@ int nr_ulsch_encoding(NR_UE_ULSCH_t *ulsch,
Ilbrm = 0; Ilbrm = 0;
Tbslbrm = 950984; //max tbs Tbslbrm = 950984; //max tbs
Coderate = 0.0; Coderate = 0.0;
harq_process->round = nr_rv_round_map_ue[harq_process->pusch_pdu.pusch_data.rv_index];
/////////// ///////////
///////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////
...@@ -267,8 +265,7 @@ int nr_ulsch_encoding(NR_UE_ULSCH_t *ulsch, ...@@ -267,8 +265,7 @@ int nr_ulsch_encoding(NR_UE_ULSCH_t *ulsch,
LOG_D(PHY,"ulsch coding nb_rb %d, Nl = %d\n", nb_rb, harq_process->pusch_pdu.nrOfLayers); LOG_D(PHY,"ulsch coding nb_rb %d, Nl = %d\n", nb_rb, harq_process->pusch_pdu.nrOfLayers);
LOG_D(PHY,"ulsch coding A %d G %d mod_order %d\n", A,G, mod_order); LOG_D(PHY,"ulsch coding A %d G %d mod_order %d\n", A,G, mod_order);
// if (harq_process->Ndi == 1) { // this is a new packet if (harq_process->ndi != harq_process->pusch_pdu.pusch_data.new_data_indicator) { // this is a new packet
if (harq_process->round == 0) { // this is a new packet
#ifdef DEBUG_ULSCH_CODING #ifdef DEBUG_ULSCH_CODING
printf("encoding thinks this is a new packet \n"); printf("encoding thinks this is a new packet \n");
#endif #endif
...@@ -415,7 +412,7 @@ int nr_ulsch_encoding(NR_UE_ULSCH_t *ulsch, ...@@ -415,7 +412,7 @@ int nr_ulsch_encoding(NR_UE_ULSCH_t *ulsch,
/////////// ///////////
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
harq_process->ndi = harq_process->pusch_pdu.pusch_data.new_data_indicator;
} }
F = harq_process->F; F = harq_process->F;
Kr = harq_process->K; 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