Hy I have to save some metrics about my design. I want to save the istant of a particular event on a file, my code is write in Verilog and I'm using modelsim. I was thinking to use the istruction $time to capture a particular istant of time, and if it's possible to save it on a file. How can I do this? is it possible? Could I use $time and $writmemb (or $writememh) to solve my problem.
I don't recomend using $writememh or $writememb because they only store data as hex or binary. Verilog as other functions such as $fwrite and $fread which are very similar to C programming and easier to use.