开源Verilog EDA工具--iverilog+GTKWave
- 1 Linux下环境安装及编译
- 2 bash脚本
iverilog+vvp+gtkwave的开源EDA工具,其中vpp已经包含在iverilog中;并且在Windows或者Linux下都有对应的版本;
- iverilog:用于编译verilog和vhdl文件,进行语法检查,生成可执行文件;
- vvp:根据可执行文件,生成仿真波形文件;
- gtkwave:用于打开仿真波形文件,图形化显示波形;
1 Linux下环境安装及编译
## 1 install
# installl iverilog
sudo apt-get install iverilog
# install gtkwave
sudo apt-get install gtkwave
## test weather to have installed
which iverilog
which vvp
which gtkwave# 2 common parameter
# basic
iverilog adder.v
vpp a.out
gtkwave xx.vcd##### iverilog to compile
# parameter
# -o, the same with gcc
iverilog demo.v -o demo.out
# -y, used to point the path of module which was instanced
iverilog demo.v -y /home/yy/inc/
# -i used to point the path of of header
iverilog demo.v -I /home/yy/inc/##### vpp to generate wave
vpp -n wave -lxt2#### gtkwave to view wavedorm
gtkwave a.vcd
2 bash脚本
把以上iverilog+vvp+gtkwave来放在一个脚本来执行;
echo "开始编译"
iverilog -o wave led_demo.v led_demo_tb.v # 使用iverilog编译器来编译两个Verilog文件,-o输出生成文件wave
echo "编译完成"
vvp -n wave -lxt2 # -n不需要图形界面,仿真编译生成的wave,指定LXT2格式的波形文件
echo "生成波形文件"
cp wave.vcd wave.lxt # 格式转换
echo "打开波形文件"
gtkwave wave.lxt # 打开文件
以上是轻便的、简易的、开源的EDA仿真工具;