Commit ca551259 authored by Thomas Schlichter's avatar Thomas Schlichter

refactor open-coded conversion of rv_index to HARQ round into new function nr_rv_to_round()

parent 9e2b05a0
......@@ -463,12 +463,7 @@ uint32_t nr_ulsch_decoding(PHY_VARS_gNB *phy_vars_gNB,
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_gNB_ULSCH_DECODING,1);
harq_process->TBS = pusch_pdu->pusch_data.tb_size;
for (int round = 0; round < 4; round++) {
if (nr_rv_round_map[round] == pusch_pdu->pusch_data.rv_index) {
harq_process->round = round;
break;
}
}
harq_process->round = nr_rv_to_round(pusch_pdu->pusch_data.rv_index);
harq_process->new_rx = false; // flag to indicate if this is a new reception for this harq (initialized to false)
if (harq_process->round == 0) {
......
......@@ -115,6 +115,16 @@
extern const uint8_t nr_rv_round_map[4];
extern const uint8_t nr_rv_round_map_ue[4];
static inline
uint8_t nr_rv_to_round(uint8_t rv)
{
for (uint8_t round = 0; round < 4; round++) {
if (nr_rv_round_map[round] == rv)
return round;
}
return 0;
}
typedef enum {
NR_MU_0=0,
NR_MU_1,
......
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