How to check if UVM analysis port is connected?

Often our UVM simulations fail with signatures that we end up debugging to disconnected analysis ports.

Is there a way to check if the analysis ports are connected to run_phase?

+4
source share
3 answers

This is not a UVM requirement to which analysis ports are connected. However, some UVM components will not work correctly if their analysis ports are not connected.

In these cases, I recommend checking the analysis import connections during end_of_elaboration_phase:

`CHECK_PORT_CONNECTION(my_analysis_imp)

If the specified macro is defined as follows:

`define CHECK_PORT_CONNECTION(PORT) \
  begin \
    uvm_port_list list; \
    PORT.get_provided_to(list); \
    if (!list.size()) begin \
      `uvm_fatal("AP_CONNECT", \
        $sformatf("Analysis port %s not connected.", PORT.get_full_name())); \
    end \
  end

: http://www.edaplayground.com/x/2YG

+5

. , . , , w.r.t uvm_analysis_imp. uvm_analysis_imp_decl. . . http://www.edaplayground.com/x/3qx

NB: , : (

+1

, , uvm_port_base:: resol_bindings. , . , imp size() , imp. , 3 imp, 1, .

+1

Source: https://habr.com/ru/post/1524549/


All Articles