我尝试将期望与以下属性一起使用
module tb;
logic a;
logic clk=0;
default clocking @(posedge clk); endclocking
always
#5ns clk = ~clk;
initial begin
$dumpfile("dump.vcd"); $dumpvars;
$display("START");
a = 0;
#100ns;
a = 1;
#100ns;
$finish;
end
initial begin
#10ns;
expect(@(posedge clk) 1 ##1 $changed(a) |-> 1) $display("SUCCESS"); else
$display("FAIL");
end
endmodule
预期会阻塞直到在 100ns 从 0 变为 1 吗?