Aarthi Nadarajan Interns – Basic Intro.  Language “e”  The ‘e’ Language has constructs necessary for verification automation  Specman Elite is the.

Slides:



Advertisements
Similar presentations
C Language.
Advertisements

Verilog Intro: Part 1.
Chapter 7 User-Defined Methods. Chapter Objectives  Understand how methods are used in Java programming  Learn about standard (predefined) methods and.
C++ Programming: Program Design Including Data Structures, Fourth Edition Chapter 15: Exception Handling.
Chapter 16: Exception Handling C++ Programming: From Problem Analysis to Program Design, Fifth Edition.
The Web Warrior Guide to Web Design Technologies
Elementary Data Types Prof. Alamdeep Singh. Scalar Data Types Scalar data types represent a single object, i.e. only one value can be derived. In general,
ECE 103 Engineering Programming Chapter 11 One Minute Synopsis Herbert G. Mayer, PSU CS Status 7/1/2014.
True or false A variable of type char can hold the value 301. ( F )
VBA Modules, Functions, Variables, and Constants
Case, Arrays, and Structures. Summary Slide  Case Structure –Select Case - Numeric Value Example 1 –Select Case - String Value Example  Arrays –Declaring.
Sistemas Digitais I LESI - 2º ano Lesson 5 - VHDL U NIVERSIDADE DO M INHO E SCOLA DE E NGENHARIA Prof. João Miguel Fernandes Dept.
Introduction to Java CS 331. Introduction Present the syntax of Java Introduce the Java API Demonstrate how to build –stand-alone Java programs –Java.
Elementary Data Types Scalar Data Types Numerical Data Types Other
Creating Test Environments HDL Model HDL Testbench Simulation Engine API stimulus check Testbench Program stimulus check Non-HDL languages may be used.
JavaScript, Third Edition
Today’s Lecture Process model –initial & always statements Assignments –Continuous & procedural assignments Timing Control System tasks.
C++ fundamentals.
Introduction to Array The fundamental unit of data in any MATLAB program is the array. 1. An array is a collection of data values organized into rows and.
Peter Juszczyk CS 492/493 - ISGS. // Is this C# or Java? class TestApp { static void Main() { int counter = 0; counter++; } } The answer is C# - In C#
Basic Elements of C++ Chapter 2.
1 Chapter One A First Program Using C#. 2 Objectives Learn about programming tasks Learn object-oriented programming concepts Learn about the C# programming.
JS Arrays, Functions, Events Week 5 INFM 603. Agenda Arrays Functions Event-Driven Programming.
CSM-Java Programming-I Spring,2005 Introduction to Objects and Classes Lesson - 1.
ECE 2372 Modern Digital System Design
Why to Create a Procedure
Workshop Topics - Outline
CPS120: Introduction to Computer Science
Chapter 8 High-Level Programming Languages. 8-2 Chapter Goals Describe the translation process and distinguish between assembly, compilation, interpretation,
Learners Support Publications Classes and Objects.
1 SystemVerilog Enhancement Requests Daniel Schostak Principal Engineer February 26 th 2010.
1 Workshop Topics - Outline Workshop 1 - Introduction Workshop 2 - module instantiation Workshop 3 - Lexical conventions Workshop 4 - Value Logic System.
JavaScript Syntax and Semantics. Slide 2 Lecture Overview Core JavaScript Syntax (I will not review every nuance of the language)
Chapter 15 Introduction to PL/SQL. Chapter Objectives  Explain the benefits of using PL/SQL blocks versus several SQL statements  Identify the sections.
Chapter 3 Functions, Events, and Control Structures JavaScript, Third Edition.
Fall 2004EE 3563 Digital Systems Design EE 3563 VHDL – Basic Language Elements  Identifiers: –basic identifier: composed of a sequence of one or more.
C++ Programming Basic Learning Prepared By The Smartpath Information systems
Introduction to Java Java Translation Program Structure
ISBN Chapter 6 Data Types Introduction Primitive Data Types User-Defined Ordinal Types.
Kazi ECE 6811 ECE 681 VLSI Design Automation Khurram Kazi* Lecture 9 Thanks to Automation press THE button outcomes the Chip !!! Reality or Myth *(lecture.
C++ Programming: Program Design Including Data Structures, Fourth Edition Chapter 8: User-Defined Simple Data Types, Namespaces, and the string Type.
Introduction to c++ programming - object oriented programming concepts - Structured Vs OOP. Classes and objects - class definition - Objects - class scope.
8-1 Compilers Compiler A program that translates a high-level language program into machine code High-level languages provide a richer set of instructions.
1 Verilog Digital System Design Z. Navabi, 2006 Verilog Language Concepts.
 In the java programming language, a keyword is one of 50 reserved words which have a predefined meaning in the language; because of this,
ELEE 4303 Digital II Introduction to Verilog. ELEE 4303 Digital II Learning Objectives Get familiar with background of HDLs Basic concepts of Verilog.
Chapter 15: Exception Handling C++ Programming: Program Design Including Data Structures, Fifth Edition.
Functions  A Function is a self contained block of one or more statements or a sub program which is designed for a particular task is called functions.
C++ for Java Programmers Chapter 2. Fundamental Daty Types Timothy Budd.
Visual Basic CDA College Limassol Campus COM123 Visual Programming 1 Semester B Lecture:Pelekanou Olga Week 5: Useful Functions and Procedures.
PHP Reusing Code and Writing Functions 1. Function = a self-contained module of code that: Declares a calling interface – prototype! Performs some task.
© 2006 Pearson Addison-Wesley. All rights reserved 1-1 Chapter 1 Review of Java Fundamentals.
Session 02 Module 3: Statements and Operators Module 4: Programming constructs Module 5: Arrays.
Java Basics. Tokens: 1.Keywords int test12 = 10, i; int TEst12 = 20; Int keyword is used to declare integer variables All Key words are lower case java.
JAVA Programming (Session 2) “When you are willing to make sacrifices for a great cause, you will never be alone.” Instructor: รัฐภูมิ เถื่อนถนอม
Chapter 4: Variables, Constants, and Arithmetic Operators Introduction to Programming with C++ Fourth Edition.
Java and C# - Some Commonalities Compile into machine-independent, language- independent code which runs in a managed execution environment Garbage Collection.
Liang, Introduction to C++ Programming, (c) 2007 Pearson Education, Inc. All rights reserved X 1 Chapter 9 Introduction of Object Oriented Programming.
Type Checking Generalizes the concept of operands and operators to include subprograms and assignments Type checking is the activity of ensuring that the.
Discussion 2: More to discuss
Java Primer 1: Types, Classes and Operators
The Selection Structure
11/10/2018.
Chapter 3 Introduction to Classes, Objects Methods and Strings
The Data Element.
Chap 2. Identifiers, Keywords, and Types
The Data Element.
C Language B. DHIVYA 17PCA140 II MCA.
COE 202 Introduction to Verilog
Presentation transcript:

Aarthi Nadarajan 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

 High Extensibility  All common procedural actions  No complex pointer arithmetic  Automated memory management  Predefined data structures

What are structs What are units Code Structure Basic ‘e’ Language Interns – Basic Intro

 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.

PurposeSyntax Code delimitation Inline comments -- VHDL style // Verilog Style Code block {... ;... ;... ; }; Names start with letter include only letters, numbers, and underscores Hierarchy path (between structs and their members). (dot)

Example: struct my_struct { }; struct MY_STRUCT { }; The e language is case sensitive. Both for predefined syntax keywords and user-defined names. struct is a keyword. All syntax keywords are lower-case. The name my_struct is different from the name MY_STRUCT. Example Code

Interns – Basic Intro

NameDescriptionExample boolBoolean value: TRUE or FALSEpacket_valid: bool; intInteger, default 32 bitslength: int; addr: int(bits: 24); uintUnsigned integer, default 32 bitsaddr: uint(bits: 8); bit1-bit unsigned integervalid: bit; byte8-bit unsigned integerdata: byte; time64-bit unsigned integerdelay: time; stringString of ASCII charactersprompt: string; listResizable, ordered arraypayload: list of byte;

Syntax : type enum-type: [name1[=exp],...] [(bits|bytes: width-exp)]; Example: type opcode: [ADD, SUB]; 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: type opcode: [ADD = 4, SUB = 6]; 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);

