节点文献

VLIW DSP汇编器与代码生成器的设计与实现

Design and Implementation of a VLIW DSP Assembler and Code Generator

【作者】 陈惠斌

【导师】 刘春林;

【作者基本信息】 国防科学技术大学 , 计算机科学与技术, 2005, 硕士

【摘要】 与传统DSPs相比,现代DSPs采用更多的ILP技术以提高机器性能。另一方面,它们呈现出规整的、可编译的体系结构,使得能够为它们构造高效的优化编译器。本文讨论这样一款DSP,它采用分簇的VLIW体系结构,能够在单个时钟周期同时执行多个操作。我们叙述这款VLIW DSP的汇编器和代码生成器的构造。 为了便于对向前引用的处理,VLIW DSP汇编器组织成两遍结构。第一遍仅记录源文件中的符号(标号)信息,第二遍重新扫描源文件,利用先前收集的信息产生目标文件。VLIW DSP汇编器的特点包括:借助lex和yacc生成词法和语法分析器;汇编语句在汇编器中以内部表示的形式存在;指令的编码信息存于数据表格,编码指令时使用通用的过程查询这些表格以决定指令的编码格式和opcode,然后调用相应的编码函数产生机器代码。 VLIW DSP代码生成器在IMPACT C编译器框架基础上实现。我们为VLIW DSP定制它的机器规格说明和机器描述,并利用IMPACT的模板构造它的代码生成器。VLIW DSP体系结构的一个显著特点是分簇,即大而集中的寄存器文件被分成多个块,每个块与几个功能单元相关联组成簇。与这一特点相对应,代码生成的一个重要步骤是簇分配,即为每个操作及其操作数映射合适的簇。簇分配应使得各簇的功能单元得到充分利用,并设法减少簇之间的数据传递。我们给出统一的簇分配与调度算法(UAS)针对VLIW DSP的实现,算法的特点是簇分配与调度一同进行,当调度一个操作时,同时为这个操作和它的操作数分配合适的簇。

【Abstract】 Compared with traditional DSPs, modern DSPs use more ILP technologies to improve their performance. On the other hand, they present regular and compilable architectures, which enable construction of efficient, optimizing compliers for them. In this thesis we discuss such a DSP, which uses a clustered VLIW architecture and can perform multiple operations simultaneously during a single clock cycle. We describe the construction of the assembler and the code generator of VLIW DSP.To ease the processing of forward references, our assembler is organized as a two-pass structure. In the first pass, it only records information about symbols (labels) in the source file. In the second pass, it scans the source file again, and by using the information collected earlier generates the object file. The VLIW DSP assembler’s features include: it uses lex and yacc to generate the lexer and the parser respectively; an assembly statement exists as an internal representation in the assembler; instructions’ encoding information is saved in the data tables, and when encoding an instruction a generic procedure is employed to search these tables to decide on its encoding format and opcode, and then a corresponding encoding function is called to produce its machine code.Our code generator is implemented based on IMPACT C compiler framework. We customized a machine specification and a machine description for the VLIW DSP, and constructed the code generator using the template provided by IMPACT. One of the prominent features of our DSP’s architecture is clustering, that is, a big centralized register file is splitted into more small pieces, each and its several associated functional units forming a cluster. With this feature, an important phase of our code generation is cluster assigning, which maps operations and their operands to appropriate clusters. Cluster assignment should make maximal use of functional units across clusters, and reduce inter-cluster data movement besides. We implemented the Unified Assign and Schedule (UAS) algorithm to support cluster assignment, which has the following features: cluster assigning and scheduling are unified, and when scheduling an operation, the operation and its operands are assigned to their appropriate clusters at the same time.

【关键词】 汇编器代码生成器VLIWDSP簇分配调度UAS
【Key words】 AssemblerCode GenerationVLIW DSPcluster assigning, schedulingUAS
  • 【分类号】TP332
  • 【下载频次】203
节点文献中: 

本文链接的文献网络图示:

本文的引文网络