?? taskdemo.v
字號:
module TaskDemo;
// Illustrates use of a task in a testbench.
//
// The task "CycleB" causes the signal "b" to
// oscillate for a specified number of pulses.
// For example, "CycleB(3)" will cause "b"
// to pulse three times.
reg a,b;
initial begin
a = 0;
CycleB ( 7 );
#30 a = 1;
CycleB ( 3 );
#40 a = 0;
CycleB ( 5 );
#20 a = 1;
#50 $finish;
end
task CycleB;
input [3:0] cnt;
integer k;
begin
for (k=0; k<cnt; k=k+1) begin
#5 b=1;
#5 b=0;
end
end
endtask
endmodule
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -