system-verilog

how to runtimely show call stack in system verilog?


currently i use this way, when run time error happens, vcs will print call stack. It is very low effecient. Is there a better way?

function void anyFunctionIWouldLikeToSeeCallStack();
uvm_object a;
// a == null
a.print();
endfunction;

Solution

  • in VCS, it's $stack()

    but it's only about 8 levels of the stack, and I don't think that's configurable