Commit 186dde70 authored by Sakthivel Velumani's avatar Sakthivel Velumani

changes to dlsim

parent 28da25f4
...@@ -211,7 +211,7 @@ int main(int argc, char **argv) ...@@ -211,7 +211,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:e:m:")) != -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:e:m:w")) != -1) {
switch (c) { switch (c) {
case 'f': case 'f':
scg_fd = fopen(optarg,"r"); scg_fd = fopen(optarg,"r");
...@@ -394,6 +394,10 @@ int main(int argc, char **argv) ...@@ -394,6 +394,10 @@ int main(int argc, char **argv)
eff_tp_check = (float)atoi(optarg)/100; eff_tp_check = (float)atoi(optarg)/100;
break; break;
case 'w':
output_fd = fopen("txdata.dat", "w+");
break;
default: default:
case 'h': case 'h':
printf("%s -h(elp) -p(extended_prefix) -N cell_id -f output_filename -F input_filename -g channel_model -n n_frames -t Delayspread -s snr0 -S snr1 -x transmission_mode -y TXant -z RXant -i Intefrence0 -j Interference1 -A interpolation_file -C(alibration offset dB) -N CellId\n", printf("%s -h(elp) -p(extended_prefix) -N cell_id -f output_filename -F input_filename -g channel_model -n n_frames -t Delayspread -s snr0 -S snr1 -x transmission_mode -y TXant -z RXant -i Intefrence0 -j Interference1 -A interpolation_file -C(alibration offset dB) -N CellId\n",
...@@ -425,6 +429,7 @@ int main(int argc, char **argv) ...@@ -425,6 +429,7 @@ int main(int argc, char **argv)
printf("-e MSC index\n"); printf("-e MSC index\n");
printf("-t Acceptable effective throughput (in percentage)\n"); printf("-t Acceptable effective throughput (in percentage)\n");
printf("-P Print DLSCH performances\n"); printf("-P Print DLSCH performances\n");
printf("-w Write txdata to binary file (one frame)\n");
exit (-1); exit (-1);
break; break;
} }
...@@ -735,7 +740,7 @@ int main(int argc, char **argv) ...@@ -735,7 +740,7 @@ int main(int argc, char **argv)
NR_DL_UE_HARQ_t *UE_harq_process = dlsch0->harq_processes[harq_pid]; NR_DL_UE_HARQ_t *UE_harq_process = dlsch0->harq_processes[harq_pid];
NR_gNB_DLSCH_t *gNB_dlsch = gNB->dlsch[0][0]; NR_gNB_DLSCH_t *gNB_dlsch = gNB->dlsch[0][0];
nfapi_nr_dl_tti_pdsch_pdu_rel15_t *rel15 = &gNB_dlsch->harq_processes[0]->pdsch_pdu.pdsch_pdu_rel15; nfapi_nr_dl_tti_pdsch_pdu_rel15_t *rel15 = &gNB_dlsch->harq_processes[slot]->pdsch_pdu.pdsch_pdu_rel15;
UE_harq_process->harq_ack.ack = 0; UE_harq_process->harq_ack.ack = 0;
round = 0; round = 0;
...@@ -802,8 +807,10 @@ int main(int argc, char **argv) ...@@ -802,8 +807,10 @@ int main(int argc, char **argv)
if (gNB->frame_parms.nb_antennas_tx>1) if (gNB->frame_parms.nb_antennas_tx>1)
LOG_M("txsig1.m","txs1", txdata[1],frame_length_complex_samples,1,1); LOG_M("txsig1.m","txs1", txdata[1],frame_length_complex_samples,1,1);
} }
if (output_fd) if (output_fd) {
printf("writing txdata to binary file\n");
fwrite(txdata[0],sizeof(int32_t),frame_length_complex_samples,output_fd); fwrite(txdata[0],sizeof(int32_t),frame_length_complex_samples,output_fd);
}
int txlev = signal_energy(&txdata[0][frame_parms->get_samples_slot_timestamp(slot,frame_parms,0)+5*frame_parms->ofdm_symbol_size + 4*frame_parms->nb_prefix_samples + frame_parms->nb_prefix_samples0], frame_parms->ofdm_symbol_size + frame_parms->nb_prefix_samples); int txlev = signal_energy(&txdata[0][frame_parms->get_samples_slot_timestamp(slot,frame_parms,0)+5*frame_parms->ofdm_symbol_size + 4*frame_parms->nb_prefix_samples + frame_parms->nb_prefix_samples0], frame_parms->ofdm_symbol_size + frame_parms->nb_prefix_samples);
......
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