I have a test in which I am binding assertions to multiple instances of a module. I would like to turn off assertions for some of the modules, and would like to use $assertoff to do so. However the assertions are not getting turned off! I have checked the instance names and $assertoff syntax, but the assertions are still not being turned off. The test compiles, runs, and fails due to the assertions failing. Can anyone help with this?
Here is an example which looks like my code. Please ignore any syntax errors as this is an example I coded up quickly.
bind moduleC my_assertions #(0.00ps) iAssertions(.*);
// Test stimulus
virtual function void end_of_elaboration();
// some inputs
a_assertion_1: // some assertion
a_assertion_2: // another assertion
run_test(); // This starts the test.