# Super.build\_phase(phase ) usage issue

**URL:** <https://verificationacademy.com/forums/t/super-build-phase-phase-usage-issue/34968>\
**Category:** UVM\
**Tags:** UVM, uvm\_env\
**Created:** [September 3, 2018, 7:10am UTC](https://verificationacademy.com/forums/t/super-build-phase-phase-usage-issue/34968 "2018-09-03T07:10:28Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![vedant\_gala](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/v/eb9ed0/32.png) [@vedant\_gala](https://verificationacademy.com/forums/u/vedant_gala)\
**Post date:** [September 3, 2018, 9:52am UTC](https://verificationacademy.com/forums/t/super-build-phase-phase-usage-issue/34968/3 "2018-09-03T09:52:09Z")

</div>

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:

```verilog

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)

```verilog

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

```

---

_[View the full topic](https://verificationacademy.com/forums/t/super-build-phase-phase-usage-issue/34968)._
