※ pipe_agent.sv
class pipe_agent_c extends uvm_agent;
  `uvm_component_utils(pipe_agent_c)

  uvm_active_passive_enum is_active = UVM_ACTIVE;  
  
  pipe_sequencer_c pipe_sequencer;
  pipe_driver_c pipe_driver;
  pipe_monitor_c pipe_monitor;
  
  function new(string name, uvm_component parent);
    super.new(name, parent);
  endfunction
 
  function void build_phase(uvm_phase phase);
    super.build_phase(phase);
    `uvm_info(get_type_name(), $sformatf("build_phase() starts.."), UVM_LOW)
    if (is_active == UVM_ACTIVE) begin
      `uvm_info(get_type_name(), $sformatf("is_active = UVM_ACTIVE"), UVM_LOW)
      pipe_sequencer = pipe_sequencer_c::type_id::create("pipe_sequencer", this);
      pipe_driver = pipe_driver_c::type_id::create("pipe_driver", this);      
    end
    pipe_monitor = pipe_monitor_c::type_id::create("pipe_monitor", this);
  endfunction
  
  function void connect_phase (uvm_phase phase);
    super.connect_phase(phase);
    
    if (is_active == UVM_ACTIVE) begin
      pipe_driver.seq_item_port.connect(pipe_sequencer.seq_item_export);
    end
  endfunction

endclass