Syntax : import file-name, … | ( file-name, … ); Example: <' import my_packet, my_port;... '> 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.

 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.

e methods are similar to C functions, Verilog tasks, and VHDL processes. An e method 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 flow control elements: 1. if then else Syntax if bool-exp [then] {action;...} [else if bool-exp [then] {action;...}] [else {action;...}] 2. case labeled-case-item Syntax case case-exp {labeled-case-item;. [default: {default-action;.}]} 3. case bool-case-item Syntax case {bool-case-item;... [default {default-action;...}]}

1. while Syntax while bool-exp [do] {action;...} 2. repeat until Syntax repeat {action;...} until bool-exp 3. 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-name from from-exp [down] to to-exp [step step-exp] [do] {action;.} 5. for Syntax for {initial-action; bool-exp; step-action} [do] {action;...}

 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 Constraints 2. 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

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

 keep soft Syntax keep soft constraint-bool-exp  keep soft - select Syntax keep soft gen-item==select {weight: value;.}

 There are two ways to implement object-oriented inheritance in e: like inheritance or when inheritance Like inheritance 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

 A TCM is a time-consuming method that is distinguished from a regular method by the presence 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.

2.start tcm()  Syntax start [[struct-exp].]method-name([parameter-list])  Description A 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.

 Packing performs concatenation of scalars, strings, list elements, or struct fields in the order that you specify Unpacking performs the reverse operation, splitting a single expression into multiple expressions. 1.pack() Syntax pack(option:pack option, item: exp,.): list of bit Parameters packing.high Places 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.low Places the least significant bit of the first physical field declared or lowest list item at index [0] in the resulting list of bit.