Verilog: $display with _ separator
There is no automatic way to have $display do that. But you can format it yourself to do that.

For example, this will print a 64-bit value like you wanted, with a 0x prefixed to the string.

$display("0x%04h_%04h_%04h_%04h", d[63:48], d[47:32], d[31:16], d[15:0]);


In this case, it's important to print the leading zeros; that is what the 0 in 04 means.

If I were doing this and using it more than once I would also wrap it in a function.