// Need to make sure that registered report catchers are added. This// way users don't need to set up uvm_report_object as a super type.uvm_report_objecto;`ifndefUVM_NO_GLOBAL_CATCHER_DUPL_CHKintqn;`endifif($cast(o,obj))beginuvm_queue#(uvm_callback)qr;void'(uvm_callbacks#(uvm_report_object,uvm_callback)::get());qr=uvm_callbacks#(uvm_report_object,uvm_callback)::m_t_inst.m_tw_cb_q;for(inti=0;i<qr.size();++i)q.push_back(qr.get(i));end`ifndefUVM_NO_GLOBAL_CATCHER_DUPL_CHK// Following change is done to avoid global catcher getting duplicated // if instance-specific one is added laterqn=q.size();for(inti=0;i<m_t_inst.m_tw_cb_q.size();++i)beginq.push_back(m_t_inst.m_tw_cb_q.get(i));// Don't add if already added by the implicit super::uvm_report_objectfor(intj=0;j<qn;j++)beginif(q.get(j)==m_t_inst.m_tw_cb_q.get(i))beginvoid'(q.pop_back());break;endendend`else
for(inti=0;i<m_t_inst.m_tw_cb_q.size();++i)q.push_back(m_t_inst.m_tw_cb_q.get(i));end//check if already exists in the queueif(m_cb_find(q,cb)!=-1)beginuvm_report_warning("CBPREG",{"Callback object ",cb.get_name()," is already registered"," with object ",obj.get_full_name()},UVM_NONE);endelsebeginif(ordering==UVM_APPEND)q.push_back(cb);elseq.push_front(cb);endendendfunction
endfunction// @uvm-ieee 1800.2-2020 auto 10.7.2.5staticfunctionvoidget_all(refCBall_callbacks[$],inputTobj=null);uvm_queue#(uvm_callback)q;CBcb;CBcallbacks_to_append[$];CBunique_callbacks_to_append[$];void'(get());if((obj==null)||(!m_pool.exists(obj)))begin// Only typewide callbacks existfor(intqi=0;qi<m_t_inst.m_tw_cb_q.size();++qi)if($cast(cb,m_t_inst.m_tw_cb_q.get(qi)))callbacks_to_append.push_back(cb);endelsebegin// No need to do anything special with typewide,