ndi init fix
This commit is contained in:
@@ -104,8 +104,8 @@ NR_gNB_ULSCH_t *new_gNB_ulsch(uint8_t max_ldpc_iterations, uint16_t N_RB_UL)
|
|||||||
ulsch->max_ldpc_iterations = max_ldpc_iterations;
|
ulsch->max_ldpc_iterations = max_ldpc_iterations;
|
||||||
|
|
||||||
for (i=0; i<NR_MAX_ULSCH_HARQ_PROCESSES; i++) {
|
for (i=0; i<NR_MAX_ULSCH_HARQ_PROCESSES; i++) {
|
||||||
|
|
||||||
ulsch->harq_processes[i] = (NR_UL_gNB_HARQ_t *)malloc16_clear(sizeof(NR_UL_gNB_HARQ_t));
|
ulsch->harq_processes[i] = (NR_UL_gNB_HARQ_t *)malloc16_clear(sizeof(NR_UL_gNB_HARQ_t));
|
||||||
|
ulsch->harq_processes[i]->ndi = 2;
|
||||||
ulsch->harq_processes[i]->b = (uint8_t*)malloc16_clear(ulsch_bytes);
|
ulsch->harq_processes[i]->b = (uint8_t*)malloc16_clear(ulsch_bytes);
|
||||||
ulsch->harq_processes[i]->c = (uint8_t**)malloc16_clear(a_segments*sizeof(uint8_t *));
|
ulsch->harq_processes[i]->c = (uint8_t**)malloc16_clear(a_segments*sizeof(uint8_t *));
|
||||||
ulsch->harq_processes[i]->d = (int16_t**)malloc16_clear(a_segments*sizeof(int16_t *));
|
ulsch->harq_processes[i]->d = (int16_t**)malloc16_clear(a_segments*sizeof(int16_t *));
|
||||||
@@ -450,8 +450,8 @@ uint32_t nr_ulsch_decoding(PHY_VARS_gNB *phy_vars_gNB,
|
|||||||
// target_code_rate is in 0.1 units
|
// target_code_rate is in 0.1 units
|
||||||
float Coderate = (float) pusch_pdu->target_code_rate / 10240.0f;
|
float Coderate = (float) pusch_pdu->target_code_rate / 10240.0f;
|
||||||
|
|
||||||
LOG_D(PHY,"ULSCH Decoding, harq_pid %d TBS %d G %d mcs %d Nl %d nb_rb %d, Qm %d, Coderate %f RV %d round %d\n",
|
LOG_D(PHY,"ULSCH Decoding, harq_pid %d TBS %d G %d mcs %d Nl %d nb_rb %d, Qm %d, Coderate %f RV %d round %d new RX %d\n",
|
||||||
harq_pid, A, G, mcs, n_layers, nb_rb, Qm, Coderate, pusch_pdu->pusch_data.rv_index, harq_process->round);
|
harq_pid, A, G, mcs, n_layers, nb_rb, Qm, Coderate, pusch_pdu->pusch_data.rv_index, harq_process->round, harq_process->new_rx);
|
||||||
|
|
||||||
p_decParams->BG = pusch_pdu->maintenance_parms_v3.ldpcBaseGraph;
|
p_decParams->BG = pusch_pdu->maintenance_parms_v3.ldpcBaseGraph;
|
||||||
int kc;
|
int kc;
|
||||||
@@ -687,7 +687,7 @@ uint32_t nr_ulsch_decoding(PHY_VARS_gNB *phy_vars_gNB,
|
|||||||
LOG_D(PHY,"[gNB %d] ULSCH: Setting ACK for slot %d TBS %d\n",
|
LOG_D(PHY,"[gNB %d] ULSCH: Setting ACK for slot %d TBS %d\n",
|
||||||
phy_vars_gNB->Mod_id,harq_process->slot,harq_process->TBS);
|
phy_vars_gNB->Mod_id,harq_process->slot,harq_process->TBS);
|
||||||
harq_process->status = SCH_IDLE;
|
harq_process->status = SCH_IDLE;
|
||||||
harq_process->round = 0;
|
harq_process->round = 0;
|
||||||
ulsch->harq_mask &= ~(1 << harq_pid);
|
ulsch->harq_mask &= ~(1 << harq_pid);
|
||||||
|
|
||||||
LOG_D(PHY, "ULSCH received ok \n");
|
LOG_D(PHY, "ULSCH received ok \n");
|
||||||
|
|||||||
@@ -1093,7 +1093,6 @@ int main(int argc, char **argv)
|
|||||||
while (round < max_rounds && crc_status) {
|
while (round < max_rounds && crc_status) {
|
||||||
round_trials[round]++;
|
round_trials[round]++;
|
||||||
ulsch_ue->harq_processes[harq_pid]->round = round;
|
ulsch_ue->harq_processes[harq_pid]->round = round;
|
||||||
gNB->ulsch[0]->harq_processes[harq_pid]->round = round;
|
|
||||||
rv_index = nr_rv_round_map[round % 4];
|
rv_index = nr_rv_round_map[round % 4];
|
||||||
|
|
||||||
UE_proc.nr_slot_tx = slot;
|
UE_proc.nr_slot_tx = slot;
|
||||||
|
|||||||
Reference in New Issue
Block a user