# Why function new() is used in derived class in UVM testbench?

**URL:** <https://verificationacademy.com/forums/t/why-function-new-is-used-in-derived-class-in-uvm-testbench/42921>\
**Category:** UVM\
**Tags:** SystemVerilog, UVM, function-new, UVM-driver-and-sequence, UVM-Driver\
**Created:** [April 20, 2020, 2:48am UTC](https://verificationacademy.com/forums/t/why-function-new-is-used-in-derived-class-in-uvm-testbench/42921 "2020-04-20T02:48:37Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![nimitz\_class](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/n/e9c0ed/32.png) [@nimitz\_class](https://verificationacademy.com/forums/u/nimitz_class)\
**Post date:** [April 20, 2020, 2:48am UTC](https://verificationacademy.com/forums/t/why-function-new-is-used-in-derived-class-in-uvm-testbench/42921/1 "2020-04-20T02:48:37Z")

</div>

```verilog

class simple_driver extends uvm_driver#(simple_item);
simple_item item;
virtual dut_if vif;

`uvm_component_utils(simple_driver)
function new(string name = "simple_driver",uvm_component parent);
super.new(name, parent)
endfunction

function build_phase()

endfunction
//

task XYZ();

endtask
//

endclass

```

My question is, why do we need function new() and what does it do?

Thanks in advance

---

<div class="post-metadata">

**Author:** ![dave\_59](https://verificationacademy.com/forums/user_avatar/verificationacademy.com/dave_59/32/4499_2.png) [@dave\_59](https://verificationacademy.com/forums/u/dave_59)\
**Post date:** [April 20, 2020, 3:00am UTC](https://verificationacademy.com/forums/t/why-function-new-is-used-in-derived-class-in-uvm-testbench/42921/2 "2020-04-20T03:00:55Z")

</div>

_In reply to [sriharifoxtrot](https://verificationacademy.com/forums/t/why-function-new-is-used-in-derived-class-in-uvm-testbench/42921):_

This is a general SystemVerilog requirement. See [https://verificationacademy.com/forums/uvm/why-we-need-mention-name-super.newname#reply-88061](https://verificationacademy.com/forums/uvm/why-we-need-mention-name-super.newname#reply-88061)

For uvm\_component, see [https://verificationacademy.com/forums/uvm/uvm-component-constructor#reply-75321](https://verificationacademy.com/forums/uvm/uvm-component-constructor#reply-75321)
