# Working of $monitor

**URL:** <https://verificationacademy.com/forums/t/working-of-monitor/51558>\
**Category:** SystemVerilog\
**Tags:** monitor, monitor-SV-System-Function\
**Created:** [February 17, 2026, 5:57pm UTC](https://verificationacademy.com/forums/t/working-of-monitor/51558 "2026-02-17T17:57:54Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Praveen\_Kakodra](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/p/c77e96/32.png) [@Praveen\_Kakodra](https://verificationacademy.com/forums/u/Praveen_Kakodra)\
**Post date:** [February 17, 2026, 5:57pm UTC](https://verificationacademy.com/forums/t/working-of-monitor/51558/1 "2026-02-17T17:57:55Z")

</div>

Hi All,

When testing the following code

```verilog
module tb;  
  bit clk ; 
  
  int unsigned sig ;
  
  always #5 clk = !clk;
  
  always@(posedge clk) begin
    sig <= sig + 1;
  end  
  
  initial $monitor("At T:%0t sig is %0d",$time,sig);
  
  initial #30 $finish();
endmodule

```

I observe that $monitor executes at time 0 units.

As per LRM

```verilog
When a $monitor task is invoked with one or more arguments, the simulator sets
up a mechanism whereby each time a variable or an expression in the argument 
list changes value—with the exception of the $time,$stime, or $realtime system 
functions—the entire argument list is displayed at the end of the time step as
if reported by the $display task. If two or more arguments change value at the
same time, only one display is produced that shows the new values.

```

(1) Since sig remains at default value of 0 (there is no change in it’s value), why does $monitor execute at time 0 ?

(2) From the above LRM quote, what is the meaning of `with the exception of the $time,$stime, or $realtime system functions` ?

Thanks

---

<div class="post-metadata">

**Author:** ![gsulliva](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/g/eb9ed0/32.png) [@gsulliva](https://verificationacademy.com/forums/u/gsulliva)\
**Post date:** [February 17, 2026, 6:27pm UTC](https://verificationacademy.com/forums/t/working-of-monitor/51558/2 "2026-02-17T18:27:41Z")

</div>

Strictly speaking, you are correct. The simulator really shouldn’t display anything at time 0. If you really want to know why, you should ask the simulator vendor. If you want to avoid seeing a message at time 0, use $display in a clocked “always” block instead of $monitor. That is the recommended approach.

$monitor is not sensitive to the $time argument, which means you will not get a message only when the simulation time changes. You see that in your output. You don’t get a message at time 1, 2, 3, 4. You only get a message when “sig” changes.

---

<div class="post-metadata">

**Author:** ![cgales](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/c/ccd318/32.png) [@cgales](https://verificationacademy.com/forums/u/cgales)\
**Post date:** [February 17, 2026, 6:53pm UTC](https://verificationacademy.com/forums/t/working-of-monitor/51558/3 "2026-02-17T18:53:40Z")

</div>

There is additional information in that paragraph:

A call to $monitoron shall produce a display immediately after it is invoked, regardless of whether a value change has taken place; this is used to establish the initial values at the beginning of a monitoring session. By default, the monitor flag is turned on at the beginning of simulation.

I interpret this to mean that the initial call to $monitor will also produce a display immediately after it is invoked.

---

<div class="post-metadata">

**Author:** ![Praveen\_Kakodra](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/p/c77e96/32.png) [@Praveen\_Kakodra](https://verificationacademy.com/forums/u/Praveen_Kakodra)\
**Post date:** [February 17, 2026, 8:00pm UTC](https://verificationacademy.com/forums/t/working-of-monitor/51558/4 "2026-02-17T20:00:15Z")

</div>

Thanks @cgales.

I had a strong intuition that it wasn’t a tool related issue ( since all had the same output )

---

<div class="post-metadata">

**Author:** ![Praveen\_Kakodra](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/p/c77e96/32.png) [@Praveen\_Kakodra](https://verificationacademy.com/forums/u/Praveen_Kakodra)\
**Post date:** [February 17, 2026, 8:08pm UTC](https://verificationacademy.com/forums/t/working-of-monitor/51558/5 "2026-02-17T20:08:55Z")

</div>

> [@gsulliva](#):
>
> You don’t get a message at time 1, 2, 3, 4. You only get a message when “sig” changes.

I believe **simulation would advance only in steps of 5N units** ( where N \>= 0 )

i.e 0 units ( due to initial block ) , 5 units , 10 units , 15 units etc ( due to `always ##5 …` )

---

<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:** [February 17, 2026, 10:15pm UTC](https://verificationacademy.com/forums/t/working-of-monitor/51558/6 "2026-02-17T22:15:17Z")

</div>

The LRM needs a bit of clarification here. All output from $monitor gets scheduled in the _postponed_ event region-- it is not immediate. (see Section _4.4.2.9 Postponed events region_). The LRM should be corrected to say

> A call to `$monitor` or `$monitoron` shall produce a display in the postponed event region immediately after it is invoked, …

SystemVerilog is defined in terms of a discrete event simulation algorithm, which means that simulation time is merely a bookkeeping measure. It is solely used to maintain the relative ordering of events.
