Sie sind auf Seite 1von 4

2016 International Conference on VLSI Systems, Architectures, Technology and Applications (VLSI-SATA)

Functional Verification of DSP based On-board VLSI


Designs
Sourabh Jain1, Parimal Govani2, Kamal B Poddar3, A K Lal4, R M Parmar5
Space Applications Centre
Indian Space Research Organization
Ahmedabad, India
1
sourabhjain@sac.isro.gov.in, 2parimal@sac.isro.gov.in, 3kamal_p@sac.isro.gov.in,
4
aklal@sac.isro.gov.in, 5rmparmar@sac.isro.gov.in

Abstract— The Usage of Field Programmable Gate Arrays generated using HVL & verified automatically during run-
(FPGA) and Application Specific Integrated Circuits (ASICs) time. Functional simulation is considered complete when the
with complex functionalities such as Digital Signal Processing goal of 100% functional coverage is achieved.
(DSP) is increasing in onboard space applications. Verification of In this SV based test bench, control signals output of the
these complex designs within limited schedule and resources is designs are validated using assertions and data processing
challenging. In order to ensure reliable functioning of these
functionalities of the designs are validated with predictor or
designs in all possible run time conditions, functional verification
is required to be carried out thoroughly. Development of an checker. These checkers are generally hand-coded using
automated self-checking verification environment or test higher level of abstraction by the verification engineer.
benches, including generation of bit-accurate golden reference Development of checker for complex functionalities such
values, is complex and time consuming task even with the use of as DSP is complex. This becomes even more challenging for
state-of-the-art Hardware Verification Languages (HVLs) and an onboard design implementing multiple DSP IP cores
methodology such as System-Verilog (SV) and Universal having functionalities such as sine–cosine lookup table, fixed
Verification Methodology (UVM) respectively. to floating point conversion & vice versa, FFT, FIR filter, etc.
This paper discusses a method for functional verification of DSP algorithms are available as standard functions in
DSP based VLSI design using SV and Matlab. The architecture
MATLAB. If these functions can be used in the test bench as
of verification environment and technique for coupling of Matlab
with SV based verification environment and generation of bit- golden reference models/checker, the test bench can be
accurate golden references, in real time is also discussed in detail, simplified and overall efficiency of the verification can be
along with two case studies. significantly improved. This paper discusses the verification
environment development using SV and methodology to
Keywords— DSP, VLSI, UVM, predictor, coverage driven couple Matlab with SV.
verification, DPI
II. PREDICTOR IN VERIFICATION ENVIRONMENT
I. INTRODUCTION
Verification of a VLSI design consists of two major steps.
To meet ever increasing functional requirements, digital 1. Stimulus generation
VLSI designs are getting complex. Design teams are packing 2. Analysis of the design response
more & more logic gates onto a single chip to achieve desired In stimulus generation step, the design is configured in a
functionality and performance within the specified footprint. particular mode and stimulus is applied. In analysis part, the
Functional verification of such designs with tradition approach actual verification is performed. A sample test bench
of using directed test benches does not provide sufficient architecture performing both these operations automatically is
confidence within given time schedule. Test benches written illustrated in Figure 1.
in SV gives advantages in terms enabling constrained random The test bench (verification environment) developed in SV
stimulus generation, self-checking and assertion based using UVM is composed of reusable verification environment
verification along with defining functional coverage matrix. called verification components. Each component is
Random testing improves productivity over manual testing, in encapsulated, ready-to-use, and configurable which can be
terms of number of test vectors produced and generates test used for verification of any interface protocol, design sub-
cases not explicitly thought by verification engineer. Binding module or a full system. The verification components along
assertions to a design during simulation phase identifies with device under test (DUT) is used to verify implementation
design flaws in real-time and reduces debugging time of the protocol or design architecture.
significantly over non-assertion based design. Simulated
design’s output is compared with golden reference values

978-1-5090-0033-3/16/$31.00 ©2016 IEEE


2016 International Conference on VLSI Systems, Architectures, Technology and Applications (VLSI-SATA)

Figure 2: Analysis Component

Figure 1: Verification Environment

The analysis component shown in Figure 2, consists of


components that observe behavior of the DUT. The major
parts for analysis component are coverage collection and
scoreboard. Scoreboard determines whether the design is
functioning properly or not. The scoreboard architecture
separates its tasks into two areas of concern viz. prediction and
evaluation. A predictor model, sometimes referred to as a Figure 3: Matlab in Predictor
‘Golden Reference Model’, receives the same stimulus stream
as the DUT and produces known response transaction streams. C. MATLAB communication with TLM2 transactions:-
The predictor implements the DUT functionality at a higher Both, UVM library and Matlab support TLM2 transactions
level of abstraction written in C, C++, SV or System-C. After with System C environment. Utilizing this method, an
the correct functionality is predicted, the scoreboard can interface between UVM to System C TLM2 and System C
evaluate the actual results observed on the DUT with the TLM2 to Matlab can be established.
predicted results. Method A is independent of EDA simulator, configurable
and does not require any specific tool kit. Hence, it was
III. USE OF MATLAB IN PREDICTOR chosen for implementation.
Matlab is proven industry standard for implementing DSP DPI is an interface between SV and ‘C’, which allows
algorithms. The DSP functions available or algorithms direct inter-language function calls on either side of the
developed using Matlab can be directly used to evaluate the interface. Matlab provides engine library functions, containing
performance of the HDL designs. Such DSP functions will routines that allow calling Matlab from programs written in
have the same functionalities as the HDL designs. Figure 3 ‘C’ and FORTRAN. The engine library contains nine routines
shows the usage of Matlab DSP function inside the predictor for controlling Matlab computation engine from a ‘C’
component to generate the golden reference values. It program. Table 1 summarizes these routines.
significantly simplifies the verification of complex design. ‘C’ program employing these routines can be used to
However, integrating Matlab DSP functions directly in establish the link between SV and Matlab [1] as shown in
predictor is challenging task as it does not support HVL or Figure 4.
HDL constructs directly. Figure 5 shows a sample C program written for interface
Following methods are explored to use Matlab functions in between a SV test bench and a Matlab algorithm.
verification environments -
A. Direct Programming Interface (DPI) and MATLAB Table 1: Matlab engine routines
Engine :- Matlab can be interfaced with SV test bench using C Routines Matlab Functionality
DPI. A program written in ‘C’ language containing Matlab eng{open|close} Used to Start/Close its engine
engine routines makes the bridge between them. engEvalString Used for execution of its command
B. HDL Verifier:- Matlab tool box named HDL verifier, eng{get|put} Used to get/put its variable array value
from/to the engine
provides EDA link to get connection for supporting simulators
engOutputBuffer Used for reading its buffer text content
like Cadence IEV and Questasim eng{get|set}Visible Used for making its engine visibility on /off
engOpenSingleUse Start for its engine session
2016 International Conference on VLSI Systems, Architectures, Technology and Applications (VLSI-SATA)

