Commit e009730b authored by Francesco Mani's avatar Francesco Mani

tbs as uint32_t

parent 64ae52dd
...@@ -593,7 +593,7 @@ typedef struct { ...@@ -593,7 +593,7 @@ typedef struct {
uint16_t coding_rate; uint16_t coding_rate;
uint8_t modulation; uint8_t modulation;
uint8_t modulation_order; uint8_t modulation_order;
uint16_t transport_block_size; uint32_t transport_block_size;
uint8_t nb_re_dmrs; uint8_t nb_re_dmrs;
uint8_t time_alloc_list_flag; uint8_t time_alloc_list_flag;
uint8_t time_alloc_list; uint8_t time_alloc_list;
......
...@@ -54,8 +54,6 @@ uint32_t nr_compute_tbs(uint16_t Qm, ...@@ -54,8 +54,6 @@ uint32_t nr_compute_tbs(uint16_t Qm,
// Intermediate number of information bits // Intermediate number of information bits
Ninfo = (nb_re * R * Qm * Nl)>>scale; Ninfo = (nb_re * R * Qm * Nl)>>scale;
//printf("Ninfo %lf nbp_re %d nb_re %d mcs %d Qm %d, R %d\n", Ninfo, nbp_re, nb_re,mcs, Qm, R);
if (Ninfo <=3824) { if (Ninfo <=3824) {
n = max(3, floor(log2(Ninfo)) - 6); n = max(3, floor(log2(Ninfo)) - 6);
Np_info = max(24, (Ninfo>>n)<<n); Np_info = max(24, (Ninfo>>n)<<n);
...@@ -86,6 +84,7 @@ uint32_t nr_compute_tbs(uint16_t Qm, ...@@ -86,6 +84,7 @@ uint32_t nr_compute_tbs(uint16_t Qm,
} }
} }
//printf("Ninfo %d nbp_re %d nb_re %d Qm %d, R %d, tbs %d\n", Ninfo, nbp_re, nb_re, Qm, R, nr_tbs);
return nr_tbs; return nr_tbs;
} }
......
...@@ -184,7 +184,8 @@ void nr_get_tbs_dl(nfapi_nr_dl_config_dlsch_pdu *dlsch_pdu, ...@@ -184,7 +184,8 @@ void nr_get_tbs_dl(nfapi_nr_dl_config_dlsch_pdu *dlsch_pdu,
uint16_t N_RE_prime = NR_NB_SC_PER_RB*N_sh_symb - N_PRB_DMRS - N_PRB_oh; uint16_t N_RE_prime = NR_NB_SC_PER_RB*N_sh_symb - N_PRB_DMRS - N_PRB_oh;
LOG_D(MAC, "N_RE_prime %d for %d symbols %d DMRS per PRB and %d overhead\n", N_RE_prime, N_sh_symb, N_PRB_DMRS, N_PRB_oh); LOG_D(MAC, "N_RE_prime %d for %d symbols %d DMRS per PRB and %d overhead\n", N_RE_prime, N_sh_symb, N_PRB_DMRS, N_PRB_oh);
uint16_t R, TBS=0; uint16_t R;
uint32_t TBS=0;
uint8_t table_idx, Qm; uint8_t table_idx, Qm;
/*uint8_t mcs_table = config.pdsch_config.mcs_table.value; /*uint8_t mcs_table = config.pdsch_config.mcs_table.value;
......
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