Commit 06d07e3a authored by luis_pereira87's avatar luis_pereira87

Bug fix in min num of PRBs to schedule to a UE when there is multiple UEs

parent 9c720648
...@@ -740,7 +740,7 @@ void pf_dl(module_id_t module_id, ...@@ -740,7 +740,7 @@ void pf_dl(module_id_t module_id,
} }
/* Loop UE_sched to find max coeff and allocate transmission */ /* Loop UE_sched to find max coeff and allocate transmission */
while (max_num_ue > 0 && n_rb_sched > 0 && UE_sched.head >= 0) { while (max_num_ue > 0 && n_rb_sched >= MIN_NUM_PRBS_TO_SCHEDULE && UE_sched.head >= 0) {
/* Find max coeff from UE_sched*/ /* Find max coeff from UE_sched*/
int *max = &UE_sched.head; /* assume head is max */ int *max = &UE_sched.head; /* assume head is max */
......
...@@ -403,7 +403,7 @@ bool nr_find_nb_rb(uint16_t Qm, ...@@ -403,7 +403,7 @@ bool nr_find_nb_rb(uint16_t Qm,
return true; return true;
/* is the minimum enough? */ /* is the minimum enough? */
*nb_rb = 5; *nb_rb = MIN_NUM_PRBS_TO_SCHEDULE;
*tbs = nr_compute_tbs(Qm, R, *nb_rb, nb_symb_sch, nb_dmrs_prb, 0, 0, 1) >> 3; *tbs = nr_compute_tbs(Qm, R, *nb_rb, nb_symb_sch, nb_dmrs_prb, 0, 0, 1) >> 3;
if (bytes <= *tbs) if (bytes <= *tbs)
return true; return true;
......
...@@ -80,6 +80,8 @@ ...@@ -80,6 +80,8 @@
#define NR_NB_RA_PROC_MAX 4 #define NR_NB_RA_PROC_MAX 4
#define MAX_NUM_OF_SSB 64 #define MAX_NUM_OF_SSB 64
#define MIN_NUM_PRBS_TO_SCHEDULE 5
/*! \brief NR_list_t is a "list" (of users, HARQ processes, slices, ...). /*! \brief NR_list_t is a "list" (of users, HARQ processes, slices, ...).
* Especially useful in the scheduler and to keep "classes" of users. */ * Especially useful in the scheduler and to keep "classes" of users. */
typedef struct { typedef struct {
......
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