通过北京交通大学的网课学习Verilog HDL
入门。
- 视频地址:https://www.bilibili.com/video/BV1hX4y137Ph
- 在
Ubuntu WSL
上使用VS Code
、Icarus Verilog
和GTKWave
的开源解决方案进行Testbench
仿真。
可以使用apt-get
包管理器安装Icarus Verilog
和GTKWave
:
sudo apt-get install iverilog
sudo apt-get install gtkwave
要使用iVerilog
生成仿真波形文件,需要在Testbench
中加入如下代码:
initial begin
$dumpfile("file_tb.vcd");
$dumpvars;
end
通过以下指令编译综合以及查看仿真结果:
iverilog -o file_tb file.v
vvp file_tb
gtkwave file_tb.vcd