How to print out hexadecimal by %p

Hi,

I would like to print out the struct type by %p, but the output is in decimal. Is there a way to print it out in hexadecimal?

Thanks

Use $displayh

Hi Dave,

Thanks for the answer! I have the same question for UVM. How can I print it out in hexa by `uvm_info ?

`uvm_info(β€œβ€, $sformatf(pkt = %p", pkt))

string s;
...
$swriteh(s,"pkt = %p", pkt);
`uvm_info(β€œβ€, s))
1 Like

Hi Dave,

It’s very helpful. Many thanks!