E (verification language)
   HOME

TheInfoList



OR:

e is a hardware verification language (HVL) which is tailored to implementing highly flexible and reusable verification testbenches.


History

''e'' was first developed in 1992 in Israel by Yoav Hollander for his Specman software. In 1995 he founded a company, ''InSpec'' (later renamed Verisity), to commercialize the software. The product was introduced at the 1996
Design Automation Conference The Design Automation Conference, or DAC, is an annual event, a combination of a technical conference and a trade show, both specializing in electronic design automation (EDA). DAC is the oldest and largest conference in EDA, started in 1964. ...
.Samir Palnitkar: ''Design verification with e'', Prentice Hall PTR. October 5, 2003. Verisity has since been acquired by Cadence Design Systems.


Features

Main features of ''e'' are: * Random and constrained random stimulus generation * Functional coverage metric definition and collection * Temporal language that can be used for writing assertions *
Aspect-oriented programming In computing, aspect-oriented programming (AOP) is a programming paradigm that aims to increase modularity by allowing the separation of cross-cutting concerns. It does so by adding behavior to existing code (an advice) ''without'' modifying th ...
language with reflection capability * Language is DUT-neutral in that you can use a single ''e'' testbench to verify a SystemC/C++ model, an RTL model, a gate level model, or even a DUT residing in a hardware acceleration box (using the UVM Acceleration for ''e'' Methodology) * Can create highly reusable code, especially when the testbench is written following the Universal Verification Methodology (UVM) ** Formerly known as ''e'' Re-use Methodology (''e''RM) ** UVM ''e'' library and documentation can be downloaded here
UVM World


Language Features

The ''e'' language uses an
aspect-oriented programming In computing, aspect-oriented programming (AOP) is a programming paradigm that aims to increase modularity by allowing the separation of cross-cutting concerns. It does so by adding behavior to existing code (an advice) ''without'' modifying th ...
(AOP) approach, which is an extension of the
object-oriented programming Object-oriented programming (OOP) is a programming paradigm based on the concept of "objects", which can contain data and code. The data is in the form of fields (often known as attributes or ''properties''), and the code is in the form of ...
approach to specifically address the needs required in functional verification. AOP is a key feature in allowing for users to easily bolt on additional functionality to existing code in a non-invasive manner. This permits easy reuse and code maintenance which is a huge benefit in the hardware world, where designs are continually being tweaked to meet market demands throughout the project lifecycle. AOP also addresses cross cutting concerns (features that cut across various sections of the code) easily by allowing users to extend either specific or all instances of a particular struct to add functionality. Users can extend several structs to add functionality related to a particular feature and bundle the extensions into a single file if desired, providing for more organized file partitioning.


Comments

Executable ''e'' code is enclosed within code-segment markers <' and '>:


Example

Anything outside the markers is a comment
<'
extend sys ;
'>


Classes

''e'' also has two kinds of classes: * Dynamic classes are labeled with the keyword 'struct'. Structs are used for creating data that only exists temporarily and may be cleaned by the garbage collector. * Static classes are labeled with the keyword 'unit'. Units are used for creating the permanent testbench structure. A class may contain fields, methods, ports and constraints. Fields can be of type integer, real, enum, string and even complex objects. The code segment shows a unit called 'environment_u' being instantiated within the e root 'sys'. This environment_u class contains a list of 5 packet_s objects and this packet_s class contains two fields and a method.


Example

<'
// This is a dynamic class with two fields
struct packet_s ;

// This is a static class with a list of five packet struct
unit environment_u ;

// sys is the root for every e environment and instantiates the 'test_env' object
extend sys ;
'>


Randomization

In ''e'' each field is randomized by default. Field randomization can be controlled by hard constraints, soft constraints or even be turned off completely. Soft constraints are used as the default constraints, and may be automatically overridden by the test layer if a conflict occurs. Otherwise it behaves like a regular constraint.


Example

<'
struct my_pkt_s ;
'>


Assertions

''e'' supports assertions with temporal expressions. A temporal expression is used at the same syntactic level as fields and methods and is thereby declarative by nature. A temporal expression describes timed behavior.


Example

