A Systematic Approach To Synthesis of Verification Test-Suites For Modular Soc Designs
A Systematic Approach To Synthesis of Verification Test-Suites For Modular Soc Designs
92
operation, e.g., code segment to configure the DMA identified the following parameters for the interface:
module. DMA event number, base address of the source or
destination module, offset of the memory element in
the module, width of the memory element, depth of
the memory element, addressing mode for the
memory element (FIFO or normal RAM) and
endianness. (This is an illustration for DMA module.
Similar set of parameters have been identified for
other modules as well).
Figure 2: Focus on verification in our work Identifying B and its parameters is a medium
complex task (based on author’s experience) and
B consists of two parts: B1: Collection of re- requires a good understanding of the class of test-
usable components of the test-case. These case that is intended to be automatically generated.
components can be captured at module level, (as We then define C, the abstract test-case to
functions or macros), and can be coded once for the capture the core functionality performed in the test-
modules during module level verification. They can case. It is used to generate the actual test-case.
then be re-used at SoC level and also from one SoC Next, we identify D, the properties that are captured
to another. as meta-files, and are required to synthesize: (i) the
B2: SoC or test-case specific non-re-usable parameters for component B1 and (ii) the non-re-
components, i.e., components whose contents and usable test-case component B2. The properties
existence depend on the SoC configuration and the capture information like the relationship between
test-case. modules, parameters used by the functions, etc. D
consists of two parts:
D1: Collection of module level properties.
These properties capture the specific characteristics
of the module that are required to synthesize the
parameters of B1 and contents of B2. Similar to B1,
D1 can be created during module level verification
and re-used thereafter.
D2: Collection of SoC level properties. These
properties capture the specific characteristics of the
SoC that differ from one SoC to another and are
required to synthesize the parameters of B1 and
contents of B2. Though D2 changes with the SoC
configuration D2 is structured such that sections of
D2 can either be re-used from other SoC or
Figure 3: Steps followed in our methodology generated from the architecture specification. The
extent of re-use depends on factors like software
In our work, we have structured B2 such that the compatibility, module or sub-system re-use and
components therein can be generated automatically. others. Examples for D2 are base address of
B2 is made up of B1 components and other control modules and DMA event mapping.
logic code segments that are specific to the SoC or The generation of D is straight-forward and
the test-case. For example, in the code segment for some sections of D can even be made as a part of
an interrupt service routine, the code segment that the SoC and module architecture specification.
checks if an interrupt has been triggered can be The last step in our methodology is defining the
captured at the module level. But the interrupt synthesizer (E) that generates the actual test-case
service routine itself is non-re-usable since the (F) using inputs C, D1 and D2 to drive the test-case
interrupt connection can change from one SoC to generation process, using components B1 and B2 in
another. the test-case themselves. Figure 4 presents a high-
The next step is to identify the parameters for level overview of the synthesizer and also shows the
B1. Care is taken to identify the parameters such inputs used and the output generated. E internally
that they are re-usable and can be generated easily generates B2 and then F (that uses B1 and B2)
with minimum information. For example, to make using the algorithm which has been identified (which
the component that configures the DMA module re- is based on A). The generated test-case F will
usable, it should be made independent of any contain calls to the B1 components captured at the
specific DMA architecture. To do this, we have module level.
93
system control modules in the correct order. The
steps used in the synthesizer to generate the test-
case are shown in Figure 5.
V. DATA TRANSFER MODULE TEST-CASE
GENERATION
We analyzed the data transfer module test-
cases and identified that the following modules are
active: CPU, DMA control module, interrupt control
module, system control modules and data transfer
modules. We consider the test-bench in the
verification environment as a data transfer module
Figure 4: High level overview of the synthesizer for identifying the components and properties that
must be captured.
IV. MEMORY MODULE TEST-CASE
GENERATION
We analyzed the memory module test-cases
and identified the following modules to be active in
the test-cases: CPU, system control and memory
modules. The component of the test-case that
performs the configuration operation can be made
re-usable and must be captured at the module level.
In addition to this, the component that executes the
algorithm to verify the memory module can be made
re-usable and hence must be captured as a module Figure 5: Steps to generate memory module test-case
level component.
Figure 6 shows the components of the data
The system control configuration component
transfer test-case that we identified to be captured at
takes the base address of the module and the
module level. The parameter interface for these
properties of the module being controlled as
components abstract out the SoC specific and test-
parameters so that they are re-usable. Similarly, the
case specific details so that they are re-usable.
memory verification algorithm components take the
The components of system control module take
properties of the memory module and the module on
the base address of the module and the properties
which the algorithm must be executed as inputs.
of the module being controlled as parameters. The
The abstract test-case captures the memory
components that operate on interrupt events take
modules that must be verified, the memory
the properties of the event as inputs like the event
verification algorithms to be used to verify them and
number, source event or destination event, etc. The
the module on which the algorithms must be run.
component that configures the DMA module takes
The module level properties are captured for
as input the parameters discussed in Section III.
memory modules, system control modules, and the
memory verification algorithm only. The properties of
other modules are not captured since they are not
needed to generate parameters or code segments in
our methodology.
We propose to capture the following properties
at the module level: (i) properties of the memory
modules e.g. number of rows and (ii) constraints to
generate parameters.
We propose to capture the following properties
at the SoC level: (i) base address of the modules, (ii)
memory banking details and (iii) the relationship
between the system control module and other
modules. Figure 6: Components captured at module level
The following code segments of the test-case
are SoC specific or test-case specific and hence are The components of the data transfer module
generated internal to the synthesizer: (i) the take the following parameters as inputs: (i) the base
parameter of the components captured at module address of the module, (ii) the mode of operation of
level and (ii) the code sequence to set up all the the module and (iii) the values required for data
94
transfer e.g., the address to which the transfer must properties of the modules and the SoC are captured
be made. as ASCII files. The abstract test-case is also
The abstract test-case captures (i) the data flow captured as an ASCII file. Perl [10] language is
in the test-case and (ii) the memory modules to be used to implement the test-case synthesizer.
used as source or destination buffers for the data Figure 8 shows the major blocks in our
transfers in the test-case. implementation of the test-case synthesizer (TS).
The module level properties are captured for The TS consists of two major blocks namely, the
data transfer modules and interrupt control modules subroutine extractor and the synthesizer. The
only. We propose to capture the following properties subroutine extractor processes the module level
of the data transfer module at the module level: (i) meta-files and extracts the parameter generating
event properties, (ii) modes of operation supported subroutines, (that capture the constraints to
and (iii) constraints to generate the parameters. For generate the parameters). These subroutines are
the interrupt control module we propose to capture then added to the synthesizer’s subroutine library.
the mapping of the input interrupt to output interrupt The synthesizer consists of four major blocks:
as a property. the meta-file processor, the abstract test-case
We propose to capture the following as processor, the data structure generator and the code
properties at SoC level: (i) base address of all the generator. Each block generates one or more data
peripherals in the SoC, (ii) interrupt mapping for the structures that are used by the subsequent blocks.
interrupt controllers (iii) DMA event mapping for the
DMA controllers, (iv) the relation between system
control module and other modules and (v) the
modes supported by the modules at the SoC level.
The following components of the SoC are test-
case specific or SoC specific and hence are
automatically generated: the parameters of the
components captured, the code segment to set up
the system control modules in the required order,
the code segment to configure the peripherals that
handle interrupts, the interrupt service routine code
segment and the code segment that handles data
transfer. Figure 8: Blocks in test-case synthesizer implementation
The data transfer module test-case synthesizer
generates the test-case using the steps shown in VII. QUANTITATIVE ANALYSIS
Figure 7. Figure 9 shows the process involved in creating
and executing a test-case manually. Of these steps,
significant amount of time is spent on Steps 2, 3, 4
and 8. Step 2 consumes six to twelve person-
months (for a representative class of designs based
on the SoC verification projects that the author has
worked on). But this effort has to be spent once and
can be re-used across many SoC projects with
minor SoC-specific modifications, the effort for which
can be within one to two person-weeks.
The effort spent in Steps 3, 4 and 8 depends on
the module functionality and the complexity of the
SoC in which the modules are integrated. Also,
these steps are specific to the SoC and the module
they are targeted. On an average, it takes one to
four person-months for Steps 3, 4, and 8 together for
Figure 7: Steps to generate data transfer module test-case generating the test-cases manually per module.
This effort varies based on (i) the complexity of the
VI. IMPLEMENTATION DETAILS SoC, (ii) the number of modules, (iii) the complexity
We have implemented a prototype of the of the modules, and other such factors.
methodology proposed. In our implementation we With the above steps as reference, our
generate ‘C’ language test-cases. The components methodology for automatic test-case generation
of the modules are captured in ‘C’ libraries and, the impacts Steps 2, 3, 4, and 8. The author spent
95
approximately five weeks in developing the REFERENCES
prototype (discussed in Section VII) to illustrate the 1. Brian W. Kernighan and Dennis Ritchie, “C Programming
benefits of the proposed methodology. The Language”, Pearson Education, second edition, March 1989.
production system that can be used in SoC 2. Cadence, “e Language Reference”, 2005.
3. United Business Media EETimes online. 2005 Electronic
verification projects will be much more complex than
Design Automation Branding Study - Chip Design.
the prototype and is estimated to take about six http://i.cmpnet.com/eetimes/eda/edasurvey chip.pdf , 2005.
person-months. But this is a one-time effort and can 4. 2002 IC/ASIC Functional Verification Study. Technical report,
be re-used across many SoC verification projects Collett International Research, 2002.
(similar to Step 2). 5. F. Hunsinger, S. Francois, and A.A. Jerraya, “Definition of a
The effort spent in Steps 3 and 4 for automatic systematic method for the generation of software test
generation is five person-days. It is estimated that a programs allowing the functional verification of system on chip
(soc)”, 4th International Workshop on Microprocessor Test
similar effort is required for Step 8. Thus the total
and Verification: Common Challenges and Solutions, pp 11–
effort required for automatic generation is ten 16, May 2003.
person-days per module. This is significantly lower 6. R. Emek, I. Jaeger, Y. Naveh, G. Bergman, G. Aloni, Y. Katz,
when compared to one to four person-months per M. Farkash, I. Dozoretz, and A. Goldin, “X-gen: a random
module spent on manual generation. The benefits test-case generator for systems and socs”, Seventh IEEE
accrue further if the components and the properties International High-Level Design Validation and Test
of the modules are re-used (across multiple SoCs) Workshop, pp. 145–150, October 2002.
and the properties of the SoC are captured as a part 7. A. Cheng, C. Lim, and A. Parashkevov, “A software test
program generator for verifying system-on-chips”, Tenth IEEE
of the SoC specification. International High-Level Design Validation and Test
Workshop, pp. 79–86, December 2005.
8. K. Albin, “Nuts and bolts of core and soc verification”, 38th
Design Automation Conference, pp. 249–252, 2001.
9. W. Yang, M. Chung, and C. Kyung, “Current status and
challenges of soc verification for embedded systems market”,
IEEE International [Systems-on-Chip] SOC Conference, pp.
213–216, September 2003.
10. Larry Wall, Jon Orwant, and Tom Christiansen, “Programming
Perl”, O’Reilly Media Incorporated, third edition, July 2000.
VIII. CONCLUSIONS
In this work, we have presented a systematic
approach to synthesize verification test-cases. The
approach is based on identification of re-usable
components and properties that can be captured at
the module-level and the SoC-level. As an
illustration the methodology has been implemented
to generate memory and data transfer test-cases.
The methodology can be extended and applied to
other categories of test-cases too. The framework
presented in this work for the automatic generation
of test-cases further helps to target more efficient
and more comprehensive verification of SoC
designs.
96