📄 cnt99_tb.tf
字号:
module testbench();
// Inputs
reg clk;
reg reset;
// Outputs
wire [3:0] one_out;
wire [3:0] ten_out;
// Instantiate the UUT
counter uut (
.clk(clk),
.reset(reset),
.one_out(one_out),
.ten_out(ten_out)
);
// Initialize Inputs
initial
$monitor ($time, "clk=%b, reset=%b, ten_out=%d, one_out=%d", clk, reset, ten_out, one_out);
initial //Initialize input signals
begin
clk = 0;
reset = 0;
#35 reset=1; //Disable RESET at 35 units
end
initial
begin
forever #10 clk=~clk; //Set clock with a period 20 units
end
initial #400 $finish; //Complete simulation after 400 units
endmodule
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -