• 中国计算机学会会刊
  • 中国科技核心期刊
  • 中文核心期刊

Computer Engineering & Science ›› 2025, Vol. 47 ›› Issue (06): 958-967.

• High Performance Computing • Previous Articles     Next Articles

FT-Format: A configurable hardware code fast formatting tool

CHEN Guixiang1,2,LIU Sheng1,2,GUO Yang1,2   

  1. (1.College of Computer Science and Technology,National University of Defense Technology,Changsha 410073;
    2.Key Laboratory of Advanced Microprocessor Chips and Systems,Changsha 410073,China)

  • Received:2024-10-23 Revised:2024-11-01 Online:2025-06-25 Published:2025-06-26

Abstract: Ensuring proper format of hardware code is easily overlooked but crucial in integrated circuit design as it directly impacts code readability and maintainability. While existing formatting tools have gained widespread application, they do have inherent limitations, especially for hardware description languages. To bridge this gap, after evaluating mainstream formatting tools, this paper proposes FT-Format, a Python-based hardware code formatting tool that enables efficient and rapid formatting while allowing user-customizable adjustments. To quantitatively assess the tool’s processing quality, two self-checking algorithms for error formats are  designed. Experimental results demonstrate that FT-Format achieves an impressive average processing speed of 25 381 lines of code per second, and successfully passes validation via the self-checking algorithms. Furthermore, equivalence verification confirms that FT-Format maintains the logical consistency of hardware code throughout the formatting process. 

Key words: hardware description language, formatting, efficient, configurable