<'
unit temporal_example_u ;
'>


Coverage

''e'' supports coverage that are grouped according to their sampled event and those groups are internally structured with items. Items can be simple items or complex items such as crossed items or transitional items.


Example

unit coverage_example_u ;


Messaging & Reporting

Messaging within ''e'' can be done with various methods.


Example

unit message_example_u ;


Interfacing With Other Languages

An ''e'' testbench is likely to be run with RTL or higher-level models. Bearing this in mind, ''e'' is capable of interfacing with
VHDL The VHSIC Hardware Description Language (VHDL) is a hardware description language (HDL) that can model the behavior and structure of digital systems at multiple levels of abstraction, ranging from the system level down to that of logic gate ...
,
Verilog Verilog, standardized as IEEE 1364, is a hardware description language (HDL) used to model electronic systems. It is most commonly used in the design and verification of digital circuits at the register-transfer level of abstraction. It is als ...
, C,
C++ C++ (pronounced "C plus plus") is a high-level general-purpose programming language created by Danish computer scientist Bjarne Stroustrup as an extension of the C programming language, or "C with Classes". The language has expanded significan ...
and
SystemVerilog SystemVerilog, standardized as IEEE 1800, is a hardware description and hardware verification language used to model, design, simulate, test and implement electronic systems. SystemVerilog is based on Verilog and some extensions, and since ...
.


Example of an ''e'' <-> Verilog Hookup

// This code is in a Verilog file tb_top.v module testbench_top; reg a_clk; always #5 a_clk = ~a_clk; initial begin a_clk = 0; end endmodule
This code is in a signal_map.e file
<'
unit signal_map_u ;
'>


Aspect-Oriented Programming Support in ''e''

The process of functional verification requires to raise the level of abstraction of any Design Under Test (DUT) beyond the RTL level. This necessity calls for a language that is capable of encapsulating data and models, which is readily available in object-oriented languages. To address this need has been designed to be ''e'' an object-oriented language and on top of that has been augmented with aspect-oriented mechanisms that facilitate not only writing highly flexible and reusable testbenches, but also helps verification engineers by enabling to patch discovered RTL bugs without having to rewrite or touch any of the already existing code base.
Aspect-oriented programming in ''e'' allows verification engineers to structure their testbench in aspects. An object is therefore the sum of all its aspects, which may be distributed over multiple files. The following sections illustrate basic aspect-oriented mechanisms in e.


Subtyping Mechanism

Subtyping is the prime example of what object-oriented languages without aspect-oriented features can not accomplish. Subtyping allows a verification engineer to add functionality to an already defined/implemented class without having to derive from a base class. The following code shows the original implementation of a base-class and how it is extended. Once the extension took place, all base-class objects contain the extensions as well. The constraints given in the two different subtypes would usually cause a contradiction, however both subtypes are handled separately and thus each subtype yields a different constraint calculation.


Subtyping Mechanism Example

subtyping_example.e
<'
// This enum type definition is used to declare the subtypes ODD and EVEN
type ctrl_field_type_t:  DD, EVEN
unit base_ex_u ;
'>


Extending Methods

The original unit definition is given in file1.e. The aspect-oriented mechanism used in this example shows how to execute code before and after an already implemented method.


Method Extension Example

This code is in file1.e
<'
unit aop_example_u ;
'>
This code is in file2.e
<'
extend aop_example_u ;
'>


References


The e Hardware Verification Language
Sasan Iman and Sunita Joshi, Springer, May 28, 2004

David Robinson, 2007


Sources


The e language blog (Team Specman)
* http://www.deepchip.com/items/0488-05.html (good feedback from users on their experiences with the e language) * http://www.cadence.com/products/functional_ver/specman_elite/index.aspx * http://www.us.design-reuse.com/articles/article5646.html * Janick Bergeron: ''Writing Testbenches: Functional Verification of HDL Models'', Second Edition, Kluwer Academic Publishers, 2003, {{ISBN, 1-4020-7401-8 * https://web.archive.org/web/20070405162901/http://amiq.ro/eparser.html * http://www.thinkverification.com/ * http://www.dvteclipse.com/help.html?documentation/e/index.html Hardware verification languages