Hello,
Does anyone know of a nice way to get “wall clock” time in SystemVerilog? I want to measure how long certain portions of the simulation are taking, and I would like to report it using standard `uvm_info() (or $display).
Thanks!
Aaron
Hello,
Does anyone know of a nice way to get “wall clock” time in SystemVerilog? I want to measure how long certain portions of the simulation are taking, and I would like to report it using standard `uvm_info() (or $display).
Thanks!
Aaron
The quickest way is to use Verilog’s $system() function, but that only prints to stdout.
If you are using Questa and want to get the output into a string, you can use the built-in DPI routine mti_fli::mti_Cmd(“Tcl_command”) and get a string result with Tcl_GetStringResult(interp). You can see an example in the Questa release tree /<install_dir>/examples/systemverilog/dpi/cpackages.
If you want a vendor neutral method, you will have to write your own DPI C routine that calls a C system function.
See: http://verificationguild.com/modules.php?name=Forums&file=viewtopic&t=3199&highlight=dpi
Regards
Ajeetha, CVC