问题标签 [system-verilog-assertions]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
system-verilog - 如何使用 SystemVerilog 断言中的立即断言检查信号是否未更改
我是 SystemVerilog 断言的新手,我知道我可以使用并发断言检查信号是否在时钟滴答之间没有变化:
但是我将如何持续使用立即断言呢?这是我在网上找到的一个例子,但我不确定它是否是我需要的以及它是如何工作的:
system-verilog-assertions - 数据复用器 SVA 比较
我在为这种情况设计断言(SVA)时遇到了麻烦。当 mux sel 被置位时,data_in 预计会稳定 2 个时钟;mux sel 被断言之前的时钟,以及 mux sel 被断言时的当前时钟。
现在 data_in 是一个宽向量/总线信号,因此总线的某些位在功能模式期间是 Z 和 X(这是预期的),而这些位可能在非功能模式期间携带值。
这意味着,设计 SVA 的方法是在 mux sel 被断言时逐位比较数据总线。
这是我的方法,但 SVA 失败了,不知道为什么。
有关如何设计此 SVA 的任何建议?
谢谢。
system-verilog - 基于事件触发的 SV 断言
假设 SV 接口包含一个并发断言属性。是否可以仅在触发事件时启用此断言?我尝试在接口文件的任务中写入属性,但最终出现错误:接近“属性”:语法错误,意外属性。
谢谢你。
system-verilog - 带有或 (||) 的 Systemverilog 属性含义未按预期工作?
我正在尝试编写 sytemverilog 断言以确定时钟周期(140MHz),任意 + 或 - 值为 0.001ns,在此 systemverilog 属性中,此 systemverilog 属性使用“或”运算符(||)用于时间周期的 +/- 偏差/变化,但输出不符合预期,任何人都可以解释这个的确切原因是什么?对于 clk_prd 的任何值,断言都会被断言,这不是预期的,还请提及这个的最佳解决方案是什么?
下面的代码片段,
电流输出:
预期产出
(参考链接)
system-verilog - Unexpected SVA assertion behavior for a periodic signal
Quoting from a book "Systemverilog Assertions and Functional Coverage", Ashok Mehta on page 42,
@ (posedge clk) a |=> !a; In the above sequence, let us say that variable ‘a’ changes to ‘1’ the same time that the sampling edge clock goes posedge clk (and assume ‘a’ was ‘0’ before it went to a ‘1’). Will there be a match of the antecedent ‘a’? No! Since a’ went from ‘0’ to ‘1’ the same time that clock went posedge clk, the value of ‘a’ sampled by clock will be ‘0’ (preponed region) and not ‘1’. This will not cause the property to trigger because the antecedent is not evaluated to be true. This will confuse you during debug. You would expect ‘1’ to be sampled and the property triggered thereof. However, you will get just the opposite result. This is a very important point to understand because in a simulation waveform (or for that matter with Verilog $monitor or $strobe) you will see a ‘1’ on ‘a’ with posedge clk and would not understand why the property did not fire or why it failed (or passed for that matter). Always remember that at the sampling edge, the ‘previous’ value (i.e. a delta before the sampling edge in the preponed region) of the sampled variable is used.
I tried to test this scenario by this Testbench. However I expected assertion to FAIL at simulation times #10, #50, #90
But when I ran on EDAPlayground using VCS, I got a different behavior
system-verilog - 仅参考 System Verilog 中的较低索引
我有一个位数组 A[32][16]。
我想检查是否有任何较低的索引值具有某种模式。
例如。
A[1][8:0] 可能具有该模式 A[2][8:0] 也可能具有该模式。
A[31 - 0][8:0] 中的任何东西都可能具有这种模式。有没有办法在单个语句中引用所有更高索引的组件。
类似 A[5'bxxxxx][8:0] 的东西?
system-verilog - 为什么 Quartus Prime 不想忽略用于仿真的 systemverilog 断言?
我有以下属性声明并签入我的系统 verilog 文件之一:
这基本上检查了信号 mc.outvec.StepOutP_o 生成的脉冲宽度
当我尝试编译设计时,Quartus Prime 在这个属性声明上失败,说
错误 (10170):在 steppingcontroller.sv(404) 文本附近出现 Verilog HDL 语法错误:“]”;期待一个操作数。检查并修复紧接在指定关键字之前或处出现的任何语法错误。英特尔 FPGA 知识数据库包含许多文章,其中包含有关如何解决此错误的具体细节。访问 https://www.altera.com/support/support-resources/knowledge-base/search.html上的知识数据库 并搜索此特定错误消息编号。
现在,我想,在分析和综合过程中,这些属性声明和相关断言被完全忽略,因为它们只涉及模拟。但显然情况并非如此。Modelsim(原始导师图形版本)编译它没有问题,并且断言也符合预期。Quartus verilog 编译设置设置为 'SystemVerilog'
如何:
使属性规范与 quartus 编译器兼容?
或设置编译器忽略这些断言?
谢谢
system-verilog - systemverilog 断言 - 重置后如何忽略第一个事件
我写了以下断言:
我想表达输入信号稳定的 20 个时钟周期,在第 21 个周期,输出必须与输入具有相同的值。
这个有效,但前提是我确保在重置期间 Signal_ia 的状态没有变化。如果我断言复位,改变 Signal_ia 的状态,然后释放复位,这个条件总是失败。这通常发生在我使用 Signal_ia = 'X' 开始模拟并且在重置期间它变为 '0' 时。
有没有办法更好地写这个?响应。有没有办法在重置后忽略第一个事件,因为它可能由于重置时发生的情况而跳闸?如果我理解得很好,如果保证,这个断言在重置期间会被忽略。我试图描述的效果有一些延迟,理想情况下,我不仅需要在复位时忽略这种情况,而且在复位状态取消断言后的 20 个周期内也需要忽略这种情况。
感谢:D。
system-verilog - 如何使用测试中的 assertoff 来禁用侧面 uvm 对象中的断言
我正在寻找为某些测试禁用侧面 uvm 组件中的断言的方法。下面的简单代码代表我的环境,并附有需求注释。我以为我可以使用 $assertoff。如果需要额外的仪器来实现这一点,我可以修改 uvm 组件。