《电子技术应用》
您所在的位置:首页 > 模拟设计 > 设计应用 > 针对VLIW DSP编译器弊端及异常处理方案
针对VLIW DSP编译器弊端及异常处理方案
电子技术应用
韦凯,洪泽
中国电子科技集团公司第五十八研究所
摘要: 随着高性能处理器并行度要求的提高,VLIW编译器的弊端也逐步显现,如何平衡代码的正确性和性能成为首要目标。VLIW编译器无法通过有限的代码信息去深度挖掘指令并行性,从而导致指令资源冲突等问题。因此,提出一种基于内核的异常处理方案,在保证代码运行正确性的同时,提高指令的并行度。以C6000系列DSP为例,针对C6000编译器的弊端,开发内核异常处理方案,通过内核异常中断确保代码优化的正确性。最后通过C66x内核资源冲突的典型案例,验证了该异常处理方案的实用性,为VLIW架构处理器程序优化提供方向。
中图分类号:TP314 文献标志码:A DOI: 10.16157/j.issn.0258-7998.256429
中文引用格式: 韦凯,洪泽. 针对VLIW DSP编译器弊端及异常处理方案[J]. 电子技术应用,2026,52(1):92-95.
英文引用格式: Wei Kai,Hong Ze. Aiming at VLIW DSP compiler defect and exception handling method[J]. Application of Electronic Technique,2026,52(1):92-95.
Aiming at VLIW DSP compiler defect and exception handling method
Wei Kai,Hong Ze
The 58th Research Institute China Electronics Technology Group Corporation
Abstract: With the increasing parallelism requirements of high-performance processors, the disadvantages of VLIW compilers have gradually emerged. How to balance the correctness and performance of the code has become the primary goal. The VLIW compiler cannot use limited code information to deeply mine instruction parallelism, causing problems such as instruction resource conflicts. Therefore, a kernel-based exception handling scheme is proposed to improve the parallelism of instructions while ensuring the correctness of code execution. Taking the C6000 series DSP as an example, in view of the shortcomings of the C6000 compiler, a kernel exception handling scheme is developed to ensure the correctness of code optimization through kernel exception interrupts. Finally, through a typical case of C66x kernel resource conflict, the practicability of the exception handling solution is verified, providing a direction for VLIW architecture processor program optimization.
Key words : VLIW;compiler;resource conflicts;C6000;exception handling

引言

随着高性能处理器的飞速发展,在处理器内核并行等方面也出现了VLIW(超长指令字)和超标量等多种架构[1],其中编译器如何高效发挥处理器性能也成了重重之重。其中高性能DSP通常采用VLIW构架开发[2-4]。目前许多公司和机构开始研发新型高性能DSP,如TI公司的C6678 DSP、Tensilica公司的ConnX545CK8-MAC处理器、CEVA的SensPro专用处理器[5-7]等。VLIW构架利用编译器可以将多条互相独立的指令进行打包(Pack)达到指令级别并行(ILP),而超标量架构需要增加乱序设计等硬件复杂度来保证指令的并行性。因此VLIW构架的处理器对编译器的性能要求更高。

VLIW架构硬件设计简单,但是编译器的工作量大大增加。编译器需要实现静态调度、流水优化去找到N条互相独立的指令组成指令包,进而实现应用程序并行化优化[8]。程序并行优化主要有循环展开、软件流水等手段。而循环展开因子过小会导致部分硬件资源被闲置无法效率最大化,循环展开因子过大又可能会导致资源冲突等问题[9]。

针对VLIW程序并行优化问题,目前很多人提出了很多方法,例如:贺春林等人[10]提出的正确性粗细粒度差异化分析技术,可快速准确定位出测试用例的关键优化选项;池昊宇等人[11]提出的基于机器学习的编译优化方法,提升程序性能;赵宵磊等人[12]实现的面向飞腾迈创数字处理器代码自动生成框架,可提高代码并行度。这些方法虽然有效,但依然不能完全保证编译器编出的正确性。

本文将以TMS320C6000系列DSP为例进行分析,针对VLIW编译器的弊端提出一种结合内核异常处理方案,在提升代码优化的同时保证运行的正确性。其中TMS320C6000系列DSP采用VLIW构架进行设计,具有8个并行操作的功能单元(L1、S1、D1、M1、L2、S2、D2、M2),最高可以完成单周期八指令并行运算。


本文详细内容请下载:

http://www.chinaaet.com/resource/share/2000006919


作者信息:

韦凯,洪泽

(中国电子科技集团公司第五十八研究所,江苏 无锡 214035)


官方订阅.jpg

此内容为AET网站原创,未经授权禁止转载。