Skip to main content

Build a Coverage Model First

In the design verification world a coverage model is a data structure that holds information about what configurations and scenarios you would like to test. The verification engineer is responsible for defining and maintaining the coverage model.

I think the coverage model should be one of the first things you create. Why? Without it you are relying on your best judgment in the moment to make progress towards closing coverage on the design. If you make a habit of looking at your coverage status frequently (and you must for this to work) you can use your accumulated judgment to decide what needs to be tested next instead of your momentary judgment. Momentary judgment is often meandering and not the most efficient way to achieve your ultimate goals.

A lot of the test planning process takes a long time. You may not be able to think of all the interesting configurations in one sitting. Talking to people, having your mind wander, seeing unexpected results all influence what you would like to test. The usual philosophy is to document tests of interest in a test plan. Then write those tests. Then collect coverage on all those tests. Then compare your coverage to you test plan to make sure you didn't miss anything. I'm advocating for a coverage model that is a replacement for a test plan. Use the coverage model to generate a report and use that as to replace the test plan if you must.

I think the coverage-model-first approach solve a couple of important problems:
  1. Its code. So you end up looking at it more than Word documents buried on some network drive.

  2. One source of truth. No more test plan vs. coverage model disagreement

  3. It guides you towards coverage closure efficiently