System verilog 如何用系统verilog断言检查大于特定值的未知脉冲宽度信号

System verilog 如何用系统verilog断言检查大于特定值的未知脉冲宽度信号,system-verilog,duration,assertion,system-verilog-assertions,System Verilog,Duration,Assertion,System Verilog Assertions,我试图用系统verilog断言检查信号是否有大于特定值的未知脉冲 下面是我的代码。但是我被绊倒了。 我不知道如何检查未知脉冲宽度的信号。 请告诉我 试验#1->如果信号未知脉冲小于规格未知,则捕捉有效脉冲。所以我失败了 property unknown_detect; realtime start_time; realtime end_time; @(sig iff ($root.TB.vpwrup && US && ~cnt_x))

我试图用系统verilog断言检查信号是否有大于特定值的未知脉冲

下面是我的代码。但是我被绊倒了。 我不知道如何检查未知脉冲宽度的信号。 请告诉我

试验#1->如果信号未知脉冲小于
规格未知
,则捕捉有效脉冲。所以我失败了

property unknown_detect;
    realtime start_time;
    realtime end_time;
    @(sig iff ($root.TB.vpwrup && US && ~cnt_x))
        ($isunknown(sig), start_time = $time) |=> (~$isunknown(sig)&&(($time-start_time) <= SPEC_UNKNOWN));
endproperty : unknown_detect

unknown_assert : assert property(unknown_detect)
property unknown_detect;
    realtime start_time;
    realtime end_time;
    realtime diff_x;
    @(sig iff ($root.TB.vpwrup && US && ~cnt_x))
        ($isunknown(sig), start_time = $time) |=> (~$isunknown(sig), end_time = $time, diff_x = end_time - start_time);
  end

endproperty : unknown_detect
unknown_assert : assert property(unknown_detect)

我想知道信号在特定时间内何时进入未知状态。

并发断言在任何时间戳的前置区域中采样值。本质上,这意味着断言看到的是任何信号的先前值,而不是在该时间戳中更新的值。

这是关键,你需要记住

因此,对于您的要求,这里是您需要的- 将信号视为断言时钟滴答声,如果采样信号值有效(非未知)且下一个采样值未知,则时差不应高于您的标准

下面是相应的断言

property unknown_detect;
    realtime start_time;
    @(sig iff ($root.TB.vpwrup && US && ~cnt_x))
        (~$isunknown(sig), start_time = $time) ##1 $isunknown(sig) |-> ($time - start_time) <= SPEC_UNKNOWN;
endproperty : unknown_detect

unknown_assert : assert property(unknown_detect)
属性未知\u检测;
实时启动时间;
@(sig iff($root.TB.vpwrup&&US&&cnt_x))

(~$isunknown(sig),start#u time=$time)##1$isunknown(sig)|->($time-start_time)任何时间戳的预先定义区域中的并发断言样本值。本质上,这意味着断言看到的是任何信号的先前值,而不是在该时间戳中更新的值。

这是关键,你需要记住

因此,对于您的要求,这里是您需要的- 将信号视为断言时钟滴答声,如果采样信号值有效(非未知)且下一个采样值未知,则时差不应高于您的标准

下面是相应的断言

property unknown_detect;
    realtime start_time;
    @(sig iff ($root.TB.vpwrup && US && ~cnt_x))
        (~$isunknown(sig), start_time = $time) ##1 $isunknown(sig) |-> ($time - start_time) <= SPEC_UNKNOWN;
endproperty : unknown_detect

unknown_assert : assert property(unknown_detect)
属性未知\u检测;
实时启动时间;
@(sig iff($root.TB.vpwrup&&US&&cnt_x))
(~$isunknown(sig),start_time=$time)##1$isunknown(sig)|->($time-start_time)