Commit d56f2c8e authored by francescomani's avatar francescomani

addressing review comments

parent 1f49b73e
...@@ -368,8 +368,8 @@ int nr_dlsch_encoding(PHY_VARS_gNB *gNB, ...@@ -368,8 +368,8 @@ int nr_dlsch_encoding(PHY_VARS_gNB *gNB,
memcpy(harq->b, a, (A / 8) + 3); // using 3 bytes to mimic the case of 24 bit crc memcpy(harq->b, a, (A / 8) + 3); // using 3 bytes to mimic the case of 24 bit crc
} }
// target_code_rate in terms of 0.1 bits // target_code_rate is in 0.1 units
float Coderate = (float) rel15->targetCodeRate[0] / (float) 10240; float Coderate = (float) rel15->targetCodeRate[0] / 10240.0f;
LOG_D(PHY,"DLSCH Coderate %f\n",Coderate); LOG_D(PHY,"DLSCH Coderate %f\n",Coderate);
if ((A <=292) || ((A<=3824) && (Coderate <= 0.6667)) || Coderate <= 0.25) if ((A <=292) || ((A<=3824) && (Coderate <= 0.6667)) || Coderate <= 0.25)
......
...@@ -439,8 +439,8 @@ uint32_t nr_ulsch_decoding(PHY_VARS_gNB *phy_vars_gNB, ...@@ -439,8 +439,8 @@ uint32_t nr_ulsch_decoding(PHY_VARS_gNB *phy_vars_gNB,
A = (harq_process->TBS)<<3; A = (harq_process->TBS)<<3;
// target_code_rate in terms of 0.1 bits // target_code_rate is in 0.1 units
float Coderate = (float) pusch_pdu->target_code_rate / (float) 10240; 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\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);
......
...@@ -504,8 +504,8 @@ uint32_t nr_dlsch_decoding(PHY_VARS_NR_UE *phy_vars_ue, ...@@ -504,8 +504,8 @@ uint32_t nr_dlsch_decoding(PHY_VARS_NR_UE *phy_vars_ue,
harq_process->G = nr_get_G(nb_rb, nb_symb_sch, nb_re_dmrs, dmrs_length, harq_process->Qm,harq_process->Nl); harq_process->G = nr_get_G(nb_rb, nb_symb_sch, nb_re_dmrs, dmrs_length, harq_process->Qm,harq_process->Nl);
G = harq_process->G; G = harq_process->G;
// target_code_rate in terms of 0.1 bits // target_code_rate is in 0.1 units
float Coderate = (float) harq_process->R / (float) 10240; float Coderate = (float) harq_process->R / 10240.0f;
LOG_D(PHY,"%d.%d DLSCH Decoding, harq_pid %d TBS %d (%d) G %d nb_re_dmrs %d length dmrs %d mcs %d Nl %d nb_symb_sch %d nb_rb %d Qm %d Coderate %f\n", LOG_D(PHY,"%d.%d DLSCH Decoding, harq_pid %d TBS %d (%d) G %d nb_re_dmrs %d length dmrs %d mcs %d Nl %d nb_symb_sch %d nb_rb %d Qm %d Coderate %f\n",
frame,nr_slot_rx,harq_pid,A,A/8,G, nb_re_dmrs, dmrs_length, harq_process->mcs, harq_process->Nl, nb_symb_sch, nb_rb, harq_process->Qm, Coderate); frame,nr_slot_rx,harq_pid,A,A/8,G, nb_re_dmrs, dmrs_length, harq_process->mcs, harq_process->Nl, nb_symb_sch, nb_rb, harq_process->Qm, Coderate);
......
...@@ -198,8 +198,8 @@ int nr_ulsch_encoding(PHY_VARS_NR_UE *ue, ...@@ -198,8 +198,8 @@ int nr_ulsch_encoding(PHY_VARS_NR_UE *ue,
uint16_t Kr=0; uint16_t Kr=0;
uint32_t r_offset=0; uint32_t r_offset=0;
uint32_t F=0; uint32_t F=0;
// target_code_rate in terms of 0.1 bits // target_code_rate is in 0.1 units
float Coderate = (float) harq_process->pusch_pdu.target_code_rate / (float) 10240; float Coderate = (float) harq_process->pusch_pdu.target_code_rate / 10240.0f;
/////////// ///////////
///////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////
......
...@@ -802,7 +802,7 @@ bool nr_ue_dlsch_procedures(PHY_VARS_NR_UE *ue, ...@@ -802,7 +802,7 @@ bool nr_ue_dlsch_procedures(PHY_VARS_NR_UE *ue,
nb_symb_sch, nb_symb_sch,
nr_slot_rx, nr_slot_rx,
harq_pid, harq_pid,
pdsch==PDSCH?1:0); pdsch==PDSCH);
LOG_T(PHY,"dlsch decoding, ret = %d\n", ret); LOG_T(PHY,"dlsch decoding, ret = %d\n", ret);
...@@ -878,7 +878,7 @@ bool nr_ue_dlsch_procedures(PHY_VARS_NR_UE *ue, ...@@ -878,7 +878,7 @@ bool nr_ue_dlsch_procedures(PHY_VARS_NR_UE *ue,
nb_symb_sch, nb_symb_sch,
nr_slot_rx, nr_slot_rx,
harq_pid, harq_pid,
pdsch==PDSCH?1:0);//proc->decoder_switch pdsch==PDSCH);//proc->decoder_switch
LOG_T(PHY,"CW dlsch decoding, ret1 = %d\n", ret1); LOG_T(PHY,"CW dlsch decoding, ret1 = %d\n", ret1);
stop_meas(&ue->dlsch_decoding_stats[proc->thread_id]); stop_meas(&ue->dlsch_decoding_stats[proc->thread_id]);
......
...@@ -1106,11 +1106,11 @@ void fill_msg3_pusch_pdu(nfapi_nr_pusch_pdu_t *pusch_pdu, ...@@ -1106,11 +1106,11 @@ void fill_msg3_pusch_pdu(nfapi_nr_pusch_pdu_t *pusch_pdu,
for(int i = start_symbol_index; i < start_symbol_index+nr_of_symbols; i++) for(int i = start_symbol_index; i < start_symbol_index+nr_of_symbols; i++)
num_dmrs_symb += (pusch_pdu->ul_dmrs_symb_pos >> i) & 1; num_dmrs_symb += (pusch_pdu->ul_dmrs_symb_pos >> i) & 1;
int R, TBS = 0; int TBS = 0;
while(TBS<7) { // TBS for msg3 is 7 bytes (except for RRCResumeRequest1 currently not implemented) while(TBS<7) { // TBS for msg3 is 7 bytes (except for RRCResumeRequest1 currently not implemented)
mcsindex++; mcsindex++;
R = nr_get_code_rate_ul(mcsindex,pusch_pdu->mcs_table); int R = nr_get_code_rate_ul(mcsindex,pusch_pdu->mcs_table);
pusch_pdu->target_code_rate = (R>1024)?R*5:R*10; pusch_pdu->target_code_rate = R;
pusch_pdu->qam_mod_order = nr_get_Qm_ul(mcsindex,pusch_pdu->mcs_table); pusch_pdu->qam_mod_order = nr_get_Qm_ul(mcsindex,pusch_pdu->mcs_table);
TBS = nr_compute_tbs(pusch_pdu->qam_mod_order, TBS = nr_compute_tbs(pusch_pdu->qam_mod_order,
R, R,
......
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