Your Ad Here

Thursday, March 12, 2009

Creation of Stimulus using e-language

In order to start verification process, we need to generate the input stimulus defined by protocol for the given DUT (Device under Test) either using a random approach or using a constrained random. To generate the required information we need to declare the struct followed by the corresponding fields. Each field should be of Specific type either predefined or user-defined (e.g enumerated types). To generate the defined fields we make use of Specman elite generator to generate each field with a random value unless it is not constrained. Let’s consider a Network packet having data, length and address, which are to be generated randomly.

Ex : Let's look at the Network Packet Structure definition
file name : packet.e

<’
struct packet_s {

Addr: uint (bits: 2);
Len: uint (bits: 6);
Data: list of byte;

};
‘>


once the struct is defined, it needs to be Instantiated at the specman top level for generation.

Ex : file name top.e

<'
import Packet.e ;

extend sys {

packet : packet_s; // Instantiate the packet struct

};

‘>

Wednesday, March 11, 2009

How to write an e-program block

The e program block is indicated by the keyword struct.

The Program Block contains the following format.

struct struct_name {

--- Field declaration;

--- Methods with /without return type;

};

The main e-Program block is where:

· Fields are declared inside the struct_name

· Variables are declared inside the methods

· Executable statements are carried out

· Calls to methods with arguments are made

Tuesday, March 10, 2009

Basic syntax of e-language

Specman e-language is case sensitive in nature for both the predefined syntax keywords and user-defined names.
The name my_struct_s and my_STRUCT_S are both different structs defined in the e-language.

struct my_struct_s {
--- Action to be performed
}

struct my_STRUCT_S {
---- Action to be performed
}

Here struct is a specman e-language keyword.

The important aspect of the e-language is that the e-code written should be within the delimiters (e.g <' '>) and the code written outside the delimiters are considered as comments. In order to have single inline comments within the delimiters we can have both the VHDL / Verilog format ( e.g -- or // ) .

Ex :
The below code shows a sample e-language code structure
<'
struct my_packet_s {
// Field Declaration ( single line comment)
Addr : byte;
Data : byte;
Len : uint (bits:6);
method_name() is {
--- Action required
}
}; // end of struct my_packet_s

'>

Know more about what e-language supports

e-language can be distinguished as Programming Language ( like any other programming languages e.g C, C++) and as well Simulation Language ( Simulation related concept).
e-language supports the lexical elements and also some of the basic Programming Concepts (e.g data types).
It supports the following sections.
1) Lexical Elements
2) Data types and Variable Declaration
3) Arrays ( one-dimensional)
4) Enumerated Types

5) Operators
6) Variable assignment


Monday, March 9, 2009

Introduction to specman e-language

Specman e verification language is an HVL (Hardware Verification Language) Language and an IEEE standard language used by most of the verification engineers for Block/SOC Verification. It is one of most advanced language in terms of methodology and technology for building the Verification environment.
Specman e-language has a unique concept called Aspect-oriented Programming, that enables easier reuse and provide "extendibility" features for derivative environments and follows the eRM Methodology.
According to the eRM (e Reusable Methodology) the Verification environment is designed to have a Stimulus Generator, Driver, BFM (Bus Functional Module) and to intergrate all these elements it has an Agent which could be Transmitter (Tx) or Receiver (RX).

The Top Verification Environment categories into Active and Passive Elements. The Active Elements consists of Stimulus Generator, Driver and BFM whereas the Passive Elements Consists of Monitors (e.g Checkers, Signal Map and Functional Coverage). These Elements can be Enabled / Disabled by built in switch depending on the requirement. The Functional Coverage is one of the important element in the Specman e-verification which gives the verification engineer to cover all the important functionality in terms of coverage elements.