# Timescale in log

**URL:** <https://verificationacademy.com/forums/t/timescale-in-log/29280>\
**Category:** UVM\
**Tags:** UVM, reporting, uvm-info\
**Created:** [March 25, 2014, 5:03pm UTC](https://verificationacademy.com/forums/t/timescale-in-log/29280 "2014-03-25T17:03:23Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![meir](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/m/2acd7d/32.png) [@meir](https://verificationacademy.com/forums/u/meir)\
**Post date:** [March 25, 2014, 5:03pm UTC](https://verificationacademy.com/forums/t/timescale-in-log/29280/1 "2014-03-25T17:03:23Z")

</div>

how can the timescale in `uvm\_info()be changed.  
currently the default testbench timscale is being used  
which is determined by the smallest time resolution

---

<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:** [March 25, 2014, 5:34pm UTC](https://verificationacademy.com/forums/t/timescale-in-log/29280/2 "2014-03-25T17:34:46Z")

</div>

Use $timeformat

---

<div class="post-metadata">

**Author:** ![Chetan\_Shah](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/c/7c8e57/32.png) [@Chetan\_Shah](https://verificationacademy.com/forums/u/Chetan_Shah)\
**Post date:** [April 1, 2014, 1:08pm UTC](https://verificationacademy.com/forums/t/timescale-in-log/29280/3 "2014-04-01T13:08:37Z")

</div>

Hi Meir,

Use $timeformat in your tb top file in below manner.

// Set Time Format  
initial  
begin  
$timeformat(time unit, precision number, suffix string, and minimum field width);

```
end

```

The $timeformat system task performs the following two functions:  
1)It specifies how the %t format specification reports time information for the $write, $display,$strobe, $monitor, $fwrite, $fdisplay, $fstrobe, and $fmonitor group of system tasks.  
2)It specifies the time unit for delays entered interactively.

The units number argument shall be an integer in the range from 0 to -15. This argument represents the time unit as shown in table

Unit number Time unit Unit number Time unit  
0 1 s -8 10 ns  
-1 100 ms -9 1 ns  
-2 10 ms -10 100 ps  
-3 1 ms -11 10 ps  
-4 100 us -12 1 ps  
-5 10 us -13 100 fs  
-6 1 us -14 10 fs  
-7 100 ns -15 1 fs

Syntax : $timeformat(time unit, precision number, suffix string, and minimum field width);

Best Regards,  
Chetan Shah  
Sr. ASIC Verification Engineer (Level 1) | ASIC

Product Engineering Services  
Software | Embedded | Semiconductor  
www.einfochips.com  
Frost & Sullivan Company of the Year 2013-14
