$display tasks

Hello!

Please look a the display statement below:


$display("Force (F) = %0.2f N  \tArea (A) = %0.2f m^2 \n[Result (Stress)] Rho = %0.2f (N/(m^2))\n",pkt.F,pkt.A,pkt.Rho);

Is it possible to set the Force (F) in bold, Area (A) in italic, and underline Rho? If yes, please edit the statement and also kindly provide any such formatting commands say, like, setting colors or something fancy?

Thank you!

In reply to Shashank Gurijala:

This depends on the tool used to view the simulator log file. See ANSI Escape Codes · GitHub

In reply to dave_59:

I run my programs on questasim

And I’ve tried \033[1m on Rho and its no working

In reply to Shashank Gurijala:

As I said, “This depends on the tool used to view the simulator log file.”; not the tool that generates the log file.

module top;
  initial $display("-\033[4mUnderlined\033[24m-");
endmodule

This code does not display -Underlined- with any tool on EDAplayground, but if you run the simulation on linux terminal window, you see the output displayed correctly.