Skip to main content

Icarus Verilogを用いて高速なデバッグを実現する

· 2 min read
Whatacotton
embedding enthusiast (beginner)

はじめに​

Vivado のシミュレーターを使用してテストベンチを実行する場合、最低でも数十秒〜数分かかると思います。

Vivado 内蔵の IP モジュールを使用している場合はしょうがないですが、小規模なロジックで正確性もあまり必要ない場合は、サードパーティ製の Verilog 実行環境を用いることで時間を短縮することができます。

またこの様な実行環境は Vivado などの EDA ツールを使用する必要がないため、ディスク容量を圧迫することがありません。

Icarus Verilog​

私がよく使っている実行環境はIcarus Verilogというものです。

Icarus Verilog

Icarus Verilog is an implementation of the Verilog hardware description language compiler that generates netlists in the desired format (EDIF) and a simulator. It supports the 1995, 2001 and 2005 versions of the standard, portions of SystemVerilog, and some extensions. (Wikipedia より)

使い方​

iverilog の実行 System Verilog の場合は-g2012オプションをつけることで読み込めます。 top module の指定は-sで行います。

$ iverilog <target>

すると a.out というファイルが生成されます。-oオプションで出力ファイル名を指定できます。

vvp ./a.outを実行するとシミュレーションが実行されます。

./a.outだけでも実行できます。

参考​

Icarus Verilog に関しては日本語の文献もそこそこあるので下記リンクよりご確認ください。