Logic need to be written for dump signals

Hi

I have one TB Environment.What is the logic written to dump signals into waveform for debugging .It should be there in top and i should be able to use it for Questasim and cadence irun also.

Thanks
Bharath