Commit db02c60e authored by Sakthivel Velumani's avatar Sakthivel Velumani

Updated ulsch

parent e9355e2e
......@@ -353,6 +353,14 @@ uint32_t nr_ulsch_decoding(PHY_VARS_gNB *phy_vars_gNB,
// This is a new packet, so compute quantities regarding segmentation
harq_process->B = A+24;
if (R<1024)
Coderate = (float) R /(float) 1024;
else
Coderate = (float) R /(float) 2048;
if ((A <=292) || ((A<=3824) && (Coderate <= 0.6667)) || Coderate <= 0.25){
p_decParams->BG = 2;
// [hna] Perform nr_segmenation with input and output set to NULL to calculate only (B, C, K, Z, F)
nr_segmentation(NULL,
NULL,
......@@ -372,13 +380,6 @@ uint32_t nr_ulsch_decoding(PHY_VARS_gNB *phy_vars_gNB,
p_decParams->Z = harq_process->Z;
if (R<1024)
Coderate = (float) R /(float) 1024;
else
Coderate = (float) R /(float) 2048;
if ((A <=292) || ((A<=3824) && (Coderate <= 0.6667)) || Coderate <= 0.25){
p_decParams->BG = 2;
if (Coderate < 0.3333) {
p_decParams->R = 15;
kc = 52;
......
......@@ -207,6 +207,7 @@ int nr_ulsch_encoding(NR_UE_ULSCH_t *ulsch,
uint32_t Tbslbrm;
uint8_t nb_re_dmrs;
uint16_t length_dmrs;
uint16_t R;
float Coderate;
///////////
......@@ -223,6 +224,7 @@ int nr_ulsch_encoding(NR_UE_ULSCH_t *ulsch,
A = harq_process->TBS;
pz = &Z;
mod_order = nr_get_Qm_ul(harq_process->mcs,0);
R = nr_get_code_rate_ul(harq_process->mcs, 0);
Kr=0;
r_offset=0;
BG = 1;
......@@ -284,7 +286,10 @@ int nr_ulsch_encoding(NR_UE_ULSCH_t *ulsch,
///////////////////////// b---->| block segmentation |---->c /////////////////////////
///////////
Coderate = (float) A /(float) G;
if (R<1024)
Coderate = (float) R /(float) 1024;
else
Coderate = (float) R /(float) 2048;
if ((A <=292) || ((A<=3824) && (Coderate <= 0.6667)) || Coderate <= 0.25){
BG = 2;
......
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