Writing Verification Testplan For Module Level Design
Writing Verification Testplan For Module Level Design
I don’t know how to handle a canvass, but can make some progress with testplan.
We will focus on developing a testplan for module level verification. We will have
some guidelines and checkpoints that would help us stay on track.
Writing testplan for module level and full chip level are two different things.
There may be overlap, but both need different approach. Full Chip testplan is not
the topic for subsequent text.
Coming to the point, we need to draw an outline for our testplan. Let’s create
separate sections to cover different aspects. I would like to make following
sections and each section may have further sub-sections and sub-sub sections.
1. Sanity / Go-No-Go
2. Register & Memory Access
3. Features / Functionality
The segregation is a not mutually exclusive. There are lots of areas overlapping
with each other. As verification engineers, we should worry about not leaving a
hole, overlaps are fine.
Sanity / Go-No-Go
The testcases listed here aims at basic functioning of the module. What constitutes
‘basic’ is contextual. These are the baby steps that when perfected would form the
base for running of other tests. It would be easy to illustrate with examples.
The sanity testcases serve as base indicator about the health of the module. These
testcases would be generally used throughout the development process. Typically,
we run sanity tests:
a) After bug fixes to ensure that the fix has not broken the basics
Sanity tests are most directed, quick running tests. We don’t aim to cover too
many features here.
It is always beneficial to list the register and memory access testcases in the
testplan. These tests should be run before sanity tests. These tests would help
uncover the bugs in configurations and status registers. These bugs are tedious to
debug in sanity or other feature tests.
Features / Functionality
These are the very reason for the module to exist. These are the properties or
functions that the module needs to fulfil. We need to list all the features and
functionalities mentioned in module architecture/micro-architecture document and
standard specifications. In this section, we would be covering most of the
configurations that the design supports along with status and interrupts. We need
to include the register configurations, interrupts and status registers getting
triggered functionally. We will be carefully listing everything that needs to be put
to test. While listing the testcases, do not worry about implementation of tests.
Think of it as somebody else’s job for two reasons:
2) We should add more details to the test plan about the procedure, configuration
sequence, status register checks, etc.
It should be easy for somebody else to implement the testplan i.e. write the
testcase.
Remember: Don’t worry about how to write the tests while writing the testplan!
Simple features
Composite feature
Simple features: These are straight forward functionalities broken to the base
level. We find these directly mentioned in the relevant documents. Typical
examples of the statements are:
All above are just examples and actual list is going to be bigger, probably the
biggest amongst all the sections.
Additional Sections
Performance tests
These are not a special category of tests. These are kind of feature testcases, with
more emphasis on advertised numbers. The separate section is created to mark up
the importance. The performance parameters can be found in data sheet or some
marketing material for the module.
These tests can stress test the module. These are performed towards the end when
all the features are tested ok.
Error cases
This section lists the unhandled but possible error cases. The handled error cases
fall under features sections. We can list unhandled error cases in this sections as
the expectation is different as compared to features tests. Since the graceful
handling mechanism is not specified in the design, the minimum expectation is not
to hang on seeing these errors. The design should be able to come to normal
working in turn.
Self-Review
We would definitely go for review with designers, architects and peers, it is
important that we do it once our self. Having written the test plan first hand, I find
myself biased and running out of patience to go over the same testplan again. Here
the check list comes handy.
Check that all the numbers in the documents are put to test. Search only the
numbers. E.g. clk frequency of 125 MHz, 24 ports, latency of 16 clocks,
1000 Mbps, etc. Identify the testcase in the testplan that is covering it. The
testcase can be in any section.
All statements in the documents should be looked at suspiciously. We put a
question mark after the statement and look for testcase in testplan that tests
it. E.g. document says, “Small packets are dropped”. Let me test it.
Configuration register – I try to map each configuration register field with
test case that verifies it.
Status register – Some testcase should be reading and checking the status
during or at the end of simulation. Testcases for configuration and status
register checking does not include “Section 2 Register & Memory Access“
Pin functionality – Ensure that we have tests for module’s interface pin
functions
With all necessary goals set properly, we will get ready to fire tests at design to
break it to strengthen it.