Re-Use of Verification Environment for Verification of Memory Controller
Re-Use of Verification Environment for Verification of Memory Controller
Aniruddha Baljekar, NXP Semiconductors India Pvt. Ltd.
Bangalore, INDIA
Abstract:
With the complexity of the design on the rise, coverage of functional verification is one of the increasing challenges faced by the design and the verification teams. Reducing the verification time without compromising the quality of the verification is the greatest challenge to the verification engineers. Improving the verification process is highly critical to improve upon time to market. To achieve this, re-use of the verification environment across different levels is the way forward. The re-use of the verification environment can be achieved at following levels:
Reuse with different IPs
Reuse at different levels of integration
Reuse at different levels of abstraction (SystemC (PV/PVT), RTL)
The paper covers the following:
Methodology adopted to address the re-use of the test environment/testbench at unit level across testing of highly abstract level models (modeled in SystemC) and RTL models (modeled in VHDL/Verilog)
Methodology and challenges faced towards unit level verification of complex TLM (SystemC) model (memory controllers: external static memory controller and external nand flash controller) using this re-use methodology
Methodology in creating verification IP’s to provide interfaces to enable its re-use at these different levels of abstraction
Following tools are used in this methodology:
Specman Elite as the functional verification tool which supports coverage driven verification methodology
vManager for plan driven verification
Scenario builder to create specific scenarios.
eVCs as the verification IP’s
1. Introduction
The paper describes the methodology on re-use of unit level verification framework across different levels of abstraction. It also mentions about how to create a new eVC or extend an existing eVC to provide TLM interface. Inputs to this paper are based on the experience from verification of the memory controller (re-using the RTL verification components in verification of the TLM model).
2. Motivation
Re-use of the coverage driven verification framework and environment is very important to reduce the time taken for verification. With challenges to build a TLM model in line with the time to market, it is very important to reduce the time taken to create the model and validate the model without compromising the quality. At present in NXP there are portfolio IP’s available at RTL for which the SystemC TLM models are being developed. Lots of effort has gone in the verification these RTL IP’s. If there is a possibility to reuse the testbenches developed for RTL verification in the verification of the TLM models, then the time required to verify the TLM models can be reduced. In the near future, the SystemC TLM models will be developed much before the RTL models. In this case the testbenches developed to verify SystemC TLM models can be re-used and extended for the verification of the RTL models. Re-use of the verification framework across the various abstraction levels is extremely important to reduce the total development time.
3. Technical Details
The main expectations from such a re-use approach can be categorized into:
High Level:
Reuse of the existing RTL verification environment to verify SystemC model
Minimum bring up time of verification framework
Common methodology towards creation of re-usable verification framework for all groups and environments
Technical view:
Reuse existing Specman sequences, monitors, scoreboard and other eRM compliant verification components from the RTL verification environment
Clear methodology to support RTL and SystemC models
3.1 Verification Environment Overview
3.1.1 Recommendations in creating re-usable Module eVC
The following requirements are essential for Module eVC re-use:
No interference between eVCs
Common look and feel, similar activation and similar documentation
Support for combining eVCs (control, checking, layering etc.)
Support for modular debugging
Commonality in implementation
Avoid using too many output messages
Avoid using too many parallel threads
Avoid sampling events at @sys.any
Use list resize() for large lists
Use Keyed list for better memory performance
Use str_join() instead of append() for large strings
3.1.2 Integrating Module eVCs into an SVE
All eVCs and connections between them are created during generation. Best known practice of generating and connecting eVCs is discussed to address following issues.
Decide when to use pointers and when to use ports
Resolve generation issues such as :
Generation order
Connecting cross pointers
To connect eVCs with pointers:
In the system eVC, define the pointers from the system eVC to the interface eVCs
Avoid pointers in the opposite direction. The interface eVC should be independent of the system eVCs associated with it
In the SVE instantiate the eVCs
In both the eVCs and the SVE, connect the pointers procedurally
The pointers between eVCs are connected procedurally after generation of the architecture. The connect_pointers() method is activated in a top-down fashion. The method is called automatically after all units have been generated and the pointers of the parent unit have been connected by the parent unit’s connect_pointers() method
3.1.3 Configuration Re-usability
The eVC configuration is a reusable aspect that must be encapsulated with the eVC. When an eVC becomes part of a system, some of its configuration is fixed according to the specific use in the system.
Each level in the unit hierarchy can have a configuration struct. Configuration is always projected top down, typically using constraints from the parent.
The configuration of a component depends only on the configuration of the parent environment.
If the configuration of siblings is mutually dependent, the dependency must be generated in the parent environment and propagated down to the siblings.
The key of configuration reusability is determining what elements of the configuration are reusable when the system becomes part of a bigger system. The elements that are reusable should be part of the eVC itself. The non-reusable configuration elements go into the SVE configuration file
3.1.4 Reusing sequences
Reusing sequences from the various components of the environment saves effort when building the verification environment. SoC environments typically require synchronization of the input of several agents. Virtual Sequence is the solution for providing synchronization on SoC level verification.
Multi channel sequence generation can be defined as follows:
Ensure that each of the agents has its own sequence (and sequence driver)
Define a new (virtual) sequence (and sequence driver) using the sequence statement and omitting the item parameter
Add the existing sequence drivers as fields of the new sequence driver
Pass the existing sequence drivers using constraints to the BFM sequences done by the virtual sequence.
A virtual sequence driver is always instantiated at the SVE level. Its primary role is to drive coordinated scenarios involving multiple inputs to the system. These scenarios are built from reusable sequences from the lower-level eVCs. Virtual sequence drivers from the module level can be reused (instantiated) on the system level. These sequence drivers are:
Defined in module eVCs
Instantiated in the SVE of the module eVC (as a usage example)
Reused by instantiating in a system SVE
Module-level sequences are not always reusable on the system level. In general, mixing random sequences can break a design. For example, inputs that are accessible at module level might not be accessible at system level.
3.1.5 Additional recommendations
Create a uRM compliant top-level verification framework for it to be re-usable at different levels of abstractions (RTL and TLM)
Create test sequences using virtual sequences. Virtual sequences, unlike BFM sequences, are not tightly connected to a specific sequence type or item. Virtual sequences can do sequences of other types (but not items). As a result, one can use virtual sequences to drive more than one agent and models a generic driver. These virtual sequences can be easily connected to the driver of the Module eVC
Use ports for getting the internal state of the DUT. Do not use ‘tick defines to probe into the design. In case ‘tick defines is absolutely required, provide an option to switch off this tick defines when the DUT is SystemC. ‘tick defines in the code result in error during the creation of the stub e.g. sync true ( '~/ip_xxx_tb_testbench_full/pwr_c_sys_ack'== 0)
Use backpointers to units to access any object instantiated in the verification environment. Avoid using “sys.
No comments:
Post a Comment