In reply to roopatoms:
Regardless of whether what you’re trying to do is the best way of meeting your requirements (I think maybe :-)), from an SV/UVM perspective, you should probably be able to get it running.
See it working on edaplayground here