Commit fabaae33 authored by francescomani's avatar francescomani

removing initial sync option from dlsim

parent 1a351296
...@@ -325,7 +325,6 @@ int main(int argc, char **argv) ...@@ -325,7 +325,6 @@ int main(int argc, char **argv)
gNB_MAC_INST *gNB_mac; gNB_MAC_INST *gNB_mac;
NR_UE_MAC_INST_t *UE_mac; NR_UE_MAC_INST_t *UE_mac;
int cyclic_prefix_type = NFAPI_CP_NORMAL; int cyclic_prefix_type = NFAPI_CP_NORMAL;
int run_initial_sync=0;
int loglvl=OAILOG_WARNING; int loglvl=OAILOG_WARNING;
//float target_error_rate = 0.01; //float target_error_rate = 0.01;
...@@ -536,11 +535,6 @@ int main(int argc, char **argv) ...@@ -536,11 +535,6 @@ int main(int argc, char **argv)
gNBthreads[sizeof(gNBthreads)-1]=0; gNBthreads[sizeof(gNBthreads)-1]=0;
break; break;
case 'Y':
run_initial_sync = 1;
slot = 0;
break;
case 'Z' : case 'Z' :
filename_csv = strdup(optarg); filename_csv = strdup(optarg);
AssertFatal(filename_csv != NULL, "strdup() error: errno %d\n", errno); AssertFatal(filename_csv != NULL, "strdup() error: errno %d\n", errno);
...@@ -551,7 +545,6 @@ int main(int argc, char **argv) ...@@ -551,7 +545,6 @@ int main(int argc, char **argv)
break; break;
case 'H': case 'H':
AssertFatal(run_initial_sync == 0, "Cannot use Y and H options at the same time\n");
slot = atoi(optarg); slot = atoi(optarg);
break; break;
...@@ -611,13 +604,12 @@ int main(int argc, char **argv) ...@@ -611,13 +604,12 @@ int main(int argc, char **argv)
printf("-T Enable PTRS, arguments list L_PTRS{0,1,2} K_PTRS{2,4}, e.g. -T 2 0 2 \n"); printf("-T Enable PTRS, arguments list L_PTRS{0,1,2} K_PTRS{2,4}, e.g. -T 2 0 2 \n");
printf("-U Change DMRS Config, arguments list DMRS TYPE{0=A,1=B} DMRS AddPos{0:2} DMRS ConfType{1:2}, e.g. -U 3 0 2 1 \n"); printf("-U Change DMRS Config, arguments list DMRS TYPE{0=A,1=B} DMRS AddPos{0:2} DMRS ConfType{1:2}, e.g. -U 3 0 2 1 \n");
printf("-X gNB thread pool configuration, n => no threads\n"); printf("-X gNB thread pool configuration, n => no threads\n");
printf("-Y Run initial sync in UE\n");
printf("-Z Output filename (.csv format) for stats\n"); printf("-Z Output filename (.csv format) for stats\n");
exit (-1); exit (-1);
break; break;
} }
} }
printf("%d\n", slot);
logInit(); logInit();
set_glog(loglvl); set_glog(loglvl);
/* initialize the sin table */ /* initialize the sin table */
...@@ -854,11 +846,7 @@ int main(int argc, char **argv) ...@@ -854,11 +846,7 @@ int main(int argc, char **argv)
UE->nrLDPC_coding_interface = gNB->nrLDPC_coding_interface; UE->nrLDPC_coding_interface = gNB->nrLDPC_coding_interface;
UE->max_ldpc_iterations = max_ldpc_iterations; UE->max_ldpc_iterations = max_ldpc_iterations;
init_nr_ue_phy_cpu_stats(&UE->phy_cpu_stats); init_nr_ue_phy_cpu_stats(&UE->phy_cpu_stats);
UE->is_synchronized = 1;
if (run_initial_sync==1)
UE->is_synchronized = 0;
else
UE->is_synchronized = 1;
if (init_nr_ue_signal(UE, 1) != 0) if (init_nr_ue_signal(UE, 1) != 0)
{ {
...@@ -1059,15 +1047,13 @@ int main(int argc, char **argv) ...@@ -1059,15 +1047,13 @@ int main(int argc, char **argv)
msgDataTx->ssb[0].ssb_pdu.ssb_pdu_rel15.bchPayload=0x001234; msgDataTx->ssb[0].ssb_pdu.ssb_pdu_rel15.bchPayload=0x001234;
msgDataTx->ssb[0].ssb_pdu.ssb_pdu_rel15.SsbBlockIndex = 0; msgDataTx->ssb[0].ssb_pdu.ssb_pdu_rel15.SsbBlockIndex = 0;
msgDataTx->gNB = gNB; msgDataTx->gNB = gNB;
if (run_initial_sync) {
nr_common_signal_procedures(gNB,frame,slot,msgDataTx->ssb[0].ssb_pdu); start_meas(&gNB->phy_proc_tx);
} else { phy_procedures_gNB_TX(msgDataTx,frame,slot,1);
start_meas(&gNB->phy_proc_tx); stop_meas(&gNB->phy_proc_tx);
phy_procedures_gNB_TX(msgDataTx,frame,slot,1);
stop_meas(&gNB->phy_proc_tx);
}
int txdataF_offset = slot * frame_parms->samples_per_slot_wCP; int txdataF_offset = slot * frame_parms->samples_per_slot_wCP;
if (n_trials==1) { if (n_trials==1) {
LOG_M("txsigF0.m","txsF0=", LOG_M("txsigF0.m","txsF0=",
&gNB->common_vars.txdataF[0][0][txdataF_offset +2 * frame_parms->ofdm_symbol_size], &gNB->common_vars.txdataF[0][0][txdataF_offset +2 * frame_parms->ofdm_symbol_size],
......
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