











phy_simulators编译好了,跑了下ctest,发现跟dlsim.c相关的几个test报错了,调试了一下,顺便理解dlsim.c。报错原因可能就是比特错误了,但调大了snr也不行,可能是链路本身错误,后面再说吧。。。
1. 传统的物理层算法的多层循环
ch_realization, 0->n_ch_rlz-1
snr, snr_0->snr_1
trials, 0->n_frames-1
round, 0->num_rounds-1, HARQ rounds
2. 参数配置
先初始化并取默认值:static paramdef_t options[] = { … { "nb_frame", "number of frame in a test",0, .iptr=&n_frames, .defintval=1, TYPE_INT, 0 }, … };
具体是通过 struct option *long_options = parse_oai_options(options); 把.defintval=1赋值给n_frames了,很特殊的赋值方式,可能适合批量参数的整体赋值吧
还可以通过命令行的输入来修改,是一个while循环:
while ((res=getopt_long_only(argc, argv, "-", long_options, &option_index)) >= 0) { }
还有个函数修改: uniqCfg = load_configmodule(argc, argv, CONFIG_ENABLECMDLINEONLY);
3. ctest里的默认dlsim.c相关的第一个测试的参数是:-m=5 -g=F -s=-1 -w=1.0 -f=.2 -n=1500 -B=50 -c=2 -z=2 -Tperf=60
-m
-g: {‘F’,EVA,6}
-s: snr0
-w: snr_int
-f: snr_step
-n: n_frames
-B
-c
-z
-Tperf: test_perf
4. 好像errs[0]和effective_rate都会导致test_passed=0
5. 原作者的快速错误打印是下面这一句,但目前我还看不大懂,后续再看看吧:
printf("Errors (%u(%u)/%u %u/%u %u/%u %u/%u), Pe = (%e,%e,%e,%e), dci_errors %u/%u, Pe = %e => effective rate %f, normalized delay %f (%f)\n",
errs[0],
errs2[0],
round_trials[0],
errs[1],
round_trials[1],
errs[2],
round_trials[2],
errs[3],
round_trials[3],
(double)errs[0]/(round_trials[0]),
(double)errs[1]/(round_trials[1]),
(double)errs[2]/(round_trials[2]),
(double)errs[3]/(round_trials[3]),
dci_errors[0]+dci_errors[1]+dci_errors[2]+dci_errors[3],
round_trials[0]+round_trials[1]+round_trials[2]+round_trials[3],
(double)(dci_errors[0]+dci_errors[1]+dci_errors[2]+dci_errors[3])/(round_trials[0]+round_trials[1]+round_trials[2]+round_trials[3]),
//rate*effective_rate, 100*effective_rate,
//rate,
//rate*get_Qm(UE->dlsch[UE->current_thread_id[subframe]][0][0]->harq_processes[UE->dlsch[UE->current_thread_id[subframe]][0][0]->current_harq_pid]->mcs),
(1.0*(round_trials[0]-errs[0])+2.0*(round_trials[1]-errs[1])+3.0*(round_trials[2]-errs[2])+4.0*(round_trials[3]-errs[3]))/((double)round_trials[0])/ (double)eNB->dlsch[0][0]->harq_processes[0]->TBS,
(1.0*(round_trials[0]-errs[0])+2.0*(round_trials[1]-errs[1])+3.0*(round_trials[2]-errs[2])+4.0*(round_trials[3]-errs[3]))/((double)round_trials[0]));
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。