System verilog SystemVerilog:如何断言模块内部的信号?
我对Verilog(当然还有SystemVerilog)还是个新手。我有一个RTL模块来测试它的功能。我试图使用断言来实现这一点,而不是应用刺激然后观察它,这样我的模块就可以重用了 总之,我的断言如下所示:System verilog SystemVerilog:如何断言模块内部的信号?,system-verilog,assertion,system-verilog-assertions,System Verilog,Assertion,System Verilog Assertions,我对Verilog(当然还有SystemVerilog)还是个新手。我有一个RTL模块来测试它的功能。我试图使用断言来实现这一点,而不是应用刺激然后观察它,这样我的模块就可以重用了 总之,我的断言如下所示: always @(posedge start_test) if (read == 1'b1 && test_type == 3'b001 && read_enable_pulse == 1'b0) assert property(read_test
always @(posedge start_test)
if (read == 1'b1 && test_type == 3'b001 && read_enable_pulse == 1'b0)
assert property(read_test)
$display("@%0dn read fail injection passed",$time)
else ("@%0dn read fail injection passed",$time);
property read_test;
@(posedge tckg) start_test |-> ##8 ((test_done == 1'b1) && (test_pass == 1'b0));
endproperty
在这种情况下,我有一个read\u enable\u pulse
信号,该信号位于模块内部,并且
我希望从测试台级别看到它,而不绑定(我也不知道如何绑定)
我试图将testbenchmodule.mymodule.read\u enable\u pulse
放在read\u enable\u pulse
的位置,以遍历层次结构,但它似乎不起作用
有人知道怎么做吗?既然您已经在
testbenchmodule
(我假设这就是您编写断言的地方),请尝试引用mymodule.read\u enable\u pulse
。这应该可以工作,因为Verilog中允许分层路径
如果这不起作用(由于模拟器的限制),那么几乎所有模拟器都提供了可用于监控内部信号的系统功能。例如,Cadence有$nc\u mirror
,Mentor有$init\u signal\u spy
。有关这方面的更多信息,请参阅模拟器手册。解释“不工作”的含义