My guess is you have confused super.build_phase with super.bui1d_phase. Also I see you have written “virtuaf” instead of “virtual” (Although that could be an issue on my end only).
I have corrected (most of) your code so you may wanna reconsider:
class example_agent extends uvm_agent;
example_sequencer #(example_transaction) m_sequencer ;
example_driver m_driver ;
example_monitor m_monitor ;
uvm_analysis_port # (example_transaction) monitor_ap ;
virtual dut_if v_dut_if;
virtual function void build_phase (uvm_phase phase) ;
super.build_phase(phase ) ;
m_monitor = example_monitor::type_id::create("m_monitor", this);
monitor_ap = new("monitor_ap", this) ;
if ( get_is_active() == UVM_ACTIVE ) begin
m_sequencer = example_sequencer::type_id::create("m_sequencer", this);
m_driver = example_driver::type_id::create("m_driver", this);
end
endfunction : build_phase
virtual function void connect_phase (uvm_phase phase);
m_monítor.monitor_ap.connect(monitor_ap ) ;
if ( get_is_active() == UVM_ACTTVE ) begin
m_drÍver.seq_item_port.connect(m_sequencer.seq_item_export) ;
end
endfunction : connect_phase
endclass
By calling super.build_phase(phase) you are actually calling the build phase of the parent class from which your class has been extended (in this case, the parent class would be uvm_agent) and hence you are calling the build_phase of uvm_agent file (that is stored somewhere in a file as a part of the uvm methodology source file package)
package my_testbench_pkg;
import uvm_pkg::*;
// The UVM sequence, transaction item, and driver are in these files:
`include "my_sequence.svh"
`include "my_driver.svh"
// The agent contains sequencer, driver, and monitor (not included)
class my_agent extends uvm_agent;
`uvm_component_utils(my_agent)
my_driver driver;
uvm_sequencer#(my_transaction) sequencer;
function new(string name, uvm_component parent);
super.new(name, parent);
endfunction
virtual function void build_phase(uvm_phase phase);
super.build_phase(phase );
driver = my_driver ::type_id::create("driver", this);
sequencer =
uvm_sequencer#(my_transaction)::type_id::create("sequencer", this);
endfunction
endclass