# \#Copy

**URL:** https://verificationacademy.com/forums/tag/copy/4798.md

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

---

## [How is deep copy and shallow copy executed in clone\[create+copy\] method together?](https://verificationacademy.com/forums/t/how-is-deep-copy-and-shallow-copy-executed-in-clone-create-copy-method-together/29739)

<div class="topic-metadata">

**Author:** [@himanshuchauhan](https://verificationacademy.com/forums/u/himanshuchauhan)\
**Replies:** 4\
**Last updated:** [June 5, 2025, 1:31pm UTC](https://verificationacademy.com/forums/t/how-is-deep-copy-and-shallow-copy-executed-in-clone-create-copy-method-together/29739 "2025-06-05T13:31:42Z")

</div>

Hi there, I was learning about difference between copy and clone method in uvm. In which I found some info about it which confuses me, Difference 1 : Clone() : It gives the shallow copy of the object Copy() : It giv…

---

## [About the depth variable in uvm\_object::copy source code](https://verificationacademy.com/forums/t/about-the-depth-variable-in-uvm-object-copy-source-code/41559)

<div class="topic-metadata">

**Author:** [@flhcherish](https://verificationacademy.com/forums/u/flhcherish)\
**Replies:** 1\
**Last updated:** [April 22, 2023, 6:33am UTC](https://verificationacademy.com/forums/t/about-the-depth-variable-in-uvm-object-copy-source-code/41559 "2023-04-22T06:33:25Z")

</div>

Hi In uvm\_object::copy method which inside UVM source code, there is one static variable named as depth. Could you help clarify why it is needed here, I have no idea what its purpose. Thank you Longhui

---

## [Use of $cast to copy values](https://verificationacademy.com/forums/t/use-of-cast-to-copy-values/38846)

<div class="topic-metadata">

**Author:** [@bachan21](https://verificationacademy.com/forums/u/bachan21)\
**Replies:** 4\
**Last updated:** [March 18, 2021, 7:08am UTC](https://verificationacademy.com/forums/t/use-of-cast-to-copy-values/38846 "2021-03-18T07:08:11Z")

</div>

I used the following code to copy data in the object “item” to “pkt” $cast(pkt,item); Then I have performed an operation on “pkt” object. But I observed that same changes are appearing on “item” also when I printed the…

---

## [Why UVM copy actually clones the object members?](https://verificationacademy.com/forums/t/why-uvm-copy-actually-clones-the-object-members/38611)

<div class="topic-metadata">

**Author:** [@run2prem](https://verificationacademy.com/forums/u/run2prem)\
**Replies:** 1\
**Last updated:** [January 19, 2021, 11:43am UTC](https://verificationacademy.com/forums/t/why-uvm-copy-actually-clones-the-object-members/38611 "2021-01-19T11:43:47Z")

</div>

import uvm\_pkg::\*; \`include "uvm\_macros.svh" //ENV Configuration class env\_cfg extends uvm\_object; rand bit a; rand bit b; \`uvm\_object\_utils\_begin(env\_cfg) \`uvm\_field\_int (a, UVM\_DEFAULT) \`uvm\_field\_i…

---

## [Copy only first column of a 2-D queue](https://verificationacademy.com/forums/t/copy-only-first-column-of-a-2-d-queue/36677)

<div class="topic-metadata">

**Author:** [@abisha](https://verificationacademy.com/forums/u/abisha)\
**Replies:** 4\
**Last updated:** [October 16, 2019, 5:32pm UTC](https://verificationacademy.com/forums/t/copy-only-first-column-of-a-2-d-queue/36677 "2019-10-16T17:32:19Z")

</div>

Hi All, Is there any method to copy a single column of a 2D queue directly to another queue? something like the following (which didnt work): dbg\_base transq\[:31\]\[:3\]; dbg\_base transq\_r1c1\[$:31\]; transq\_r1c1 = {tran…

---

## [Why doesn't UVM allow to clone/copy of uvm register map?](https://verificationacademy.com/forums/t/why-doesnt-uvm-allow-to-clone-copy-of-uvm-register-map/32613)

<div class="topic-metadata">

**Author:** [@kerulmodi](https://verificationacademy.com/forums/u/kerulmodi)\
**Replies:** 0\
**Last updated:** [December 4, 2016, 12:22pm UTC](https://verificationacademy.com/forums/t/why-doesnt-uvm-allow-to-clone-copy-of-uvm-register-map/32613 "2016-12-04T12:22:32Z")

</div>

Hi, I am curious about clone/copy of uvm\_reg\_map as in UVM, there is commented code of do\_copy and do\_clone function inside uvm\_reg\_map.svh file I would like to know reason behind this. // clone function uvm\_object u…
