In reply to mitesh.patel:
There is no way in SystemVerilog to do this without using the VPI with C code.