In reply to Jayaraj:
In reply to ben@SystemVerilog.us:
one addition to above; the signal which i check want to be HIGH for all remaining clk cycles & it should not go unknown(X).
assert_check: assert property(@(posedge clk) disable iff (rst) $rose (signal) |=> !($isunknown (signal)) & stable(signal)[*]) else $error();[/quote]
Change the above assertion to:
// [*$] is illegal, use the always(property)
// 1800
// property_expr ::= ....
// always property_expr
// | always [ cycle_delay_const_range_expression ] property_expr
// | s_always [ constant_range] property_expr
// Do you need the $error? Ok if you want it.
assert_check: assert property(@(posedge clk) disable iff(rst)
$rose (signal) |=> always(
!$isunknown(signal) && $stable(signal)); // else $error();
// To avoid multiple threads, you could do the following:
initial begin
wait(rst==1'b0); // use whatever variation you need)
assert_check: assert property(@(posedge clk) disable iff(rst)
$rose (signal)[->1] |=> always(
!$isunknown(signal) && $stable(signal)); // else $error();
end
Ben Cohen
http://www.systemverilog.us/ ben@systemverilog.us
For training, consulting, services: contact Home - My cvcblr
- SVA Handbook 4th Edition, 2016 ISBN 978-1518681448
- Real Chip Design and Verification Using Verilog and VHDL, 2002 isbn 978-1539769712
- A Pragmatic Approach to VMM Adoption 2006 ISBN 0-9705394-9-5
- Using PSL/SUGAR for Formal and Dynamic Verification 2nd Edition, 2004, ISBN 0-9705394-6-0
- Component Design by Example ", 2001 ISBN 0-9705394-0-1
- VHDL Coding Styles and Methodologies, 2nd Edition, 1999 ISBN 0-7923-8474-1
- VHDL Answers to Frequently Asked Questions, 2nd Edition ISBN 0-7923-8115