Files
IC-Coder-Plugin/tools/iverilog/examples/counter.v
Roe-xin 22b9a0ed13 feat:接入iverilog工具
- 将iverilog可以随着插件的下载而下载
- 用户输入自然语言就可以控制生成对应的VCD文件
2025-12-15 11:09:03 +08:00

18 lines
328 B
Verilog

// 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