//with `UVM_ERROR Macro - 1ST CODE
`ifndef DDR2_MSG_ERR
`define DDR2_MSG_ERR(id,msg) `uvm_error(id,msg)
`endif
property p_ddr2_nop_aftr_precharge_all(assert_id,msg);
@(posedge ddr2_intf.clk) (`PRECHARGE_ALL_OP) |-> ##[0:20000000] ((!`NOP_OP),`DDR2_MSG_ERR(assert_id,msg));
endproperty : p_ddr2_nop_aftr_precharge_all
assert property(p_ddr2_nop_aftr_precharge_all("PRECHARGE_CHECK","FAILED"))
else begin
$display("Passed");
end
//With $error - 2ND CODE
property p_ddr2_nop_aftr_precharge_all(assert_id,msg);
@(posedge ddr2_intf.clk) (`PRECHARGE_ALL_OP) |-> ##[0:20000000] ((!`NOP_OP),$error("FAILED ::%s",{assert_id,msg}));
endproperty : p_ddr2_nop_aftr_precharge_all
assert property(p_ddr2_nop_aftr_precharge_all("PRECHARGE_CHECK","FAILED"))
else begin
$display("Passed");
end
1st Code : I have used UVM_ERROR, Simulator is not taking and we are getting Compile error.
2nd COde : I have used $error, Now its working fine.
Can someone tell me Why this is happening? If I want to use uvm display messages , What is the solution?