# Simulation doubt

**URL:** <https://verificationacademy.com/forums/t/simulation-doubt/35448>\
**Category:** UVM\
**Tags:** UVM\
**Created:** [December 12, 2018, 6:14am UTC](https://verificationacademy.com/forums/t/simulation-doubt/35448 "2018-12-12T06:14:43Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![tech\_savvy](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/t/d2c977/32.png) [@tech\_savvy](https://verificationacademy.com/forums/u/tech_savvy)\
**Post date:** [December 12, 2018, 6:14am UTC](https://verificationacademy.com/forums/t/simulation-doubt/35448/1 "2018-12-12T06:14:43Z")

</div>

In simulation i am getting such type of report:  
Name type size value  
uvm\_test\_top ei\_usb30\_base\_test - @464  
uvm\_30\_env ei\_usb30\_env - @477

Q1) my question is what is this value?  
Q2) how to check functional coverage in questa?

---

<div class="post-metadata">

**Author:** ![warnerrs](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/w/858c86/32.png) [@warnerrs](https://verificationacademy.com/forums/u/warnerrs)\
**Post date:** [December 12, 2018, 6:39am UTC](https://verificationacademy.com/forums/t/simulation-doubt/35448/2 "2018-12-12T06:39:55Z")

</div>

_In reply to [tech\_savvy](https://verificationacademy.com/forums/t/simulation-doubt/35448):_

> Q1) my question is what is this value?

That’s a number made up by the simulator to represent an object.

> Q2) how to check functional coverage in questa?

Please contact your vendor directly for tool support.

---

<div class="post-metadata">

**Author:** ![tech\_savvy](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/t/d2c977/32.png) [@tech\_savvy](https://verificationacademy.com/forums/u/tech_savvy)\
**Post date:** [December 12, 2018, 6:45am UTC](https://verificationacademy.com/forums/t/simulation-doubt/35448/3 "2018-12-12T06:45:12Z")

</div>

_In reply to [warnerrs](https://verificationacademy.com/forums/t/simulation-doubt/35448/2):_

Q1) So does this value keep changes(for respective object) whenever i do simulation?

---

<div class="post-metadata">

**Author:** ![warnerrs](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/w/858c86/32.png) [@warnerrs](https://verificationacademy.com/forums/u/warnerrs)\
**Post date:** [December 12, 2018, 6:59am UTC](https://verificationacademy.com/forums/t/simulation-doubt/35448/4 "2018-12-12T06:59:18Z")

</div>

_In reply to [tech\_savvy](https://verificationacademy.com/forums/t/simulation-doubt/35448/3):_

In my experience, the tools use a deterministic algorithm to generate those numbers. However you can’t actually rely on that being the same from one sim to the next, as any number of little things could slightly perturb the algorithm ( it’s undocumented ).

On the other hand, during the course of a single simulation, that number should be constant for a given object. So,

```verilog
Klass k = new;
Klass j = new;
Klass i = new;

$write( "k=@%0d, j=@%0d, i=@%0d\n", k, j, i );

```

Will print something like:  
[pre]k=@1, j=@2, i=@3[/pre]

And the same number for those objects, should print for the remainder of the simulation. This is a big assumption on my part. I haven’t seen an SV LRM requirement that requires that. But I’ve used multiple simulators, and so far that’s the behavior I’ve seen.

---

<div class="post-metadata">

**Author:** ![avidan](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/a/dfb087/32.png) [@avidan](https://verificationacademy.com/forums/u/avidan)\
**Post date:** [December 13, 2018, 6:18am UTC](https://verificationacademy.com/forums/t/simulation-doubt/35448/5 "2018-12-13T06:18:03Z")

</div>

@warnerrs, you’re right in your observation but wrong in your conclusion :-). It is not the tools that generate these numbers but UVM itself. The number is a UVM object instance id, accessible via the uvm\_object::get\_inst\_id(). For every uvm\_object that UVM creates, it increments the ID. Therefore it will remain constant as long at you don’t change either your code (creating new objects, changing the order of creation), or your simulator (which might trigger changes to order of execution anyway).

[m\_inst\_id code on github](https://github.com/accellera/uvm/blob/master/distrib/src/base/uvm_object.svh#L798-L802)

[code that prints top question on github](https://github.com/accellera/uvm/blob/master/distrib/src/base/uvm_printer.svh#L694-L729)

---

<div class="post-metadata">

**Author:** ![warnerrs](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/w/858c86/32.png) [@warnerrs](https://verificationacademy.com/forums/u/warnerrs)\
**Post date:** [December 13, 2018, 6:51am UTC](https://verificationacademy.com/forums/t/simulation-doubt/35448/6 "2018-12-13T06:51:17Z")

</div>

_In reply to [avidan](https://verificationacademy.com/forums/t/simulation-doubt/35448/5):_

@avidan, I never traced back to the source of those numbers, but I noticed they behaved just like my example $write() statement. Thanks for that detail, thanks makes a lot of sense.
