# verilog_study **Repository Path**: two_salted_eggs/verilog_study ## Basic Information - **Project Name**: verilog_study - **Description**: 使用iverilog开源工具学习和仿真verilog - **Primary Language**: Verilog - **License**: MulanPSL-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 1 - **Forks**: 0 - **Created**: 2022-08-29 - **Last Updated**: 2023-05-27 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README [toc] ## 环境安装见[HELP.md](./HELP.md) ## 编译测试 ```bash python(3) build.py led_demo ``` ## 新建测试 1. 在根目录创建一个文件夹 2. 在文件夹内编写RTL源码和test bench源码 - tb文件中必须包含以下代码,用于生成vcd文件 ```verilog /*iverilog */ initial begin $dumpfile("wave.vcd"); //生成的vcd文件名称 $dumpvars(0, led_demo_tb); //tb模块名称 end /*iverilog */ ``` - tb中测试逻辑必须以$stop结束 ```verilog initial begin sys_clk = 1'b0; sys_rst_n = 1'b0; #60 sys_rst_n = 1'b1; #1000 //仿真执行1000ns $stop; //必须要这个,iverilog停止仿真 end ``` 3. 在根目录运行build.py + 源码目录