-
创建计数器
property check_counter;
int L_cnt;
@(posedge clk)
(
($rose(start),L_cnt = 0)##1
(1,L_cnt = L_cnt+1)[*0:$] ##1 (L_cnt == 30) |-> (irq ==1)
);
endproperty
-
可变的时钟延迟
property check_counter;
int L_cnt;
@(posedge clk)iff(!rst_n)
(
($fell(start),L_cnt = 30)##1
(1,L_cnt = L_cnt-1)[*0:$] ##1 (L_cnt == 0) |-> (irq == 1)
);
endproperty