In reply to markylew:
All assertions labels must be unique.
Also, watch the syntax and the use of the end of statement “:”.
module m;
bit Reset, clock;
always @* begin
ERR_reset_went_unknown: assert(!$isunknown(Reset))
else $error("ERR_reset_went_unknown");
end
always @* begin
ERR_reset_went_unknown2: assert(!$isunknown(Reset));
// else $error("ERR_reset_went_unknown");
end
always @* begin //The always @* trigger will also catch the 0-to-X/Z-to-1 transitions
ERR_reset_went_unknown3: assert(!$isunknown(Reset));
assert(!$isunknown(Reset));
end
initial begin
repeat(2) @(posedge clock);
$finish;
end
endmodule
Ben Cohen
http://www.systemverilog.us/ ben@systemverilog.us
For training, consulting, services: contact http://cvcblr.com/home
** SVA Handbook 4th Edition, 2016 ISBN 978-1518681448
…
- SVA Package: Dynamic and range delays and repeats SVA: Package for dynamic and range delays and repeats - SystemVerilog - Verification Academy
- Free books: Component Design by Example https://rb.gy/9tcbhl
Real Chip Design and Verification Using Verilog and VHDL($3) https://rb.gy/cwy7nb - Papers:
- SVA Alternative for Complex Assertions
https://verificationacademy.com/news/verification-horizons-march-2018-issue - SVA in a UVM Class-based Environment
https://verificationacademy.com/verification-horizons/february-2013-volume-9-issue-1/SVA-in-a-UVM-Class-based-Environment - Understanding the SVA Engine,
Verification Horizons