aarthi nadarajan l.
Skip this Video
Loading SlideShow in 5 Seconds..
Introducing Specman PowerPoint Presentation
Download Presentation
Introducing Specman

Loading in 2 Seconds...

play fullscreen
1 / 29

Introducing Specman - PowerPoint PPT Presentation

  • Uploaded on

Aarthi Nadarajan . Introducing Specman . Interns – Basic Intro . Language “e” The ‘e’ Language has constructs necessary for verification automation Specman Elite is the tool from Verisity (now Cadence) that simulates ‘e’ code stand-alone or also with HDL simulator . What is Specman ?.

I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
Download Presentation

Introducing Specman

An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.

- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
what is specman

Language “e”

The ‘e’ Language has constructs necessary for verification automation

Specman Elite is the tool from Verisity (now Cadence) that simulates ‘e’ code stand-alone or also with HDL simulator

What is Specman ?
e as a programming language

High Extensibility

All common procedural actions

No complex pointer arithmetic

Automated memory management

Predefined data structures

‘e’ as a Programming Language
what are structs what are units code structure basic e language
What are structs

What are units

Code Structure

Basic ‘e’ Language

Getting Started

Interns – Basic Intro

what are structs and units

    Structs are dynamic objects and created on the fly when you want to use it and are usually destroyed by garbage collection mechanism.

Units are static objects which stay alive from start to end . They are generated at simulation zero time.

Class in C

What are Structs and Units ?
defining units and structs

struct is a keyword. All syntax

keywords are lower-case.

The name my_struct is different

from the name MY_STRUCT.

Defining units and structs

Example Code

  • Thee language is case sensitive.
  • Both for predefined syntax keywords and user-defined names.


struct my_struct {


struct MY_STRUCT {


basics of e language

Basics of ‘e’ Language

Interns – Basic Intro

defining enumerated types
Defining Enumerated Types


typeenum-type: [name1[=exp],...] [(bits|bytes: width-exp)];


type opcode: [ADD, SUB];

  • By default the new enumerated type is 32 bits, but it can be sized
  • according to the number of bits required.
  • type direction: [READ, WRITE](bits: 1);
  • Enumerated type statement. Default first enum value is 0. Subsequent
  • enum values increment by 1. This internal value is used for
  • comparisons (with strong type matching maintained).
  • Values can be explicitly assigned with the syntax:

typeopcode: [ADD= 4, SUB = 6];

import e files

Include in C

Import ‘e’ Files
  • Specman e files are called modules.

To reference statements or struct members that are declared in other

modules, use the import statement so that Specman loads those

modules first.

The import statement must be before any other statements.

Syntax: import file-name, … | ( file-name, … );



import my_packet, my_port;

. . .


lists in e

Lists • List types hold ordered collections of data elements where each data element conforms to the same type. • Items in a list can be indexed with the subscript operator [ ], by placing a non-negative integer expression in the brackets. • List indexes start at zero. You can select an item from a list by specifying its index.

• Lists are dynamically resizable.

• Lists contain many predefined methods.

• Lists are defined by using the list of keyword in a variable or a field definition.

Lists in ‘E’

• emethods are similar to C functions, Verilog tasks, and VHDL processes.

• An emethod is an operational procedure containing actions that define its behavior. Syntax:method_name([arg: type, …])[:return_type] is {action;};


Methods can: • Contain actions (procedural code). • Declare and use local variables. • Have zero to fourteen input arguments/parameters. • Optionally return a value • Optionally consume time if declared to be a “Time-Consuming Method(TCM)”

What values can be read or written inside a method? • Locally declared variables within the method • Fields within the local struct’ • Arguments (parameters) and return value of the method • Fields in other structs using path notation

procedural control

Procedural flow control elements: 1. if then else Syntaxifbool-exp [then] {action; ...} [else ifbool-exp [then] {action; ...}] [else {action; ...}]

2. case labeled-case-item Syntaxcasecase-exp {labeled-case-item; . [default: {default-action; .}]}

3. case bool-case-item

Syntax case {bool-case-item; ... [default{default-action;...}]}

Procedural Control
procedural loop constructs

1. while Syntax whilebool-exp [do] {action; ...}2. repeat until Syntax repeat{action; ...}until bool-exp3. for each in Syntax for each [type] [(item-name)] [using index (index-name)] in [reverse] list-exp [do] {action; .}

4. for from to Syntax for var-namefromfrom-exp [down] toto-exp [step

step-exp] [do] {action; .}

5. for Syntax for {initial-action; bool-exp; step-action} [do] {action; ...}

Procedural Loop Constructs

Constraints are directives that influence the behavior of the Specman test generator. They are declared within a struct and influence the generation of values for data items within the struct and its subtree. 1. Hard Constraints2. Soft Constraints


Constraints can be defined in many ways:

. By defining a range of legal values in the field or variable declaration . By defining a list size in the list declaration . By using one of the keep construct variations within a struct definition . By using a gen...keeping action within a method

defining constraints

keep Syntax keep constraint-bool-exp keep for each Syntax keep for each [(item-name)] [using [index (index-name)] [prev(prev-name)]] ingen-item{constraint-bool-exp | nested-for-each; .}

Defining Constraints
defining constraints21

keep soft Syntax keep soft constraint-bool-exp

keep soft - select Syntax keep softgen-item==select {weight:value; .}

Defining Constraints

There are two ways to implement object-oriented inheritance in e: like inheritance or when inheritanceLikeinheritance is the classical, single inheritance familiar to users of all object-oriented languages and is specified with the like clause in new struct definitions. When inheritance is a concept unique to e and is specified by defining subtypes with when struct members. When inheritance provides the following advantages compared to like inheritance: -Ability to have explicit reference to the when fields -Ability to have multiple, orthogonal subtypes -Ability to extend the struct later

time consuming methods

A TCM is a time-consuming method that is distinguished from a regular method by the presence of @event and can use time-consuming actions such as sync and wait.Invoking TCMs:1.tcm() Syntax[[struct-exp].]method-name([parameter-list])Description-Calling a TCM -You can call a TCM only from another TCM.

Time Consuming Methods
invoking tcm s

2.start tcm()

Syntax start [[struct-exp].]method-name([parameter-list])

DescriptionA start action can be used within another method, either a TCM or a regular method. A started TCM begins execution either when its sampling event occurs or immediately, if the sampling event has already occurred for the current Specman tick.A started TCM runs in parallel with the TCM that started it on a separate thread.Notes. A TCM that has a return value cannot be started with a start action.. You cannot start a TCM before the run phase begins or after the check phase begins.

Invoking TCM’s
packing and unpacking

Packing performs concatenation of scalars, strings, list elements, or struct fields in the order that you specifyUnpacking performs the reverse operation, splitting a single expression into multiple expressions.1.pack() Syntax pack(option:pack option,item: exp, .): list of bitParameterspacking.highPlaces the least significant bit of the last physical field declared or the highest list item at index [0] in the resulting list of bit. packing.lowPlaces the least significant bit of the first physical field declared or lowest list item at index [0] in the resulting list of bit.

Packing and Unpacking