当前位置: 首页 > news >正文

SystemVerilog Assertions应用指南 Chapter1.29“ disable iff构造

        在某些设计情况中,如果一些条件为真,则我们不想执行检验。换句话说,这就像是一个异步的复位,使得检验在当前时刻不工作。SVA提供了关键词“ disable iff来实现这种检验器的异步复位。“ disable iff”的基本语法如下。

disable iff (expression) <property definition>

        属性p34检查在有效开始后,信号“a”重复两次,且1个周期之后,信号“b”重复两次,再过一个时钟周期,信号“ start”为低。在整个序列过程中,如果“ reset”被检测为高,检验器会停止并默认地发出一个空成功的信号。

module disableiff;logic clk, reset, start;
logic a,b,c;initial $vcdpluson();initial
begin
clk=1'b0; reset=1'b0; start = 1'b0;
repeat(2) @(posedge clk);
reset = 1'b1; a=1'b0; b=1'b0; c=1'b0;
repeat(2) @(posedge clk) reset = 1'b0; start = 1'b1; @(posedge clk) a=1'b1;
@(posedge clk) a=1'b0;
repeat(2) @(posedge clk);
@(posedge clk) a=1'b1;
@(posedge clk) a=1'b0;
repeat(2) @(posedge clk);
@(posedge clk) b=1'b1;
@(posedge clk) b=1'b0;
repeat(2) @(posedge clk);
@(posedge clk) b=1'b1;
@(posedge clk) b=1'b0;
repeat(1) @(posedge clk);
start = 1'b0;
repeat(2) @(posedge clk);start = 1'b1;@(posedge clk) a=1'b1;
@(posedge clk) a=1'b0;
repeat(2) @(posedge clk);
@(posedge clk) a=1'b1;
@(posedge clk) a=1'b0;
repeat(2) @(posedge clk);
@(posedge clk) b=1'b1; reset = 1'b1;
@(posedge clk) b=1'b0;
repeat(2) @(posedge clk);
@(posedge clk) b=1'b1;
@(posedge clk) b=1'b0;
repeat(1) @(posedge clk);
start = 1'b0;
repeat(2) @(posedge clk);$finish();
endproperty p34;@(posedge clk) disable iff (reset) $rose(start) |=> a[=2] ##1 b[=2] ##1 !start ;
endpropertya34: assert property(p34);initial forever clk = #25 ~clk;endmodule

        图1-36显示了属性p34在模拟中的响应。标记1标出了一个有效的开始,在有效开始后,信号“a”重复为高两次,接着信号“b”重复为高两次,然后信号“ start”如期望的为低。
        在整个序列的过程中,信号“ reset”如期望的始终不被激活,因此检验在标记1e处成功。第二个有效开始由标记2s标出。在有效开始后,信号“a”重复为高两次,接着复位信号“reet”在信号“b”重复两次之前被激活。这使得检查失效,属性得到一个空成功。

http://www.lryc.cn/news/199764.html

相关文章:

  • C++设计模式之MVC
  • Windows 下Tomcat监测重启
  • 数据库管理-第112期 Oracle Exadata 03-网络与ILOM(20231020)
  • Kubeadm部署k8s集群 kuboard
  • 虚拟机如何联网【NAT】
  • 机器学习,神经网络中,自注意力跟卷积神经网络之间有什么样的差异或者关联?
  • 这件事,准备考PMP的都必须知道
  • elasticsearch常用命令
  • 2000-2021年上市公司MA并购溢价计算数据(含原始数据+Stata代码)
  • 移动端1px-从基本原理到开源解决方案介绍
  • Linux——shell外壳程序
  • 攻防世界web篇-Training-WWW-Robots
  • Docker是一个流行的容器化平台,用于构建、部署和运行应用程序。
  • 如何压缩ppt文件的大小?
  • 8个视频剪辑素材网站,免费下载
  • 常用的二十种设计模式(上)-C++
  • JS中var和let和const的区别
  • 如何利用IP定位技术进行反欺诈?
  • wireshark抓包本地IDEA xml格式报文教程以及postman调用接口
  • MySQL学习(六)——视图和触发器
  • 那些你面试必须知道的ES6知识点
  • AD9371 系列快速入口
  • Jenkins+vue发布项目
  • RSTP详解:对比STP,到底改进了什么?
  • 从0到1,申请cos服务器并上传图片到cos文件服务器
  • Stm32_标准库_15_串口蓝牙模块_手机与蓝牙模块通信_BUG修复
  • 文心一言帮忙写代码之微信小程序图片移动顺序
  • 【电子通识】USB接口三大类型图册
  • @Controller与@RestController
  • Compose Desktop 使用中的几个问题(分平台加载资源、编写Gradle 任务下载平台资源、桌面特有组件、鼠标键盘事件)