惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
云风的 BLOG
云风的 BLOG
Microsoft Security Blog
Microsoft Security Blog
WordPress大学
WordPress大学
GbyAI
GbyAI
C
Check Point Blog
M
MIT News - Artificial intelligence
T
The Blog of Author Tim Ferriss
Jina AI
Jina AI
博客园 - 【当耐特】
U
Unit 42
月光博客
月光博客
腾讯CDC
Y
Y Combinator Blog
小众软件
小众软件
博客园_首页
Last Week in AI
Last Week in AI
酷 壳 – CoolShell
酷 壳 – CoolShell
The GitHub Blog
The GitHub Blog
博客园 - 聂微东
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
MongoDB | Blog
MongoDB | Blog
博客园 - Franky
T
Tailwind CSS Blog

博客园 - 普罗大众

debug的一个问题 phy_simulators之nr_dlsim之4层接收的优化 phy_simulators之nr_dlsim之一个bug phy_simulators之nr_dlsim开始 phy_simulators之nr_pbchsim之PBCH解码 phy_simulators之nr_pbchsim之PBCH-DMRS检测 phy_simulators之nr_pbchsim之仿真的局限 phy_simulators之nr_pbchsim之一些结构 phy_simulators之nr_pbchsim之SSS检测 phy_simulators之nr_pbchsim之信道 phy_simulators之nr_pbchsim之初始同步 phy_simulators之nr_pbchsim之发送端 phy_simulators之nr_pbchsim之PSS检测 debug方法三:printf debug方法二:用vs code debug方法一:直接用gdb命令 phy_simulators的编译生成方法三:CMakePresets.json phy_simulators的编译生成方法二:手动写cmake脚本 phy_simulators的编译生成方法一:build_oai --phy_simulators open air interface的phy_simultors编译过了 AI App的使用感觉 从“图像视频编码”到“通信物理层” MAC pc + Ubuntu + OAI 原来Fourier是法国的,怪不得法国小波分析这么牛 整理心情
phy_simulators之dlsim.c
普罗大众 · 2026-03-02 · via 博客园 - 普罗大众

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]));