本文已被:浏览 384次 下载 876次
Received:December 29, 2024 Revised:February 12, 2025
Received:December 29, 2024 Revised:February 12, 2025
中文摘要: 动态二进制翻译(DBT)技术是一种高效的指令集仿真技术, 常用于构建CPU的仿真模型. 但是, 该技术在仿真数字信号处理器(DSP)时面临诸多挑战. 高性能DSP (例如TI的TMS320C6X系列)常采用超长指令字(VLIW)架构, 而且设计了专用的硬件和指令来简化软件流水线循环的使用. 由于软件流水线循环代码中缺少显式的条件跳转指令和循环计数器修改操作, 而且循环内的指令会被重排、重叠和屏蔽, 因此使用DBT技术翻译这类循环非常困难. 为此, 本文提出了一种新型动态翻译方案, 通过将并行执行的循环迭代串行化, 生成不同状态的翻译块, 以及将内循环和外循环的指令重叠并按照周期对齐, 以同步翻译外循环和内循环, 来正确地模拟软件流水线循环的执行. 实验表明, 在运行含有软件流水线的常用代码时(如dsplib), 采用该翻译方案的仿真器能够得到和硬件开发板相同的结果, 证明了本文方案的正确性, 且本文的仿真器性能是TI官方仿真器的3.25倍.
Abstract:Dynamic binary translation (DBT) is an efficient technology for instruction set simulation, commonly used to build CPU simulation models. However, significant challenges arise when simulating digital signal processors (DSP). High-performance DSP, such as TI’s TMS320C6X series, often adopt very long instruction word (VLIW) architectures and include specialized hardware and instructions to simplify the use of software-pipelined loops. The absence of explicit conditional branch instructions and loop counter modification operations in such loops, along with the reordering, overlapping, and masking of instructions within the loops, makes translating these loops using DBT technology highly challenging. To address this, this study proposes a novel dynamic translation approach. The approach involves serializing parallel loop iterations, generating translation blocks for different states, and overlapping the instructions of inner and outer loops while aligning them by cycle to synchronize the translation of outer and inner loops, thereby accurately simulating the execution of software-pipelined loops. Experimental results show that when running commonly used code containing software pipelining (e.g. dsplib), the proposed simulator employing this translation approach produces results identical to those from a hardware development board, demonstrating the correctness of the solution. Moreover, the proposed simulator performs 3.25× faster than TI’s official simulator.
keywords: dynamic binary translation (DBT) very long instruction word (VLIW) software pipeline digital signal processor (DSP) instruction set architecture simulation
文章编号: 中图分类号: 文献标志码:
基金项目:
引用文本:
廖开来,梁洪亮.动态翻译软件流水线代码.计算机系统应用,2025,34(8):197-206
LIAO Kai-Lai,LIANG Hong-Liang.Dynamic Translation of Software-pipelined Code.COMPUTER SYSTEMS APPLICATIONS,2025,34(8):197-206
廖开来,梁洪亮.动态翻译软件流水线代码.计算机系统应用,2025,34(8):197-206
LIAO Kai-Lai,LIANG Hong-Liang.Dynamic Translation of Software-pipelined Code.COMPUTER SYSTEMS APPLICATIONS,2025,34(8):197-206

