CPU: RTL Simulation 331
TestbenchStimulus DriverDUTOK ErrorsGood ResultsFigure 14-2
Testbench Block
Diagram.Kinds of Testbenches
There is a myriad of ways to write a testbench, but some of the most com-
mon are described in this section. The following are the most common
testbench types:Stimulus only—Contains only the stimulus driver and DUT; does
not contain any results verification.Full testbench—Contains stimulus driver, known good results, and
results comparison.Simulator specific—Testbench is written in a simulator-specific
format.Hybrid testbench—Combines techniques from more than one
testbench style.Fast testbench—Testbench written to get ultimate speed from
simulation.To show the different types of testbenches, a common example is used.
To make it simple to understand the stimulus and response, a counter
example is used. The following description is the package, entity, and ar-
chitecture for an 8-bit counter: