Skip to content

Handle division by 0 gracefully in average channel level calculation

Guido Casati requested to merge nr-ue-channel-level-assert-fix into develop
  • Replaced division by zero assert with a conditional calculation of 'z' (inverse of 'y').
  • Added a log message if 'y' is zero to handle the special case

nb_re_pdsch is directly linked to nb_rb_pdsch, if the latter is 0 the former is also 0 with this commit, the average channel level will be set to 0 and the inconsistency will be handled in later in nr_ue_pdsch_procedures with a demodulation failure

other minor changes:

  • Improved clarity by using NR_NB_SC_PER_RB instead of hard-coded value 12 in nb of RBs calculation

addressing one of the issues found in #783

Edited by Guido Casati

Merge request reports