Skip to content

VLSIFacts

Let's Program the Transistors

  • Home
  • DHD
    • Digital Electronics
    • Fault Tolerant System Design
    • TLM
    • Verification
    • Verilog
    • VHDL
    • Xilinx
  • Embedded System
    • 8085 uP
    • 8086 uP
    • 8051 uC
  • VLSI Technology
    • Analog Electronics
    • Memory Devices
    • VLSI Circuits
  • Interview
    • Interview Experience
    • Training Experience
    • Question Bank
  • Notifications
  • QUIZ
  • Community
  • Job Board
  • Contact Us
  • Toggle search form

Difference between $display, $monitor, $write and $strobe in Verilog

Posted on March 15, 2023March 15, 2023 By vlsifacts No Comments on Difference between $display, $monitor, $write and $strobe in Verilog

Although all $display, $monitor, $write and $strobe in System Verilog seem to be similar, there is a slight difference.

$display is the normal display, which executes its parameters wherever it is present in the code.

$write is similar to $display except that $display displays the contents in the next line (cursor moves to the next line before displaying), unlike $write in which the contents are displayed in the same line.

$strobe executes only once in a time instant, when all processes in that time instant have executed.

$monitor executes only if any of its parameters change (in one time instant).

Example:

Verilog Program:

module d11; 
bit a=0, b=0; 
initial 
begin 
a=0; 
b=1; 
$display(a,b); 
$strobe(a,b); 
b=0; 
a=1; 
$display(a,b); 
$write(a,b); 
$display(a,b); 
#1 b=1; 
end 
initial 
$monitor($time"ns: %b%b",a,b); 
Endmodule

Output:

01

10

1010

10

0ns: 10

1ns: 11

Spread the Word

  • Click to share on Facebook (Opens in new window) Facebook
  • Click to share on X (Opens in new window) X
  • Click to share on LinkedIn (Opens in new window) LinkedIn
  • Click to share on Pinterest (Opens in new window) Pinterest
  • Click to share on Tumblr (Opens in new window) Tumblr
  • Click to share on Pocket (Opens in new window) Pocket
  • Click to share on Reddit (Opens in new window) Reddit
  • Click to email a link to a friend (Opens in new window) Email
  • Click to print (Opens in new window) Print

Like this:

Like Loading...

Related posts:

  1. Synthesis and Functioning of Blocking and Non-Blocking Assignments.
  2. Synopsys – Interview Questions – based on Synthesis and Simulation
  3. Module Instantiation in Verilog
  4. Port Mapping for Module Instantiation in Verilog
Verilog Tags:display, monitor, strobe, System Verilog, write

Post navigation

Previous Post: BCD Addition
Next Post: Excess-3 Code and its Conversion

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Top Posts & Pages

  • ASCII Code
  • Circuit Design of a 4-bit Binary Counter Using D Flip-flops
  • NAND and NOR gate using CMOS Technology
  • AND and OR gate using CMOS Technology
  • Difference between $display, $monitor, $write and $strobe in Verilog


 

Copyright © 2025 VLSIFacts.

Powered by PressBook WordPress theme

%d