# \#new

**URL:** https://verificationacademy.com/forums/tag/new/6082.md

[Latest](https://verificationacademy.com/forums/latest.md) · [Categories](https://verificationacademy.com/forums/categories.md) · [Tags](https://verificationacademy.com/forums/tags.md)

---

## [Why does new() construction start extended class not base class?](https://verificationacademy.com/forums/t/why-does-new-construction-start-extended-class-not-base-class/41951)

<div class="topic-metadata">

**Author:** [@UVM\_LOVE](https://verificationacademy.com/forums/u/UVM_LOVE)\
**Replies:** 1\
**Last updated:** [July 18, 2023, 5:52am UTC](https://verificationacademy.com/forums/t/why-does-new-construction-start-extended-class-not-base-class/41951 "2023-07-18T05:52:47Z")

</div>

Trying to understand the order of new(). Mostly extended class constructed by new() firstly then it assigns to the base class. Is there any reason not construct base class first then extended class? C c= new; D…

---

## [Value Assignment Dynamic Array without new()](https://verificationacademy.com/forums/t/value-assignment-dynamic-array-without-new/41006)

<div class="topic-metadata">

**Author:** [@Kj](https://verificationacademy.com/forums/u/Kj)\
**Replies:** 2\
**Last updated:** [January 20, 2023, 6:59am UTC](https://verificationacademy.com/forums/t/value-assignment-dynamic-array-without-new/41006 "2023-01-20T06:59:07Z")

</div>

module top; integer da4\[\]; initial begin da4='{1,2,3,4}; $display("da4=%p",da4); end endmodule Result: da4='{1,2,3,4}; Doubt: Can we assign value in Dynamic array without using new();

---

## [What is the difference between tb =new("tb", this); and tb=new();?](https://verificationacademy.com/forums/t/what-is-the-difference-between-tb-new-tb-this-and-tb-new/39593)

<div class="topic-metadata">

**Author:** [@UVM\_LOVE](https://verificationacademy.com/forums/u/UVM_LOVE)\
**Replies:** 3\
**Last updated:** [September 23, 2021, 1:08pm UTC](https://verificationacademy.com/forums/t/what-is-the-difference-between-tb-new-tb-this-and-tb-new/39593 "2021-09-23T13:08:37Z")

</div>

Hi. I’m trying to know the difference between tb =new(“tb”, this); and tb=new(); I thought both are the same but case1 has no Error. but case2 has got error. What equivalent to tb =new(“tb”, this);? case1. class bas…

---

## [Function new() in user defined UVM classes](https://verificationacademy.com/forums/t/function-new-in-user-defined-uvm-classes/38785)

<div class="topic-metadata">

**Author:** [@bachan21](https://verificationacademy.com/forums/u/bachan21)\
**Replies:** 3\
**Last updated:** [March 6, 2021, 6:07pm UTC](https://verificationacademy.com/forums/t/function-new-in-user-defined-uvm-classes/38785 "2021-03-06T18:07:56Z")

</div>

// constructor function new (string name, uvm\_component parent); super.new(name, parent); endfunction : new Why do we have to declare new constructor in every extended UVM class as its already available in UVM b…

---

## [Need of function new in every object/component class](https://verificationacademy.com/forums/t/need-of-function-new-in-every-object-component-class/38567)

<div class="topic-metadata">

**Author:** [@bachan21](https://verificationacademy.com/forums/u/bachan21)\
**Replies:** 1\
**Last updated:** [January 9, 2021, 6:17pm UTC](https://verificationacademy.com/forums/t/need-of-function-new-in-every-object-component-class/38567 "2021-01-09T18:17:19Z")

</div>

Why do we need function new() in every user defined classes extending from UVM base classes? What will happen if we don’t define in user defined classes?

---

## [How exactly the new() function is allocating memory in systemverilog](https://verificationacademy.com/forums/t/how-exactly-the-new-function-is-allocating-memory-in-systemverilog/36401)

<div class="topic-metadata">

**Author:** [@satya369](https://verificationacademy.com/forums/u/satya369)\
**Replies:** 4\
**Last updated:** [August 13, 2019, 3:48pm UTC](https://verificationacademy.com/forums/t/how-exactly-the-new-function-is-allocating-memory-in-systemverilog/36401 "2019-08-13T15:48:30Z")

</div>

Can anyone please tell me how exactly the new() method is allocating memory? I’m using it almost everywhere but don’t know the implementation code for this method. Thanks in advance…! Regards Sumanth

---

## [Parent parameter for new function in agent class](https://verificationacademy.com/forums/t/parent-parameter-for-new-function-in-agent-class/34292)

<div class="topic-metadata">

**Author:** [@verif\_learner1](https://verificationacademy.com/forums/u/verif_learner1)\
**Replies:** 7\
**Last updated:** [April 4, 2018, 4:38pm UTC](https://verificationacademy.com/forums/t/parent-parameter-for-new-function-in-agent-class/34292 "2018-04-04T16:38:12Z")

</div>

This is the new function in agent class. This is a reference code I am using for my project. function spi\_agent::new(string name = "spi\_agent", uvm\_component parent = null); super.new(name, parent); endfunction As t…

---

## [Regarding Construct in Class](https://verificationacademy.com/forums/t/regarding-construct-in-class/33006)

<div class="topic-metadata">

**Author:** [@Devam\_J](https://verificationacademy.com/forums/u/Devam_J)\
**Replies:** 5\
**Last updated:** [April 5, 2017, 4:19am UTC](https://verificationacademy.com/forums/t/regarding-construct-in-class/33006 "2017-04-05T04:19:31Z")

</div>

Without constructing the new() construct, how to access the task &/or function of a particular class.?
