Wednesday, November 17, 2010

Productivity hint for SystemVerilog VMM/OVM/UVM users

Whichever methodology you use for Verification (if you don’t use, better start with UVM maybe) – some of the tasks & requirements are common. One of them is the ability to control certain simulation features across runs without needing to recompile. Classicial examples are:

  • Dumping different scopes
  • Changing Verbosity (for debug, regression runs etc.)
  • Choosing tests
  • Stopping after N-number of errors

It is the last one that one of our customers recently had an issue with, here is an extract from his email:

I need clarification regarding "vmm_log:stop_after_n_error".  Want to know
whether there is command line equivalent of the same.
I do not want to edit any of the source file but rather control from the command
line.  Does the language/methodology has in built construct for the same ?

Interestingly an OVM user also asked for it during our recent OVM training (www.cvcblr.com/trainings) at their site. In OVM it is “max_quit_count”. In both cases unfortunately it is not built-in. This means that one needs to add it in source-code – something that we discourage to do. Instead build it using Verilog’s $value$plusargs, code snippet:

if ($value$plusargs("vmm_stop_after_n_errors+%d", err_count)) begin
        log.stop_after_n_errors(err_count)

Guess that gives the idea, let me know if you are still stuck, send me
a working code/example, I will get that turned around quickly.

Regards

TeamCVC

www.cvcblr.com

No comments: