节点文献

C2VHDL编译中的指针映射方法研究

Research of Methods for Pointer Mapping in C2VHDL Compiling

【作者】 杨杰

【导师】 顾国昌;

【作者基本信息】 哈尔滨工程大学 , 计算机应用技术, 2011, 硕士

【摘要】 在高性能计算领域,基于可重构技术的CPU-FPGA异构体系显示了较好的加速效果。因此,将计算密集的C代码转换为面向FPGA的VHDL程序的可重构编译技术正逐步成为一个重要趋势。C语言中的指针在面向FPGA的C2VHDL可重构编译中的转换程度将决定编译器的性能及应用范围。目前,国内外基于CPU-FPGA结构的C2VHDL编译工具已经取得了一些可喜的研究成果,但是对C语言中的指针的映射技术的相关理论研究工作还比较少。本文基于ASCRA可重构编译器设计实现了变量指针和数组指针的C2VHDL自动编译功能。根据编译指针的符号解析原理,本文提出了直接硬件映射变量指针和数组指针的方法。该方法主要采用基于CDFG的流敏感上下文敏感指针分析方法,为指针指向目标编码以及构建抽象符号表,尽可能减少不可达电路的产生;然后采用一次访存方式,移交控制权限,构建指针访存通路,生成指针访存控制信号,避免了多级指针的多次访存,在一定程度上提高了指针的硬件访存效率;最后进行存储空间布局,设计地址生成器,为指针访存提供地址流信息。实验结果表明,本文提出的研究方法可以正确地转换变量指针和数组指针,具有较好的可行性与可扩展性。与其他只支持数组指针的可重构编译器相比,本文在硬件资源占用情况以及程序运行速度两方面都能够达到相同的硬件效果。

【Abstract】 FPGA-CPU heterogeneous cooperative systems based on reconfigurable technology has a better speed-up ratio in the field of High Performance Computing. The reconfigurable technology of transferring computation-intense C code to VHDL code oriented FPGA is gradually becoming an important trend. How Pointers in C are transferred to VHDL will affect the performance of compiler and scope of application.Nowadays, research ahievements have been acquired in the C2VHDL compiling at home and abroad. But the relevant theoretical works on pointers’C2VHDL transfer are lack. The function of C2VHDL compiling of variable pointers and array pointers based on ASCRA reconfigurable compiler is designed and realized in this thesis. According to the principle of symbols analysis in compiling pointers, a direct hardware mapping method is proposed in the thesis. Flow-Sensitive Context-Sensitive pointer analysis based on Control Data Flow Graph is used, point-to targets of pointers are encoded and an abstract symbol table is constructed in order to reduce unreachable circuit generation. Then, a way of a memory accessing is used, control rights are transferred, pointer memory access channels are constructed and pointer control signals are generated. The memory access times can be reduced and the efficiency also can be improved in a certain degree by the way of a memory accessing. Finally, the layout of storage space is constructed, an address generator is designed. The experiment results show that variable pointers and array pointers can be transferred to VHDL successfully through the direct hardware mapping method and has a better feasibility and expandability. Contrasted with other compilers supporting array pointers, the same hardware effect in hardware resource and running speed can be achieved in this thesis.

节点文献中: 

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

本文的引文网络