feat:接入iverilog工具
- 将iverilog可以随着插件的下载而下载 - 用户输入自然语言就可以控制生成对应的VCD文件
This commit is contained in:
17
tools/iverilog/examples/counter.v
Normal file
17
tools/iverilog/examples/counter.v
Normal file
@ -0,0 +1,17 @@
|
||||
// counter.v - 简单的 4 位计数器模块
|
||||
|
||||
module counter (
|
||||
input wire clk,
|
||||
input wire rst_n,
|
||||
output reg [3:0] count
|
||||
);
|
||||
|
||||
always @(posedge clk or negedge rst_n) begin
|
||||
if (!rst_n) begin
|
||||
count <= 4'b0000;
|
||||
end else begin
|
||||
count <= count + 1;
|
||||
end
|
||||
end
|
||||
|
||||
endmodule
|
||||
Reference in New Issue
Block a user