📄 counter_simtb.tf
字号:
module testbench();
// DATE: Mon Apr 28 15:26:36 2003
// TITLE:
// MODULE: counter_sim
// DESIGN: counter_sim
// FILENAME: counter_sim
// PROJECT: counter_sim
// VERSION: Version
// Inputs
reg CLK;
reg RESET;
// Outputs
wire [7:0] COUNT;
// Bidirs
initial
$monitor($time, " COUNT = %d RESET = %b", COUNT[7:0], RESET);
// Instantiate the UUT
counter_sim uut (
.CLK(CLK),
.RESET(RESET),
.COUNT(COUNT)
);
// Stimulate the RESET signal
initial begin
RESET = 1'b1;
#45 RESET = 1'b0;
#200 RESET = 1'b1;
#50 RESET = 1'b0;
end
// Set up the clock to toggle every 100 time units
initial begin
CLK = 1'b0;
forever #10 CLK=~CLK;
end
//Finish the simulation at time 400
initial begin
#400 $finish;
end
endmodule
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -