Commit 2c0257e4 authored by frtabu's avatar frtabu

fix dlsim dlsch parallelisation

parent 2d4e8cc3
This diff is collapsed.
...@@ -418,7 +418,7 @@ int main(int argc, char **argv) ...@@ -418,7 +418,7 @@ int main(int argc, char **argv)
FILE *scg_fd=NULL; FILE *scg_fd=NULL;
while ((c = getopt (argc, argv, "f:hA:pf:g:i:j:n:s:S:t:x:y:z:M:N:F:GR:dPIL:Ea:b:d:e:m:w:T:U:q")) != -1) { while ((c = getopt (argc, argv, "f:hA:pf:g:i:j:n:s:S:t:x:y:z:M:N:F:GR:dPIL:Ea:b:D:e:m:w:T:U:q")) != -1) {
switch (c) { switch (c) {
case 'f': case 'f':
scg_fd = fopen(optarg,"r"); scg_fd = fopen(optarg,"r");
...@@ -585,7 +585,7 @@ int main(int argc, char **argv) ...@@ -585,7 +585,7 @@ int main(int argc, char **argv)
case 'b': case 'b':
g_rbSize = atoi(optarg); g_rbSize = atoi(optarg);
break; break;
case 'd': case 'D':
dlsch_threads = atoi(optarg); dlsch_threads = atoi(optarg);
break; break;
case 'e': case 'e':
...@@ -658,7 +658,7 @@ int main(int argc, char **argv) ...@@ -658,7 +658,7 @@ int main(int argc, char **argv)
printf("-U Change DMRS Config, arguments list DMRS TYPE{0=A,1=B} DMRS AddPos{0:2}, e.g. -U 2 0 2 \n"); printf("-U Change DMRS Config, arguments list DMRS TYPE{0=A,1=B} DMRS AddPos{0:2}, e.g. -U 2 0 2 \n");
printf("-P Print DLSCH performances\n"); printf("-P Print DLSCH performances\n");
printf("-w Write txdata to binary file (one frame)\n"); printf("-w Write txdata to binary file (one frame)\n");
printf("-d number of dlsch threads, 0: no dlsch parallelization\n"); printf("-D number of dlsch threads, 0: no dlsch parallelization\n");
exit (-1); exit (-1);
break; break;
} }
...@@ -675,7 +675,7 @@ int main(int argc, char **argv) ...@@ -675,7 +675,7 @@ int main(int argc, char **argv)
if (snr1set==0) if (snr1set==0)
snr1 = snr0+10; snr1 = snr0+10;
init_dlsch_tpool(dlsch_threads);
RC.gNB = (PHY_VARS_gNB**) malloc(sizeof(PHY_VARS_gNB *)); RC.gNB = (PHY_VARS_gNB**) malloc(sizeof(PHY_VARS_gNB *));
...@@ -954,6 +954,11 @@ int main(int argc, char **argv) ...@@ -954,6 +954,11 @@ int main(int argc, char **argv)
//NR_COMMON_channels_t *cc = RC.nrmac[0]->common_channels; //NR_COMMON_channels_t *cc = RC.nrmac[0]->common_channels;
snrRun = 0; snrRun = 0;
if (dlsch_threads ) {
init_dlsch_tpool(dlsch_threads);
pthread_t dlsch0_threads;
threadCreate(&dlsch0_threads, dlsch_thread, (void *)UE, "DLthread", -1, OAI_PRIORITY_RT_MAX-1);
}
for (SNR = snr0; SNR < snr1; SNR += .2) { for (SNR = snr0; SNR < snr1; SNR += .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