Monday, January 13, 2014

Creating directed scenario in UVM !!!

Recommended  method  for closing coverage is to have test to run with multiple seeds , but many times certain scenarios can never be covered by the randomness and we require a directed test case. The way to write a directed test in UVM  is as follows.

  • Disable the regular sequence from executing on the sequencer by setting count as 0 in the directed test case.
               set_config_int("*.sequencer", "count", 0);

  • randomize the sequence in the directed way and execute the sequence on the sequencer using execute_item() method.
                 success = item.randomize();