0 votes
in Verilog by (200 points)

What is $display in Verilog and how do I use it?

2 Answers

0 votes
by (260 points)

In Verilog - "display" is a statement that's used for printing messages onto a console of a simulator. It's somewhat similar to "printf" in C.

"display" must be used inside an "always" or "initial" block.

Example :

$ display ( " Hello World ! " ) ;

0 votes
by (300 points)

The $display system command displays a text on the screen during simulation every time it is executed and exactly when it is executed (not at the end of the current delta time-step how $strobe does). $display supports a C-like formatting.

"\texpected dali data = %2h, received dali data = %2h",
I use it to output a log, information messages, or check results for either debugging or information purposes.
Hardware Coder Community

© 2022 by Hardware Coder. User contributions are licensed under cc by-sa 4.0 with attribution required. Attribution means a link to the question, answer, user, etc on this site.

This site is owned and operated by Hardware Coder in McKinney, Texas.

Send Us A Message
About Us

By using this site, you agree to the following:

Privacy Policy
Terms and Conditions
DMCA Policy
Earnings Disclaimer
Legal Disclaimer