Commit 11006597 authored by Cedric Roux's avatar Cedric Roux

integration fix: let dlsim and ulsim work again

There is now the function copy_harq_proc_struct and some
procedures for the UE have changed, which makes necessary
to have UE->dlsch valid for both subframes (odd and even).

We increase memory usage, maybe it's not the correct solution.
To be kept in mind if something goes wrong at some point.
parent 0f42d5a3
...@@ -1379,6 +1379,7 @@ int main(int argc, char **argv) ...@@ -1379,6 +1379,7 @@ int main(int argc, char **argv)
uint8_t Kmimo; uint8_t Kmimo;
uint8_t ue_category=4; uint8_t ue_category=4;
uint32_t Nsoft; uint32_t Nsoft;
int sf;
...@@ -2104,15 +2105,22 @@ int main(int argc, char **argv) ...@@ -2104,15 +2105,22 @@ int main(int argc, char **argv)
} }
} }
for (i=0; i<2; i++) { /* allocate memory for both subframes (only one is really used
UE->dlsch[subframe&0x1][0][i] = new_ue_dlsch(Kmimo,8,Nsoft,MAX_TURBO_ITERATIONS,N_RB_DL,0); * but there is now "copy_harq_proc_struct" which needs both
* to be valid)
* TODO: refine this somehow (necessary?)
*/
for (sf = 0; sf < 2; sf++) {
for (i=0; i<2; i++) {
UE->dlsch[sf][0][i] = new_ue_dlsch(Kmimo,8,Nsoft,MAX_TURBO_ITERATIONS,N_RB_DL,0);
if (!UE->dlsch[subframe&0x1][0][i]) { if (!UE->dlsch[sf][0][i]) {
printf("Can't get ue dlsch structures\n"); printf("Can't get ue dlsch structures\n");
exit(-1); exit(-1);
} }
UE->dlsch[subframe&0x1][0][i]->rnti = n_rnti; UE->dlsch[sf][0][i]->rnti = n_rnti;
}
} }
UE->dlsch_SI[0] = new_ue_dlsch(1,1,Nsoft,MAX_TURBO_ITERATIONS,N_RB_DL,0); UE->dlsch_SI[0] = new_ue_dlsch(1,1,Nsoft,MAX_TURBO_ITERATIONS,N_RB_DL,0);
......
...@@ -275,6 +275,7 @@ int main(int argc, char **argv) ...@@ -275,6 +275,7 @@ int main(int argc, char **argv)
uint8_t max_turbo_iterations=4; uint8_t max_turbo_iterations=4;
uint8_t parallel_flag=0; uint8_t parallel_flag=0;
int nb_rb_set = 0; int nb_rb_set = 0;
int sf;
int threequarter_fs=0; int threequarter_fs=0;
int ndi; int ndi;
...@@ -709,22 +710,27 @@ int main(int argc, char **argv) ...@@ -709,22 +710,27 @@ int main(int argc, char **argv)
// Create transport channel structures for 2 transport blocks (MIMO) // Create transport channel structures for 2 transport blocks (MIMO)
for (i=0; i<2; i++) { for (i=0; i<2; i++) {
eNB->dlsch[0][i] = new_eNB_dlsch(1,8,1827072,N_RB_DL,0,&eNB->frame_parms); eNB->dlsch[0][i] = new_eNB_dlsch(1,8,1827072,N_RB_DL,0,&eNB->frame_parms);
UE->dlsch[subframe&1][0][i] = new_ue_dlsch(1,8,1827072,MAX_TURBO_ITERATIONS,N_RB_DL,0);
if (!eNB->dlsch[0][i]) { if (!eNB->dlsch[0][i]) {
printf("Can't get eNB dlsch structures\n"); printf("Can't get eNB dlsch structures\n");
exit(-1); exit(-1);
} }
if (!UE->dlsch[subframe&1][0][i]) {
printf("Can't get ue dlsch structures\n");
exit(-1);
}
eNB->dlsch[0][i]->rnti = 14; eNB->dlsch[0][i]->rnti = 14;
UE->dlsch[subframe&1][0][i]->rnti = 14; }
/* allocate memory for both subframes (only one is really used
} * but there is now "copy_harq_proc_struct" which needs both
* to be valid)
* TODO: refine this somehow (necessary?)
*/
for (sf = 0; sf < 2; sf++) {
for (i=0; i<2; i++) {
UE->dlsch[sf][0][i] = new_ue_dlsch(1,8,1827072,MAX_TURBO_ITERATIONS,N_RB_DL,0);
if (!UE->dlsch[sf][0][i]) {
printf("Can't get ue dlsch structures\n");
exit(-1);
}
UE->dlsch[sf][0][i]->rnti = 14;
}
}
UE->dlsch_SI[0] = new_ue_dlsch(1,1,1827072,MAX_TURBO_ITERATIONS,N_RB_DL,0); UE->dlsch_SI[0] = new_ue_dlsch(1,1,1827072,MAX_TURBO_ITERATIONS,N_RB_DL,0);
UE->dlsch_ra[0] = new_ue_dlsch(1,1,1827072,MAX_TURBO_ITERATIONS,N_RB_DL,0); UE->dlsch_ra[0] = new_ue_dlsch(1,1,1827072,MAX_TURBO_ITERATIONS,N_RB_DL,0);
......
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