// format.//// @uvm-accellera The details of this API are specific to the Accellera implementation, and are not being considered for contribution to 1800.2classuvm_reg_err_serviceextendsuvm_object;`uvm_object_utils(uvm_reg_err_service)staticuvm_reg_err_serviceinst;// Function : get()// Called by the library when a supported uvm_reg error occurs. Returns an// instance of the standard UVM library class if set() has not been called or // has been called with a null instance; otherwise, returns the instance // passed to set().//// @uvm-accellera The details of this API are specific to the Accellera implementation, and are not being considered for contribution to 1800.2staticfunctionuvm_reg_err_serviceget();if(inst==null)inst=uvm_reg_err_service::type_id::create("uvm_inst");returninst;
if((actual&valid_bits_mask)===(expected&valid_bits_mask))return1;elsebeginuvm_reg_err_serviceerr_service;err_service=uvm_reg_err_service::get();err_service.do_check_error(this,expected,actual,map,valid_bits_mask);return0;endendfunctionfunctionvoiduvm_reg_err_service::do_check_error(uvm_regthis_reg,uvm_reg_data_texpected,uvm_reg_data_tactual,uvm_reg_mapmap,uvm_reg_data_tvalid_bits_mask);uvm_reg_fieldfields[$];`uvm_error("RegModel",$sformatf("Register \"%s\" value read from DUT (0x%h) does not match mirrored value (0x%h) (valid bit mask = 0x%h)",