SystemVerilog iff
1 | @(posedge clk iff(vld)); |
is equivalent to
1 | forever begin |
iff
is more efficient thanif
because the expression is recalculated whenvld
transition rather thanclk
.
One example, detecting the negative edge of
rtr_io.cb.frameo_n[da]
1 | wait(rtr_io.cb.frameo_n[da] !== 0); |
[DEBUG HGUO] 6887250.0ns, rtr_io.cb.frameo_n[da] negedge
reference
system verilog中的iff, URL: https://www.francisz.cn/2019/07/18/sv-iff/