• 中国计算机学会会刊
  • 中国科技核心期刊
  • 中文核心期刊

计算机工程与科学 ›› 2025, Vol. 47 ›› Issue (01): 45-55.

• 高性能计算 • 上一篇    下一篇

面向同构非对称多核的OpenOCD调试功能优化研究

唐竹1,陈宝海1,王敬宇2,朱琪2   

  1. (1.国防科技大学计算机学院,湖南 长沙 410073;2.江南计算技术研究所,江苏 无锡 214083)

  • 收稿日期:2023-07-08 修回日期:2023-09-18 接受日期:2025-01-25 出版日期:2025-01-25 发布日期:2025-01-18
  • 基金资助:
    国家自然科学基金(61972412,62202489)

OpenOCD debugging optimization for isomorphic asymmetric multi-core architecture

TANG Zhu1,CHEN Baohai1,WANG Jingyu2,ZHU Qi2   

  1. (1.College of Computer Science and Technology,National University of Defense Technology,Changsha 410073;
    2.Jiangnan Institute of Computing Technology,Wuxi 214083,China)
  • Received:2023-07-08 Revised:2023-09-18 Accepted:2025-01-25 Online:2025-01-25 Published:2025-01-18

摘要: 多核架构是提升处理器性能的重要手段,其在网络处理领域的应用也日渐广泛,因此,需要配套高效的多核调试工具才能提升多核网络处理器的开发效率。由于处理网络任务的多核之间并不存在很强的关联性,业务核更多使用运行到结束(RTC)而非流水线(Pipeline)的处理模式,多个业务核之间并不需要复杂的缓存一致性逻辑,因此采用同构的非对称多处理AMP架构,可有效降低芯片复杂度和研发成本。目前,非对称多核调试需要同时启动多个GDB,不仅调试不便,同时还会导致较大的资源开销。针对同构非对称多核场景下OpenOCD多端口调试方案进行优化,以单个GDB端口实现针对多个非对称核的调试功能,同时支持对称多处理核簇与非对称多核的混合场景。最后,基于RISC-V软硬件平台搭建了非对称多核调试环境,对线程操作、单步执行、单步跳过、继续运行、查看堆栈和断点设置等GDB调试命令进行测试,验证了单端口OpenOCD进行非对称多核调试的可行性和有效性。

关键词: 非对称多处理, 多核调试, OpenOCD, 单端口

Abstract: Multi-core architecture is a crucial means of enhancing processor performance, and its application in network processing is becoming increasingly widespread. Consequently, efficient multi-core debugging tools are also required to improve the development efficiency of multi-core network processors. Since there is not a strong correlation among multi-core processing network tasks, the service cores more often adopt the RTC processing mode rather than the Pipeline mode, and the complex cache coherence logic is not necessary among multiple service cores.  Therefore, by adopting a homogeneous AMP architecture, chip complexity and research and development costs can be effectively reduced. Currently, asymmetric multi-core debugging requires the simultaneous launching of multiple GDBs, which not only complicates the debugging process but also results in significant resource consumption. This paper optimizes the OpenOCD multi-port debugging solution for homogeneous asymmetric multi-core scenarios, enabling debugging of multiple asymmetric cores through a single GDB port while also supporting mixed scenarios of symmetric multi-processing core clusters and asymmetric multi-core. Finally, an asymmetric multi-core debugging environment is built based on the RISC-V hardware and software platform, and GDB debugging commands, such as thread operations, step execution, step over, continue running, stack viewing, and breakpoint setting are tested, verifying the feasibility and effectiveness of single-port OpenOCD for asymmetric multi-core debugging.

Key words: asymmetric multi-processing, multi-core debugging, OpenOCD, single port