Research and Implementation of Embedded Assembly and Pragma Based on IMPACT

Author
LuShiXian
Advisor
ZhengQiLong
School
University of Science and Technology of China
Major
Computer Software and Theory
Classification
TP368.1 Microprocessor
Degree
Master's thesis
Year
2011
Downloads
14
Citations
0

Request the full text

Abstract

Digital Signal Processor (DSP) uses the architecture that is different from the general processor, so the compiler that uses the traditional compile techniques can’t generate code that can meet the performance requirement of digital processing. Untraditional compile techniques need to be developed to handle the problem. The pragma and the embedded assembly language are two feasible and popular methods of the methods adopted by the industry.BWDSP100 is a high performance DSP which is developed by some domestic institute. Our work discussed by the paper is to design and implement the pragma and the embedded assembly language for BWDSP100. We use the famous retargeting compiler IMPACT as our compile infrastructure.Pragma related work includes the design and implementation. We designed three kinds of pragma which are pragma DATA_ALIGN, pragma DATA_MEM_BANK and pragma DATA_SECTION for BWDSP100. Pragma DATA_ALIGN and pragma DATA_MEM_BANK are mainly used to solve the problem caused by the call between a C source code and the hand-written assembly library. Pragma DATA_SECTION is used to locate the data among the several memory blocks. We also develop an optimization algorithm which uses the information of pragma DATA_SCTION to allocate AGU for address computing instructions and memory access instructions. Experiments show that the algorithm is very effective in optimization. The implementation requires that the information of pragma can be represented in the IMPACT’s high level intermediate representation Pcode and the IMPACT’s low level intermediate representation Lcode exactly.We design the syntax and semantics of the embedded assembly language for BWDSP100 and implement the embedded assembly language in IMPACT. The design of the embedded assembly language not only refers to the industry’s existing designs but also refers to features of BWDSP100’s instructions. The compiler’s frontend and backend need to be changed to implement the embedded assembly language. Compiler frontend translates the embedded assembly statement into Lcode form of embedded assembly, which involves the conversion from abstract syntax tree to the Pcode and the conversion from Pcode to Lcode. The stages of backend that should be changed include instruction clustering, register allocation and instruction scheduling. In this paper, the stages influenced by the embedded assembly language are described in detail.

Table of contents

Abstract 4-5 ABSTRACT 5-10 Chapter 1 Introduction 10-14 1.1 introduced back 10-11 < br /> 1.1.1 traditional C language compiler limitations of the field in the DSP 10 1.1.2 DSP and relocatable compiler 10-11 1.2 Research Significance 11 1.3 research 11-12 1.4 Thesis Organization 12-14 Chapter 2 BWDSP100 the C language compiler BWCC 14-26 2.1 BWDSP architecture 14-15 2.2 BWCC developed presentation 15-16 2.3 IMPACT intermediate code 16 < br /> 2.4 Pcode 16-23 2.4.1 Pcode memory structures and text structures 16-19 2.4.2 The syntax and semantics of the text Pcode 19-21 2.4.3 Pcode generation 21-23 2.5 Lcode and compiler backend 23-25 ?? 2.6 Chapter Summary 25-26 Chapter 3 BWDSP100 pragma Design and Implementation 26-42 3.1 Introduction 26 3.2 compiler directives DATA_ALIGN and DATA_MEM_BANK 26 -31 3.3 DSP block memory structures and their impact on the compilation 31-32 3.4 compiler directives DATA_SECTION 32-33 3.5 address calculation and memory access instruction optimization 33-41 3.5.1 ud-based du chain and chain-related instruction fetch allocation algorithm 34-39 3.5.2 ud-based du chain and chain The instruction fetch related allocation algorithm experimental evaluation 39-41 3.6 Summary 41-42 Chapter 4 BWDSP100 Design and implementation of embedded assembler 42-62 4.1 Introduction 42 4.2 Embedded assembler syntax and semantics 42-45 4.3 Examples of use embedded assembler 45-46 4.4 embedded assembly to the front end of 46-48 4.5 embedded assembler on the back end of 48-61 4.5.1 embedded assembly of sub- Cluster module of 49-51 4.5.2 Embedded assembler impact on the register allocation module 51-59 4.5.3 for instruction scheduling of 59-61 4.6 Test 61 4.7 Chapter Summary 61-62 Chapter 5 summarizes 62-64 5.1 of this article Work 62-63 5.2 contribution of this paper 63 5.3 Job Outlook 63-64 Appendix A illustrations Index 64-66 Appendix B table index 66-67 References 67-70 Thanks 70-71 papers published during the reading and participation in research projects. 71

Related dissertations

  1. Design and Implementation of an embedded assembler software testing platform