除了Verilog建模之外,还可以编写断言或检查器以实现零延迟/宽度毛刺?

问题描述 投票:0回答:2

我正在验证时钟本身,想知道是否有办法标记零宽度毛刺?

verilog system-verilog uvm system-verilog-assertions
2个回答
2
投票

这应该起作用。

property check_for_glitch_fall(clk, bit disable_chk);
  realtime fall_time;
  disable iff(disable_chk)
   @(posedge clk)
     (1, fall_time = $realtime) |=>
   @(negedge clk)
     (($realtime - fall_time) != 0);  
endproperty : check_for_glitch_fall

0
投票
initial begin 
    #100 
    a=0; 
    b=0; 
    #10 
    a=1;
    b=1;
    #100
    forever 
        #10 a = ~a; 
end
initial begin
    #500
    $finish;
end

always @(a) begin 
    $display("%f edge on a %d", $realtime, a); 
    b=1; 
    b=0; 
end

always @(b) begin 
    $display("%f edge on b %d", $realtime, b); 
    a=0; 
    a=1; 
end
© www.soinside.com 2019 - 2024. All rights reserved.