IV. DSP CASE STUDY


The functional verification of two onboard IP core designs
are considered as case studies. In these case studies, Matlab
algorithms were used as golden reference in real-time. A
coverage driven functional simulation for both the designs.
A. Case-Study 1: Fast Fourier Transformation
The first design is an IP core of complex Fast Fourier
Transform (FFT) having transform length of 8192. It provides
unscaled output and uses the Cooley-Tukey algorithm for
computing the FFT. The Verification of this design was
carried out by using Matlab FFT algorithm of the same
Figure 4: SV- Matlab Interface transform size as a golden reference. Constrained random test
vectors generated using SV were applied on both DUT and
Matlab model. The DUT outputs were compared bit-by-bit
against Matlab output in real time.
Further, signal of a standard frequency with random noise
was generated in Matlab and applied to both reference model
as well as DUT for shape evaluation. The outputs from both
were plotted in Matlab in real time. Plotting of the DUT
response over the Matlab output revealed that the design
outputs were not exactly matching and there were minor
differences due to DUT introducing undesired frequency
components as shown in Figure 6.
Further debugging of DUT shown that these differences
are introduced by compression of the processed data due to
limited register length at every stage of processing and is
confirmed by the design team.
B. Case Study 2: Sine-cosine LUT
The another design is an IP core of sine cosine look up
table generator. In this design, the input angle widths is 16 bits
which provides resolution (step size) better than 0.005 and
output width is 10 bits long for better precision.
It was verified for all possible input angle values using
constrained random test vector by running Matlab algorithm in
a loop. Design output (sine /cosine values) were compared
with Matlab generated values. Angle values (16 bits)
generated by SV test bench, act as addresses for sine or cosine
LUT in the design. To get the angle value from the Matlab
Figure 5: Interface C program algorithm for same input angle value, additional routines for
angle conversion operation were required to be developed in
System Verilog and Matlab have different data types.
‘C’. To make Matlab algorithm output (double - 64 bits long)
Matlab’s default data type is a matrix double, whereas SV test
as DUT equivalent (10 bits), fixed point conversion of these
bench sends and receives data in binary format. Hence,
values was carried out in Matlab. Final output of DUT was
additional routines were developed in ‘C’ program to perform
successfully compared and matched with Matlab output (i.e.
the required conversion on the received data for compatibility
golden reference values).
with target environment.
Here, Matlab files (.m) and C files are compiled into a V. ADVANTAGES
shared library which creates a shared library file (.so) and a
Use of MATLAB algorithm as a golden reference has
header file (.h). To communicate with the shared library,
resulted in reduction of test bench code development time and
Matlab requires usage of its existing matrix functions. The
complexity. Comparison of outputs on MATLAB plots has
compilation of ‘C’ file is done using gcc compiler and Matlab
made debugging of complex DSP functions easier. Hence, the
API header files. The compiled unit is also stored in a shared
overall efficiency of the functional verification was
library.
considerably improved.
2016 International Conference on VLSI Systems, Architectures, Technology and Applications (VLSI-SATA)

Figure 6: FFT responses of DUT (green) and Matlab function (blue)


to acknowledge the contributions of entire design and
VI. CONCLUSION verification team, who provided their guidance in successful
An innovative automatic self-checking functional implementation of this method. We would also like to express
verification method has been employed to ensure the our immense gratitude to Director SAC for providing the
functional correctness of complex DSP based designs. Usage opportunity to carry out this task.
of this approach enables verification of DSP based
functionalities in lesser time with higher coverage. Here, REFERENCES
Matlab is used to generate some specific input stimulus [1] Dhaval Modi, Integrating MATLAB with verification HDLs for
Functional Verification of Image and Video Processing ASIC”
signals, which are difficult to generate in SV. It is also feasible International Journal of Computer Science & Emerging Technologies”
to carry out extended analysis of the DUT output using Volume 2, Issue 2, April 2011”
spectrum analysis, filtering at RTL level. [2] Cookbook–UVM by Verification Academy Mentor graphics.
[3] Writing Testbenches using System Verilog by Janick Bergeron
ACKNOWLEDGMENT Synopsys, Inc.
The work presented in this paper reflects the [4] SystemVerilog for Verification -A Guide to Learning the Testbench
interdependent efforts of many individuals. The authors wish Language Features by Chris Spear

Das könnte Ihnen auch gefallen