中国半导体行业协会封装分会会刊

中国电子学会电子制造与封装技术分会会刊

导航

电子与封装 ›› 2025, Vol. 25 ›› Issue (12): 120205 . doi: 10.16257/j.cnki.1681-1070.2025.0142

• 封装、组装与测试 • 上一篇    下一篇

国产DSP编译器正确性测试

戴湘怡1,万江华1,2   

  1. 1. 湘潭大学物理与光电工程学院,湖南 湘潭  411100;2. 湖南毂梁微电子有限公司,长沙  410003
  • 收稿日期:2025-03-21 出版日期:2025-12-26 发布日期:2025-06-26
  • 作者简介:戴湘怡(2001—),女,湖南长沙人,硕士,主要研究方向为编译优化。

Correctness Testing of Domestic DSP Compiler

DAI Xiangyi 1, WAN Jianghua 1,2   

  1. 1. School of Physics and Optoelectronics, Xiangtan University, Xiangtan 411100, China; 2. HunanGreat-Leo Microelectronics Co., Ltd., Changsha 410003, China
  • Received:2025-03-21 Online:2025-12-26 Published:2025-06-26

摘要: 针对国产DSP编译器的正确性展开系统性测试与分析,旨在验证其与参考编译器的代码生成功能一致性。聚焦测试用例移植与自动化测试工具开发两大核心任务,提出了一种基于参考编译器的对比验证方法。测试用例移植自LLVM和GCC标准测试集,并针对DSP芯片的硬件特性,解决了数据类型匹配、标准库兼容及测试用例代码体积过大等关键难题。开发了自动化测试工具DSPValidator,被测编译器与参考编译器的输出对比结果表明,DSPValidator支持跨平台(模拟器与物理开发板)的批量测试、结果比对及错误定位,与手工测试相比,测试效率提升33.6倍(单用例验证时间从45 min降至1.3 min),显著提高了测试效率。

关键词: 国产DSP编译器, 正确性测试, 自动化测试, 嵌入式系统

Abstract: A systematic testing and analysis of the correctness of domestic DSP compilers is conducted to verify the code generation functional consistency with reference compilers. Focusing on two core tasks of test case transplantation and automated testing tool development, a contrastive validation method based on reference compilers is proposed. Test cases are adapted from LLVM and GCC standard test suites, critical challenges such as data type matching, standard library compatibility, and excessive test case code volume are resolved by adapting them to hardware characteristics of DSP chips. An automated testing tool, DSPValidator, is developed. Comparison results between the compiler under test and the reference compiler demonstrate that DSPValidator supports cross-platform (simulators and physical development boards) batch testing, result comparison, and error localization. Compared to manual testing, it achieves a 33.6-fold improvement in testing efficiency (reducing single-case verification time from 45 min to 1.3 min), significantly enhancing testing efficiency.

Key words: domestic DSP compiler, correctness testing, automated testing, embedded system

中图分类号: