Commit e4cc0ef3 authored by francescomani's avatar francescomani

remove rate matching assertion

parent 45991004
...@@ -388,7 +388,7 @@ int nr_rate_matching_ldpc(uint8_t Ilbrm, ...@@ -388,7 +388,7 @@ int nr_rate_matching_ldpc(uint8_t Ilbrm,
uint32_t Ncb,ind,k=0,Nref,N; uint32_t Ncb,ind,k=0,Nref,N;
if (C==0) { if (C==0) {
printf("nr_rate_matching: invalid parameters (C %d\n",C); LOG_E(PHY,"nr_rate_matching: invalid parameters (C %d\n",C);
return -1; return -1;
} }
...@@ -407,16 +407,15 @@ int nr_rate_matching_ldpc(uint8_t Ilbrm, ...@@ -407,16 +407,15 @@ int nr_rate_matching_ldpc(uint8_t Ilbrm,
#ifdef RM_DEBUG #ifdef RM_DEBUG
printf("nr_rate_matching_ldpc: E %d, F %d, Foffset %d, k0 %d, Ncb %d, rvidx %d\n", E, F, Foffset,ind, Ncb, rvidx); printf("nr_rate_matching_ldpc: E %d, F %d, Foffset %d, k0 %d, Ncb %d, rvidx %d\n", E, F, Foffset,ind, Ncb, rvidx);
#endif #endif
AssertFatal(Foffset <= E,
"Foffset %d > E %d " if (Foffset > E) {
"(Ilbrm %d, Tbslbrm %d, Z %d, BG %d, C %d)\n", LOG_E(PHY,"nr_rate_matching: invalid parameters (Foffset %d > E %d)\n",Foffset,E);
Foffset, E, return -1;
Ilbrm, Tbslbrm, Z, BG, C); }
AssertFatal(Foffset <= Ncb, if (Foffset > Ncb) {
"Foffset %d > Ncb %d " LOG_E(PHY,"nr_rate_matching: invalid parameters (Foffset %d > Ncb %d)\n",Foffset,Ncb);
"(Ilbrm %d, Tbslbrm %d, Z %d, BG %d, C %d)\n", return -1;
Foffset, Ncb, }
Ilbrm, Tbslbrm, Z, BG, C);
if (ind >= Foffset && ind < (F+Foffset)) ind = F+Foffset; if (ind >= Foffset && ind < (F+Foffset)) ind = F+Foffset;
...@@ -478,7 +477,7 @@ int nr_rate_matching_ldpc_rx(uint8_t Ilbrm, ...@@ -478,7 +477,7 @@ int nr_rate_matching_ldpc_rx(uint8_t Ilbrm,
#endif #endif
if (C==0) { if (C==0) {
printf("nr_rate_matching: invalid parameters (C %d\n",C); LOG_E(PHY,"nr_rate_matching: invalid parameters (C %d\n",C);
return -1; return -1;
} }
...@@ -493,8 +492,14 @@ int nr_rate_matching_ldpc_rx(uint8_t Ilbrm, ...@@ -493,8 +492,14 @@ int nr_rate_matching_ldpc_rx(uint8_t Ilbrm,
} }
ind = (index_k0[BG-1][rvidx]*Ncb/N)*Z; ind = (index_k0[BG-1][rvidx]*Ncb/N)*Z;
AssertFatal(Foffset <= E,"Foffset %d > E %d\n",Foffset,E); if (Foffset > E) {
AssertFatal(Foffset <= Ncb,"Foffset %d > Ncb %d\n",Foffset,Ncb); LOG_E(PHY,"nr_rate_matching: invalid parameters (Foffset %d > E %d)\n",Foffset,E);
return -1;
}
if (Foffset > Ncb) {
LOG_E(PHY,"nr_rate_matching: invalid parameters (Foffset %d > Ncb %d)\n",Foffset,Ncb);
return -1;
}
#ifdef RM_DEBUG #ifdef RM_DEBUG
printf("nr_rate_matching_ldpc_rx: Clear %d, E %d, k0 %d, Ncb %d, rvidx %d\n", clear, E, ind, Ncb, rvidx); printf("nr_rate_matching_ldpc_rx: Clear %d, E %d, k0 %d, Ncb %d, rvidx %d\n", clear, E, ind, Ncb, rvidx);
......
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