LDPC iterations as command line parameter

This commit is contained in:
Sakthivel Velumani
2022-06-08 21:32:07 +05:30
parent b29f92c1d6
commit 1d99c8e695
12 changed files with 36 additions and 11 deletions
+7
View File
@@ -435,6 +435,7 @@ int main(int argc, char **argv)
uint8_t mcsIndex = 9;
uint8_t dlsch_threads = 0;
int prb_inter = 0;
uint8_t max_ldpc_iterations = 5;
if ( load_configmodule(argc,argv,CONFIG_ENABLECMDLINEONLY) == 0) {
exit_fun("[NR_DLSIM] Error, configuration module init failed\n");
}
@@ -636,6 +637,10 @@ int main(int argc, char **argv)
output_fd = fopen("txdata.dat", "w+");
break;
case 'Q':
max_ldpc_iterations = atoi(optarg);
break;
case 'T':
enable_ptrs=1;
for(i=0; i < atoi(optarg); i++) {
@@ -688,6 +693,7 @@ int main(int argc, char **argv)
printf("-q MCS Table index\n");
printf("-t Acceptable effective throughput (in percentage)\n");
printf("-T Enable PTRS, arguments list L_PTRS{0,1,2} K_PTRS{2,4}, e.g. -T 2 0 2 \n");
printf("-Q Maximum LDPC decoder iterations\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("-P Print DLSCH performances\n");
printf("-w Write txdata to binary file (one frame)\n");
@@ -983,6 +989,7 @@ int main(int argc, char **argv)
UE->if_inst->dl_indication = nr_ue_dl_indication;
UE->if_inst->ul_indication = dummy_nr_ue_ul_indication;
UE->prb_interpolation = prb_inter;
UE->max_ldpc_iterations = max_ldpc_iterations;
UE_mac->if_module = nr_ue_if_module_init(0);
+9 -2
View File
@@ -337,6 +337,7 @@ int main(int argc, char **argv)
int ibwps=24;
int ibwp_rboffset=41;
int params_from_file = 0;
int max_ldpc_iterations = 5;
if ( load_configmodule(argc,argv,CONFIG_ENABLECMDLINEONLY) == 0 ) {
exit_fun("[NR_ULSIM] Error, configuration module init failed\n");
}
@@ -347,7 +348,7 @@ int main(int argc, char **argv)
/* initialize the sin-cos table */
InitSinLUT();
while ((c = getopt(argc, argv, "a:b:c:d:ef:g:h:ikl:m:n:p:r:s:t:u:w:y:z:F:G:H:M:N:PR:S:T:U:L:Z:W:")) != -1) {
while ((c = getopt(argc, argv, "a:b:c:d:ef:g:h:ikl:m:n:p:r:s:t:u:w:y:z:B:F:G:H:I:M:N:PR:S:T:U:L:Z:W:")) != -1) {
printf("handling optarg %c\n",c);
switch (c) {
@@ -539,6 +540,10 @@ int main(int argc, char **argv)
slot = atoi(optarg);
break;
case 'I':
max_ldpc_iterations = atoi(optarg);
break;
case 'M':
// SSB_positions = atoi(optarg);
break;
@@ -617,7 +622,8 @@ int main(int argc, char **argv)
//printf("-C Generate Calibration information for Abstraction (effective SNR adjustment to remove Pe bias w.r.t. AWGN)\n");
printf("-F Input filename (.txt format) for RX conformance testing\n");
printf("-G Offset of samples to read from file (0 default)\n");
printf("-L <log level, 0(errors), 1(warning), 2(info) 3(debug) 4 (trace)>\n");
printf("-L <log level, 0(errors), 1(warning), 2(info) 3(debug) 4 (trace)>\n");
printf("-I Maximum LDPC decoder iterations\n");
printf("-M Multiple SSB positions in burst\n");
printf("-N Nid_cell\n");
printf("-O oversampling factor (1,2,4,8,16)\n");
@@ -722,6 +728,7 @@ int main(int argc, char **argv)
gNB->UL_INFO.rx_ind.number_of_pdus = 0;
gNB->UL_INFO.crc_ind.number_crcs = 0;
gNB->prb_interpolation = prb_inter;
gNB->max_ldpc_iterations = max_ldpc_iterations;
frame_parms = &gNB->frame_parms; //to be initialized I suppose (maybe not necessary for PBCH)
frame_parms->N_RB_DL = N_RB_DL;