ハードウェア記述言語におけるコードクローンの定量的調査

Bibliographic Information

Other Title
  • Quantitative Investigation of Code Clones in Hardware Description Language

Search this article

Abstract

ハードウェア記述言語は,Field Programmable Gate Array(FPGA)開発などで回路の構造を定義するために用いられる言語である.近年のFPGAの利用拡大により,ハードウェア記述言語(HDL)を用いた回路開発の効率化が課題となっている.そこで,我々はソースコード中の重複あるいは類似したコード片であるコードクローンに着目した.ソフトウェアにおいて,コードクローンは開発効率を低下させる一因として研究されている.本論文では,代表的なHDLであるVerilog HDLを対象としたコードクローン検出手法を提案し,コードクローンの特徴について調査した結果について述べる.提案するコードクローン検出手法は,Verilog HDLのソースコードに簡単な変換を適用することで,既存のツールを用いてコードクローンを検出する.評価の結果,提案手法は90%以上の精度でコードクローンを検出できた.また,提案手法を用いてコードクローンの量と複雑さについて分析した結果,CやJavaと同様にコードクローンが存在し,支援を要することが確認された.ソフトウェアと同様に,Verilog HDLのコードクローンに対しても同時編集支援やドキュメント化などの管理は有用である.一方で,Verilog HDLにおけるコードクローンはリファクタリングによる集約を行う場合に回路性能とのトレードオフを考慮する必要がある.

A hardware description language (HDL) is a computer language used to describe the structure and behavior of digital logic circuits including field programmable gate arrays (FPGAs). The rapid growth of FPGA usage requires us to make circuit development involving HDLs more efficient. In this paper, we focus on code clones in HDLs. Code clones are the similar segments of code that are typically created when the code is copied from one place to another. In software development, code clones are considered to decrease development efficiency. To study code clones in HDLs, we developed a code clone detection method for Verilog HDL, which is the most popular HDL. In this method, we apply simple conversion rules to the Verilog HDL code so that we can use existing code clone detection tools for traditional programming languages. The experiments showed that the accuracy of the proposed detection method was about 90%. We compared code clones in Verilog HDL with those in Java and C based on the metrics to identify the differences among languages. We found that the tool support for consistent modification over clone sets is also useful for Verilog HDL. However, aggregating clone sets in Verilog HDL must take into consideration the trade-offs between computational parallelism and circuit footprints.

Journal

Related Projects

See more

Details 詳細情報について

Report a problem

Back to top