Modify nr_dlsim, nr_pbchsim and nr_pucchsim to return '0' on success
- Change return value of nr_dlsim, nr_pbchsim and nr_pucchsim to:
- Return '0' if test succeeds (indicated also by "PDSCH/PBCH/PUCCH test
OK" in the test log).
- Return '1' if test fails.
This commit is contained in:
@@ -943,8 +943,7 @@ printf("%d\n", slot);
|
|||||||
|
|
||||||
nr_ue_phy_config_request(&UE_mac->phy_config);
|
nr_ue_phy_config_request(&UE_mac->phy_config);
|
||||||
//NR_COMMON_channels_t *cc = RC.nrmac[0]->common_channels;
|
//NR_COMMON_channels_t *cc = RC.nrmac[0]->common_channels;
|
||||||
int n_errs = 0;
|
int ret = 1;
|
||||||
|
|
||||||
initNamedTpool(gNBthreads, &gNB->threadPool, true, "gNB-tpool");
|
initNamedTpool(gNBthreads, &gNB->threadPool, true, "gNB-tpool");
|
||||||
initNotifiedFIFO(&gNB->L1_tx_free);
|
initNotifiedFIFO(&gNB->L1_tx_free);
|
||||||
initNotifiedFIFO(&gNB->L1_tx_filled);
|
initNotifiedFIFO(&gNB->L1_tx_filled);
|
||||||
@@ -1371,10 +1370,10 @@ printf("%d\n", slot);
|
|||||||
|
|
||||||
if (effRate > (eff_tp_check*TBS)) {
|
if (effRate > (eff_tp_check*TBS)) {
|
||||||
printf("PDSCH test OK\n");
|
printf("PDSCH test OK\n");
|
||||||
|
ret = 0;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
n_errs = n_errors[0];
|
|
||||||
} // NSR
|
} // NSR
|
||||||
|
|
||||||
free(Sched_INFO);
|
free(Sched_INFO);
|
||||||
@@ -1423,7 +1422,7 @@ printf("%d\n", slot);
|
|||||||
free(filename_csv);
|
free(filename_csv);
|
||||||
}
|
}
|
||||||
|
|
||||||
return n_errs;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -146,6 +146,7 @@ int main(int argc, char **argv)
|
|||||||
// int subframe_offset;
|
// int subframe_offset;
|
||||||
// char fname[40], vname[40];
|
// char fname[40], vname[40];
|
||||||
int trial,n_trials=1,n_errors=0,n_errors_payload=0;
|
int trial,n_trials=1,n_errors=0,n_errors_payload=0;
|
||||||
|
int ret_test = 1;
|
||||||
uint8_t transmission_mode = 1,n_tx=1,n_rx=1;
|
uint8_t transmission_mode = 1,n_tx=1,n_rx=1;
|
||||||
uint16_t Nid_cell=0;
|
uint16_t Nid_cell=0;
|
||||||
uint64_t SSB_positions=0x01;
|
uint64_t SSB_positions=0x01;
|
||||||
@@ -771,6 +772,7 @@ int main(int argc, char **argv)
|
|||||||
|
|
||||||
if (((float)n_errors/(float)n_trials <= target_error_rate) && (n_errors_payload==0)) {
|
if (((float)n_errors/(float)n_trials <= target_error_rate) && (n_errors_payload==0)) {
|
||||||
printf("PBCH test OK\n");
|
printf("PBCH test OK\n");
|
||||||
|
ret_test = 0;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -816,6 +818,6 @@ int main(int argc, char **argv)
|
|||||||
loader_reset();
|
loader_reset();
|
||||||
logTerm();
|
logTerm();
|
||||||
|
|
||||||
return(n_errors);
|
return ret_test;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -109,6 +109,7 @@ int main(int argc, char **argv)
|
|||||||
//int subframe_offset;
|
//int subframe_offset;
|
||||||
//char fname[40], vname[40];
|
//char fname[40], vname[40];
|
||||||
int trial,n_trials=100,n_errors=0,ack_nack_errors=0,sr_errors=0;
|
int trial,n_trials=100,n_errors=0,ack_nack_errors=0,sr_errors=0;
|
||||||
|
int ret = 1;
|
||||||
uint8_t transmission_mode = 1,n_tx=1,n_rx=1;
|
uint8_t transmission_mode = 1,n_tx=1,n_rx=1;
|
||||||
uint16_t Nid_cell=0;
|
uint16_t Nid_cell=0;
|
||||||
uint64_t SSB_positions=0x01;
|
uint64_t SSB_positions=0x01;
|
||||||
@@ -758,6 +759,7 @@ int main(int argc, char **argv)
|
|||||||
printf("ACK/NACK: SNR=%f, n_trials=%d, n_bit_errors=%d\n",SNR,n_trials,ack_nack_errors);
|
printf("ACK/NACK: SNR=%f, n_trials=%d, n_bit_errors=%d\n",SNR,n_trials,ack_nack_errors);
|
||||||
if((float)(ack_nack_errors+sr_errors)/(float)(n_trials)<=target_error_rate){
|
if((float)(ack_nack_errors+sr_errors)/(float)(n_trials)<=target_error_rate){
|
||||||
printf("PUCCH test OK\n");
|
printf("PUCCH test OK\n");
|
||||||
|
ret = 0;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -799,5 +801,5 @@ int main(int argc, char **argv)
|
|||||||
loader_reset();
|
loader_reset();
|
||||||
logTerm();
|
logTerm();
|
||||||
|
|
||||||
return(n_errors);
|
return ret;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user