Posts

Showing posts with the label verilog $display vs $strobe

veriloga Debugging - $strobe Vs $display

$strobe vs $display in Verilog and Verilog-A: Understanding the Difference Summary: $display prints immediately when called, while $strobe prints at the end of the current simulation time step. In mixed-signal simulations, $strobe often produces cleaner, chronologically ordered logs. Why timing of print statements matters In both Verilog and Verilog-A, simulation events can occur at the same time. This is common in mixed-signal designs where analog events, digital edges, and timers may coincide. Printing in the middle of these updates (as $display does) can lead to logs that look out of order. $strobe avoids this by printing only after all events for that time step have completed. Rule of thumb: Use $display for immediate, step-by-step debugging; use $strobe for clean, time-aligned logs. Key differences Task When it prints Best for Drawbacks $display Immediately when executed Inspecting execution ...