Factory overrides

In reply to dave_59:

Sorry Dave. I couldn’t understand much from the above thread. Could you please explain me how they work, especially for parameterized classes. I get type overriden with type. But, I don’t understand why it fails to get the type, eventhough I pass the actual parameter as below:


 factory.set_inst_override_by_type(
      asnc_ivc_coverage#(asnc_ivc_item)::get_type(),
      asnc_ivc_coverage_extended#(asnc_ivc_item)::get_type(),
      "*.m_tx_data_agent.*"
    );

The original class is defined as :

class asnc_ivc_coverage #(type T = asnc_ivc_item) extends uvm_subscriber #(T);

  // factory registration macro
  `uvm_component_param_utils(asnc_ivc_coverage#(T))


and my extended class as


class asnc_ivc_coverage_extended #(type T = asnc_ivc_item) extends asnc_ivc_coverage#(asnc_ivc_item);

  // factory registration macro
  `uvm_component_param_utils(asnc_ivc_coverage_extended#(asnc_ivc_item))