Home / Learn Verilog / $display, $monitor, $strobe, $write

$display, $monitor, $strobe, $write

Print values from simulation.

The gistPrint values from simulation.

The idea, explained simply

Print tasks$display - print once$write - no newline$monitor - on every change$strobe - end of time step
Print tasks

The basic idea

$display prints once with newline, $write without, $monitor prints whenever arguments change, $strobe at end of time step.

Why this comes up

Text output is the quickest debug tool.

The mechanics

Format: %b %h %d %o %s %t %m; width such as %0d.

Where it is used

  • Everyday RTL design
  • FPGA and ASIC projects
  • Testbenches and debugging

Try it

Print tasksVerilog: edit and run

$monitor started once prints at every change of a.

Quick check

1. $monitor prints...