endfunction// This method is documented in uvm_objectstaticstringtype_name="";virtualfunctionstringget_type_name();if(type_name=="")beginBUSTYPEt;t=BUSTYPE::type_id::create("t");type_name={"uvm_reg_predictor #(",t.get_type_name(),")"};endreturntype_name;endfunction// Function: pre_predict//// Override this method to change the value or re-direct the// target register//virtualfunctionvoidpre_predict(uvm_reg_itemrw);endfunction
// This method is documented in uvm_object// TODO: Is it better to replace this with://| `uvm_type_name_decl($sformatf("uvm_reg_predictor #(%s)", BUSTYPE::type_name())staticfunctionstringtype_name();staticstringm_type_name;if(m_type_name=="")beginBUSTYPEt;t=BUSTYPE::type_id::create("t");m_type_name={"uvm_reg_predictor #(",t.get_type_name(),")"};endreturnm_type_name;endfunction// type_namevirtualfunctionstringget_type_name();returntype_name();endfunction:get_type_name// @uvm-ieee 1800.2-2020 auto 19.3.3.2virtualfunctionvoidpre_predict(uvm_reg_itemrw);endfunctionlocaluvm_predict_sm_pending[uvm_reg];// Function- write//// not a user-level method. Do not call directly. See documentation// for the ~bus_in~ member.//
// Clear the state of the predictor including the pending writes.//// @uvm-contrib This API is being considered for potential contribution to 1800.2virtualfunctionvoidflush();m_pending.delete();endfunctionendclass