In reply to MayurKubavat:
You’re correct, I don’t know why this is tool dependent.
The following worked on another tool
$assertoff(0, test.checkB.BB.CHECKB); // 34
On the immediate assertion in a class, I believe that the $assertcontrol $assertoff) is not supported, and that makes sense for the following reasons:
- Concurrent assertions are not allowed in classes
- The simulator creates a database for each assertion to manage its status and state; that includes things like started, pass/fail, success/fail count, strong/weak, etc.
- That database is done at elaboration time.
- Adding to that database the immediate assertions that are created dynamically (i.e., from class instances) is complicated.
Adding a switch seem to be only possible solution for this.
correct.
class A;
bit a = 0, assertion_enb;
task checkA;
//begin : cc // not needed
#10ns;
if (assertion_enb && !a) // CHECK: assert(a == 1)
// $display($time, "Check on A passed");
// else
$display($time, "Check on A failed");
//end
endtask
endclass
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
- 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
- Real Chip Design and Verification Using Verilog and VHDL, 2002 isbn 978-1539769712
- 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