Printing in table format in SV

Hi,

I want to print a bunch of signals and generate an excel file kind of table out of it. The top row must have a timestamp, signal1, signal2, etc… and the rows after that will have the values of all the signals printed whenever it changes along with the time stamp.
I was able to do it manually, but I found out that there is a way to use ovm_printer_table to generate such tables. I’m not able to find any examples for that use case. Can someone please help here?

Thanks

In reply to nimitz_class:

The o/uvm_printer_table will not help you with value change data, nor is there anything built into SystemVerilog other than VCD, which is not in the exact format you are looking for.

But this is very easy to create yourself with a few lines of code

initial begin
   // header
   $display("timestamp, signal1, signal2");
   forever @*
           $display("%t %f %f", $realtime, signal1, signal2);
end

Also, many tools have ways of generating this kind of spreadsheet automatically, you will have to check the User Manual.