3 Verification Tools and Directed Testing
3 Verification Tools and Directed Testing
Spring 2023/2024
Verification Tools
Static Dynamic
2
Achieving Automation
Task of Verification Engineer:
Ensure product does not contain bugs - as fast and as
cost-effective as possible.
3
Tools used for Verification
Dynamic Verification:
– Hardware Verification Languages (HVL)
– Testbench automation
– Test generators
– Coverage collection and analysis
– General purpose HDL Simulators
Event-driven simulation
Cycle-based simulation (improved performance)
Waveform viewers (for debug)
– Hardware accelerators/emulators, FPGAs
5
Linting Tools
Linters are static checkers.
Assist in finding common coding mistakes
– Linters exist for software and also for hardware.
gcc -Wall (When do you use this?)
Only identify certain classes of problems
– Many false positives are reported.
– Use a filter program to reduce these.
Careful - don’t filter true positives though!
Does assist in enforcing coding guidelines!
Rules for coding guidelines can be added to
linter.
6
Simulation-Based
Verification
Directed testing with
manual checking
Fundamentals of Simulation-based Verification
Verification can be divided into two separate tasks
1. Driving the design - Controllability
2. Checking its behavior - Observability
8
What is a Testbench?
“Code used to create a predetermined input sequence to
a design, and to then observe the response.”
– Generic term used differently across the industry.
– Always refers to a test case/scenario.
– Traditionally, a testbench refers to code written in a Hardware
Description Language (VHDL, Verilog, SystemVerilog) at the top
level of the design hierarchy.
– A testbench is a “completely closed” system, i.e.c, no input/output
of the testbench
Bugs in
Bugs in Testbench DUV
the TB
drive stimulus into the DUV collect the response and check
9
Simulation-based Design Verification
Compile Simulate
Write Compile Simulate
Correct HDL the
HDL syntax errors code design
code
HDL library
HDL files
Debug
the
design
11
Event-based Simulators (I)
Event-based simulators are driven based on
events.
Outputs are a function of inputs:
– The outputs change only when the inputs do.
– The event is the input changing.
– An event causes the simulator to re-evaluate and
calculate new output.
Outputs (of one block) may be used as inputs (of
another) ...
12
Event-Driven Simulators (2)
Accurate timing
Good debugging environment
Simulation speed is slower
Schedule
New
Events
More
event Y Get
Advance Event Propagate
for this Current
Time Evaluation Events
time Event
N Time Y
wheel Finish
empty
13
Event Driven Principles
The event simulator maintains many lists:
– A list of all atomic executable blocks
– Fanout lists: A data structure that represents the
interconnect of the blocks via signals
– A time queue – points in time when events happen
– Event queues – one queue pair for each entry in the
time queue
Signal update queue
Computation queue
14
Event-based Simulators
Event-based simulators are driven based on
events.
Outputs are a function of inputs:
– The outputs change only when the inputs do.
– The event is the input changing.
– An event causes the simulator to re-evaluate and
calculate new output.
Outputs (of one block) may be used as inputs (of
another) ...
Re-evaluation happens until no more
changes propagate through the design.
15
Simulation Speed
What is holding us back?
Speedup strategies
Improving Simulation Speed
The most obvious bottle-neck for functional
verification is simulation throughput
17
Parallelization
Efficient parallel simulation algorithms are hard
to develop
– Much parallel event-driven simulation research
– Has not yielded a breakthrough
– Hard to compete against "trivial parallelization"
Simple solution – run independent testcases on
separate machines
18
Principle of Operation
19
Simulation Speed Comparison
Event Simulator 1
Cycle Simulator 20
Acceleration 1000
Emulation 100000
20
Verification Languages
22
Features of High-Level Verification Languages
26
Limitations of Using Waveform Viewers as Checkers
27
Limitations of Directed Testing: Coverage
100%
Directed
Approach
Coverage
Constrained Pseudo-
random Coverage
Driven Approach
Time
28
Impact of Increasing Verification Productivity
Verification
Time
29
Verification Tools
Third Party Models
Metrics
Third Party Models
Chip needs to be verified in its target environment.
– Board/SoC Verification
Do you develop or purchase behavioural models (specs)
for board parts?
– Buying them may seem expensive!
“If it was not worth designing on your own to begin with, why
is writing your own model now justified?”
– The model you develop is not as reliable as the one you buy.
– The one you buy is used by many others - not just yourself.
Remember: In practice, it is often more expensive to
develop your own model to the same degree of
confidence than licensing one.
31
Metrics
Not really verification tools - but managers love
metrics and measurements!
– Managers often have little time to personally assess
progress.
– They want something measurable.
Coverage is one metric - will be introduced later.
Others metrics include:
– Number of lines of code
– Ratio of lines of code
(between design and verifier)
– Drop of source code changes
– Number of outstanding issues
32
Summary
We have covered:
Verification Tools & Languages
Basic testbench components
Writing directed tests
The importance of Driving and Checking
Checking when we use directed testing
Limitations of directed testing
Cost of debug using waveforms
33