Reporting of assertion failures as uvm_errors

In reply to tomrohit:

In reply to ben@SystemVerilog.us:
Ben,
What if rtl design has $error and I cannot edit that file? Is there a way to overwrite $error with `uvm_error?

Apologies, the $error should have been a uvm_error as shown in the assertion example. Yes, you can substitute $error with uvm_error anywhere.

ap_handshake : assert property ($rose(req) |=> ##[0:4] ack) else
        `uvm_error(tID, $sformatf("%m req = %0h, ack=%0h",            
              $sampled(req), $sampled (ack)));   // Line 23    

Ben Cohen
http://www.systemverilog.us/ ben@systemverilog.us