assert_range_logic.v
来自「OVL——基于断言的verilog验证 Verilog数字系统设计:RTL综合」· Verilog 代码 · 共 50 行
V
50 行
// Accellera Standard V1.0 Open Verification Library (OVL).
// Accellera Copyright (c) 2005. All rights reserved.
parameter assert_name = "ASSERT_RANGE";
`include "std_ovl_task.h"
`ifdef OVL_INIT_MSG
initial
ovl_init_msg_t; // Call the User Defined Init Message Routine
`endif
`ifdef OVL_ASSERT_ON
always @(posedge clk) begin
if (`OVL_RESET_SIGNAL != 1'b0) begin
if (((test_expr)<min) || ((test_expr)>max)) begin
ovl_error_t("");
end
end
end // always
`endif // OVL_ASSERT_ON
`ifdef OVL_COVER_ON
reg [width-1:0] prev_test_expr;
always @(posedge clk) begin
if (`OVL_RESET_SIGNAL != 1'b0 && coverage_level != `OVL_COVER_NONE) begin
prev_test_expr <= test_expr;
if (test_expr != prev_test_expr) begin
ovl_cover_t("cover_test_expr_change covered");
end
if (test_expr == min) begin
ovl_cover_t("cover_test_expr_at_min covered");
end
if (test_expr == max) begin
ovl_cover_t("cover_test_expr_at_max covered");
end
end
end // always
`endif // OVL_COVER_ON
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?