摘要
软件调试是嵌入式系统开发中最具挑战性的难点之一。在进行高复杂性、高实时性系统调试时,单步-断点时间开销大,易破坏程序执行行为;采用串接机制的JTAG接口,在实现对处于工作状态的复杂多核处理器的并行访问时存在缺陷。片上追踪调试技术通过专用硬件非侵入地获取程序执行状态,有效解决了上述问题。现有的片上追踪调试技术相关研究以追踪完整信息为主,易产生大量无意义的数据;此外,也未考虑压缩后的数据在窄总线上的传输问题。文中设计并实现了一种基于RISC-V指令集的面向多核微处理器的非侵入式追踪调试系统RVTDS,通过复用RISC-V核内平台级别中断控制器,解决多核微处理器高速并行调试时的数据丢失问题;提出了面向片上总线的数据流追踪方案和基于指令位域匹配的控制流过滤机制以实现信息筛选,提供总线带宽统计功能;提出了基于差分编码的数据压缩方法,数据平均压缩率达82%以上;提出了一种数据打包方案以实现窄总线上的数据传输问题,每拍有效数据平均可容纳约1.5个路径信息。系统验证结果表明,RVTDS与传统片上追踪调试方法相比,追踪数据量小,可以灵活高效地完成复杂多核微处理器多种片内运行信息的采集、传输和存储。
Software debugging is one of the most challenging factors in embedded system development.When debugging high-complexity,high real-time systems,single-step-breakpoint debugging time overhead is high,and tends to corrupt program execution behavior;the JTAG interface with serial-connection mechanism is flawed in achieving parallel access to complex multicore processors in operation.The on-chip tracing and debugging technology solves the problems of traditional debugging methods such as single-step-breakpoint and JTAG in debugging highly complex and real-time systems by non-intrusively obtaining program execution status through dedicated hardware.The existing on-chip tracing and debugging technologies mainly trace complete information,and generate a large amount of meaningless data,which easily causes path blocking or data loss,especially during concurrent debugging.In addition,the transmission of compressed data on narrow buses is not considered.A non-intrusive trace debugging system based on RISC-V for multicore microprocessors,RVTDS,is designed and implemented,which solves the data loss problem during high-speed parallel debugging of multicore microprocessors by reusing the platform-level interrupt controller within RISC-V cores.A data-flow tracing scheme for an on-chip bus and a control-flow filtering mechanism based on instruction bit domain matching are proposed to realize signal filtering and provide bus bandwidth statistics.A data compression method based on differential coding is proposed with an average data compression rate of more than 82%.A data packing scheme is proposed to realize the data transmission problem on a narrow bus with an average of about 1.5 path information per effective data beat.The system verification results show that RVTDS has a small amount of trace data compared with traditional debugging methods,and accomplishes the acquisition,transmission,and storage of multiple on-chip operation information of complex multi-core microprocessors flexibly and efficiently.
作者
高轩
何港兴
车文博
扈啸
GAO Xuan;HE Gangxing;CHE Wenbo;HU Xiao(School of Computer Science,National University of Defense Technology,Changsha 410073,China)
出处
《计算机科学》
CSCD
北大核心
2023年第12期66-74,共9页
Computer Science
基金
国家重大科技专项(2017-V-0014-0066)。
关键词
片上追踪调试
非侵入
调试
RVTDS
多核微处理器
On-chip tracing and debugging
Non-intrusive
Debug
RVTDS
Multi-core Microprocessor