Printing partial hierarchy

Hi,

While using %m in $display it prints the full hierarchy. (e.g. tb.top.design.module.mem)

Is it possible to print partial hierarchy using $display? (e.g. module.mem)

Thanks,
Sunil.

Anything is possible in software! :)

SystemVerilog does not have anything built-in to do this. You will have to save the result of %m to as string and strip off what you don’t want to print.