【SVA】assertion局部变量的应用

版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接: https://blog.csdn.net/lbt_dvshare/article/details/102743392
  • 创建计数器

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

猜你喜欢

转载自blog.csdn.net/lbt_dvshare/article/details/102743392