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