phy simulators remove measurments printf and check/allow log level config
This commit is contained in:
@@ -514,7 +514,7 @@ int main(int argc, char *argv[])
|
||||
unsigned char qbits=8;
|
||||
unsigned int decoded_errors[10000]; // initiate the size of matrix equivalent to size of SNR
|
||||
int c,i=0, i1 = 0;
|
||||
|
||||
int loglvl=OAILOG_WARNING;
|
||||
int n_trials = 1;
|
||||
double SNR_step = 0.1;
|
||||
|
||||
@@ -525,8 +525,11 @@ int main(int argc, char *argv[])
|
||||
n_iter_stats_t dec_iter[3];
|
||||
|
||||
short BG=0,Zc,Kb=0;
|
||||
|
||||
while ((c = getopt (argc, argv, "q:r:s:S:l:G:n:d:i:t:u:hv:")) != -1)
|
||||
if ( load_configmodule(argc,argv,CONFIG_ENABLECMDLINEONLY) == 0) {
|
||||
exit_fun(" Error, configuration module init failed\n");
|
||||
} // must be done before specific options parsing to prevent errasing them
|
||||
|
||||
while ((c = getopt (argc, argv, "q:r:s:S:l:L:G:n:d:i:t:u:hv:")) != -1)
|
||||
switch (c)
|
||||
{
|
||||
case 'q':
|
||||
@@ -544,6 +547,10 @@ int main(int argc, char *argv[])
|
||||
case 'l':
|
||||
block_length = atoi(optarg);
|
||||
break;
|
||||
|
||||
case 'L':
|
||||
loglvl = atoi(optarg);
|
||||
break;
|
||||
|
||||
case 'G':
|
||||
ldpc_version="_cuda";
|
||||
@@ -581,10 +588,11 @@ int main(int argc, char *argv[])
|
||||
printf("BG1 (blocklength > 3840): 1/3, 2/3, 22/25 (8/9) \n");
|
||||
printf("BG2 (blocklength <= 3840): 1/5, 1/3, 2/3 \n\n");
|
||||
printf("-h This message\n");
|
||||
printf("-L <log level, 0(errors), 1(warning), 2(info) 3(debug) 4 (trace)>\n");
|
||||
printf("-q Quantization bits, Default: 8\n");
|
||||
printf("-r Nominator rate, (1, 2, 22), Default: 1\n");
|
||||
printf("-d Denominator rate, (3, 5, 25), Default: 1\n");
|
||||
printf("-l Block length (l > 3840 -> BG1, rest BG2 ), Default: 8448\n");
|
||||
printf("-l Block length (l > 3840 -> BG1, rest BG2 ), Default: 8448\n");
|
||||
printf("-G give 1 to run cuda for LDPC, Default: 0\n");
|
||||
printf("-n Number of simulation trials, Default: 1\n");
|
||||
//printf("-M MCS2 for TB 2\n");
|
||||
@@ -603,6 +611,8 @@ int main(int argc, char *argv[])
|
||||
printf("n_trials %d: \n", n_trials);
|
||||
printf("SNR0 %f: \n", SNR0);
|
||||
|
||||
logInit();
|
||||
set_glog(loglvl);
|
||||
|
||||
if (ldpc_version != NULL)
|
||||
load_nrLDPClib(ldpc_version);
|
||||
|
||||
@@ -399,8 +399,8 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue,
|
||||
nb_rb_pdsch);
|
||||
|
||||
stop_meas(&ue->generic_stat_bis[proc->thread_id][slot]);
|
||||
if (cpumeas(CPUMEAS_GETSTATE))
|
||||
LOG_D(PHY, "[AbsSFN %u.%d] Slot%d Symbol %d: Channel Scale %5.2f \n",frame,nr_slot_rx,slot,symbol,ue->generic_stat_bis[proc->thread_id][slot].p_time/(cpuf*1000.0));
|
||||
if (cpumeas(CPUMEAS_GETSTATE))
|
||||
LOG_D(PHY, "[AbsSFN %u.%d] Slot%d Symbol %d: Channel Scale %5.2f \n",frame,nr_slot_rx,slot,symbol,ue->generic_stat_bis[proc->thread_id][slot].p_time/(cpuf*1000.0));
|
||||
|
||||
start_meas(&ue->generic_stat_bis[proc->thread_id][slot]);
|
||||
if (first_symbol_flag==1) {
|
||||
@@ -509,7 +509,6 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue,
|
||||
stop_meas(&ue->generic_stat_bis[proc->thread_id][slot]);
|
||||
if (cpumeas(CPUMEAS_GETSTATE))
|
||||
LOG_D(PHY, "[AbsSFN %u.%d] Slot%d Symbol %d log2_maxh %d channel_level %d: Channel Comp %5.2f \n", frame, nr_slot_rx, slot, symbol, pdsch_vars[gNB_id]->log2_maxh, proc->channel_level, ue->generic_stat_bis[proc->thread_id][slot].p_time/(cpuf*1000.0));
|
||||
|
||||
start_meas(&ue->generic_stat_bis[proc->thread_id][slot]);
|
||||
|
||||
if (frame_parms->nb_antennas_rx > 1) {
|
||||
@@ -566,6 +565,7 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue,
|
||||
stop_meas(&ue->generic_stat_bis[proc->thread_id][slot]);
|
||||
if (cpumeas(CPUMEAS_GETSTATE))
|
||||
LOG_D(PHY, "[AbsSFN %u.%d] Slot%d Symbol %d: Channel Combine %5.2f \n",frame,nr_slot_rx,slot,symbol,ue->generic_stat_bis[proc->thread_id][slot].p_time/(cpuf*1000.0));
|
||||
|
||||
start_meas(&ue->generic_stat_bis[proc->thread_id][slot]);
|
||||
/* Store the valid DL RE's */
|
||||
pdsch_vars[gNB_id]->dl_valid_re[symbol-1] = len;
|
||||
|
||||
Reference in New Issue
Block a user