计算机应用 ›› 2018, Vol. 38 ›› Issue (7): 2024-2031.DOI: 10.11772/j.issn.1001-9081.2018010062

• 计算机软件技术 • 上一篇    下一篇

面向高层次综合的自定义指令自动识别方法

肖成龙, 林军, 王珊珊, 王宁   

  1. 辽宁工程技术大学 软件学院, 辽宁 葫芦岛 125105
  • 收稿日期:2018-01-08 修回日期:2018-03-02 出版日期:2018-07-10 发布日期:2018-07-12
  • 通讯作者: 林军
  • 作者简介:肖成龙(1984-),男,湖南祁阳人,副教授,博士,CCF会员,主要研究方向:软硬件协同设计、高层次综合、可扩展处理器自定义指令识别;林军(1993-),男,辽宁庄河人,硕士研究生,主要研究方向:高层次综合、可扩展处理器自定义指令识别;王珊珊(1985-),女,河北沧州人,讲师,硕士,CCF会员,主要研究方向:嵌入式系统、计算机体系结构;王宁(1993-),女,辽宁朝阳人,硕士研究生,主要研究方向:嵌入式系统。
  • 基金资助:
    国家自然科学基金资助项目(61404069);辽宁省教育厅科学研究一般项目(LJYL048);辽宁省科技厅博士启动基金资助项目(20141140)。

Automatic custom instructions identification method for high level synthesis

XIAO Chenglong, LIN Jun, WANG Shanshan, WANG Ning   

  1. School of Software, Liaoning Technical University, Huludao Liaoning 125105, China
  • Received:2018-01-08 Revised:2018-03-02 Online:2018-07-10 Published:2018-07-12
  • Supported by:
    This work is partially supported by the National Natural Science Foundation of China (61404069), the General Project for Scientific Research of Liaoning Provincial Education Department (LJYL048), the Doctoral Startup Foundation of Liaoning Provincial Science and Technology Department (20141140).

摘要: 针对在高层次综合(HLS)过程中性能提升、功耗降低困难等问题,提出了一种面向高层次综合的自定义指令自动识别方法。在高层次综合过程之前实现对自定义指令的枚举和选择,从而为高层次综合提供通用的自定义指令识别方法。首先,将高层次源代码转换为控制数据流图(CDFG),实现了对源代码的预处理;其次,基于控制数据流图内的数据流图(DFG),采用子图枚举算法以自底而上的方式枚举出所有连通凸子图,有效提高了用户可灵活修改约束条件的能力;然后,分别从面积、性能和代码量三个角度考虑,利用子图选择算法选择部分最佳子图作为最终的自定义指令;最后,用所选的自定义指令重新生成新代码作为高层次综合工具的输入。与传统高层次综合相比,采用基于出现频率的模式选择可平均减少19.1%的面积,采用基于关键路径的子图选择可平均减少22.3%的时延。此外,与TD算法相比,所提算法的枚举效率平均提升70.8%。实验结果表明,自定义指令自动识别方法使高层次综合在电路设计中能够显著地提升性能,减少面积和代码量。

关键词: 自定义指令, 数据流图, 子图枚举算法, 子图选择算法, 高层次综合

Abstract: Aiming at the problems that it is difficult to improve performance and reduce power consumption in the process of High Level Synthesis (HLS), an automatic custom instructions identification method for high level synthesis was proposed. The enumeration and selection of custom instructions were implemented before high level synthesis, so as to provide a universal automatic custom instructions identification method for high level synthesis. Firstly, the high level source code was transformed into a Control Data Flow Graph (CDFG), and the source code was preprocessed. Secondly, a subgraph enumeration algorithm was used to enumerate all the connected convex subgraphs in a bottom-up manner from the Data Flow Graph (DFG) based on control data flow graph, which effectively improved the user's ability to flexibly modify the constraints. Then, considering the area, performance and code size, the subgraph selection algorithms were used to select partial optimal subgraphs as the final custom instructions. Finally, a new code was regenerated by incorporating the selected custom instructions as the input of high level synthesis. Compared with the traditional high level synthesis, the pattern selection based on frequency of occurrence reduced the area by an average of 19.1%. Meanwhile, the subgraph selection based on critical paths reduced the latency by an average of 22.3%. In addition, compared with Transitive Digraph (TD) algorithm, the enumeration efficiency of the proposed algorithm was increased by an average of 70.8%. The experimental results show that the automatic custom instructions identification method can significantly improve performance and reduce area and code size for high level synthesis in circuit design.

Key words: custom instruction, Data Flow Graph (DFG), subgraph enumeration algorithm, subgraph selection algorithm, High Level Synthesis (HLS)

中图分类号: