Design Synopsys System Verilog API Donations to Accellera João Geada.

Slides:



Advertisements
Similar presentations
Introduction to C Programming
Advertisements

Construction process lasts until coding and testing is completed consists of design and implementation reasons for this phase –analysis model is not sufficiently.
Simulation executable (simv)
Reconfigurable Computing S. Reda, Brown University Reconfigurable Computing (EN2911X, Fall07) Lecture 07: Verilog (3/3) Prof. Sherief Reda Division of.
George Blank University Lecturer. CS 602 Java and the Web Object Oriented Software Development Using Java Chapter 4.
 2006 Pearson Education, Inc. All rights reserved Introduction to Classes and Objects.
 2006 Pearson Education, Inc. All rights reserved Introduction to Classes and Objects.
Module: Definition ● A logical collection of related program entities ● Not necessarily a physical concept, e.g., file, function, class, package ● Often.
© Copyright 1992–2004 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. Chapter 5 - Functions Outline 5.1Introduction 5.2Program.
ELEN 468 Lecture 161 ELEN 468 Advanced Logic Design Lecture 16 Synthesis of Language Construct II.
 2008 Pearson Education, Inc. All rights reserved Introduction to Classes and Objects.
Creating Test Environments HDL Model HDL Testbench Simulation Engine API stimulus check Testbench Program stimulus check Non-HDL languages may be used.
 2008 Pearson Education, Inc. All rights reserved Introduction to Classes and Objects.
 2006 Pearson Education, Inc. All rights reserved Introduction to Classes and Objects.
Digital System Design Verilog ® HDL Tasks and Functions Maziar Goudarzi.
Principle of Functional Verification Chapter 1~3 Presenter : Fu-Ching Yang.
Today’s Lecture Process model –initial & always statements Assignments –Continuous & procedural assignments Timing Control System tasks.
Introduction to Methods
FunctionsFunctions Systems Programming Concepts. Functions   Simple Function Example   Function Prototype and Declaration   Math Library Functions.
Tasks and Functions Programmable Logic Design (40-493) Fall 2001 Computer Engineering Department Sharif University of Technology Maziar Gudarzi.
C++ for Engineers and Scientists Third Edition
1 VERILOG Fundamentals Workshop סמסטר א ' תשע " ה מרצה : משה דורון הפקולטה להנדסה Workshop Objectives: Gain basic understanding of the essential concepts.
C++ for Engineers and Scientists Second Edition Chapter 6 Modularity Using Functions.
MODULE 1.3 VERILOG BASICS UNIT 1 : INTRODUCTION TO VERILOG TOPIC : System Tasks and Compiler directive.
© Copyright 1992–2004 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. C How To Program - 4th edition Deitels Class 05 University.
1 Workshop Topics - Outline Workshop 1 - Introduction Workshop 2 - module instantiation Workshop 3 - Lexical conventions Workshop 4 - Value Logic System.
System Verilog Testbench Language David W. Smith Synopsys Scientist
Chapter 6: User-Defined Functions
ECE 551 Digital System Design & Synthesis Fall 2011 Midterm Exam Overview.
Copyright © 2005 Elsevier Chapter 8 :: Subroutines and Control Abstraction Programming Language Pragmatics Michael L. Scott.
VHDL Introduction. V- VHSIC Very High Speed Integrated Circuit H- Hardware D- Description L- Language.
Tuc Goodwin  Object and Component-Oriented Programming  Classes in C#  Scope and Accessibility  Methods and Properties  Nested.
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.
C++ History C++ was designed at AT&T Bell Labs by Bjarne Stroustrup in the early 80's Based on the ‘C’ programming language C++ language standardised in.
1 Workshop Topics - Outline Workshop 1 - Introduction Workshop 2 - module instantiation Workshop 3 - Lexical conventions Workshop 4 - Value Logic System.
Copyright 2004 Scott/Jones Publishing Alternate Version of STARTING OUT WITH C++ 4 th Edition Chapter 7 Structured Data and Classes.
Module 2.1 Gate-Level/Structural Modeling UNIT 2: Modeling in Verilog.
ADTs and C++ Classes Classes and Members Constructors The header file and the implementation file Classes and Parameters Operator Overloading.
Chapter 10 Introduction to Classes
Fall 2004EE 3563 Digital Systems Design EE 3563 VHSIC Hardware Description Language  Required Reading: –These Slides –VHDL Tutorial  Very High Speed.
C Functions Three major differences between C and Java functions: –Functions are stand-alone entities, not part of objects they can be defined in a file.
Electrical and Computer Engineering University of Cyprus LAB 1: VHDL.
Slide 1 2. Verilog Elements. Slide 2 Why (V)HDL? (VHDL, Verilog etc.), Karen Parnell, Nick Mehta, “Programmable Logic Design Quick Start Handbook”, Xilinx.
Chap. 4 Modules and Ports. 2 Modules and Ports Modules Ports Hierarchical Names Summary.
Introduction to c++ programming - object oriented programming concepts - Structured Vs OOP. Classes and objects - class definition - Objects - class scope.
© 2005 Xilinx, Inc. All Rights Reserved This material exempt per Department of Commerce license exception TSU HDL Co-Simulation.
 2007 Pearson Education, Inc. All rights reserved C Arrays.
CS-1030 Dr. Mark L. Hornick 1 Basic C++ State the difference between a function/class declaration and a function/class definition. Explain the purpose.
Way beyond fast © 2002 Axis Systems, Inc. CONFIDENTIAL Axis Common Transaction Interface (CTI) Architecture Highlights 9/11/2003 Ching-Ping Chou Axis Systems,
CSCI-365 Computer Organization Lecture Note: Some slides and/or pictures in the following are adapted from: Computer Organization and Design, Patterson.
 2008 Pearson Education, Inc. All rights reserved Introduction to Classes and Objects.
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.
STL CSSE 250 Susan Reeder. What is the STL? Standard Template Library Standard C++ Library is an extensible framework which contains components for Language.
Verification Presentation to SystemVerilog Basic Committee Peter Flake Nov 15, 2002.
Programming Fundamentals1 Chapter 7 INTRODUCTION TO CLASSES.
Chapter 7 - Functions. Functions u Code group that performs single task u Specification refers to what goes into and out of function u Design refers to.
Defining Data Types in C++ Part 2: classes. Quick review of OOP Object: combination of: –data structures (describe object attributes) –functions (describe.
Object Based Programming Chapter 8. 2 Contrast ____________________ Languages –Action oriented –Concentrate on writing ________________ –Data supports.
C++ History C++ was designed at AT&T Bell Labs by Bjarne Stroustrup in the early 80's Based on the ‘C’ programming language C++ language standardised in.
C++ for Engineers and Scientists Second Edition
Chap. 8 :: Subroutines and Control Abstraction
Chap. 8 :: Subroutines and Control Abstraction
Introduction to Classes and Objects
Test Fixture (Testbench)
Introduction to Digital System and Microprocessor Design
SystemVerilog and Verification
ENERGY 211 / CME 211 Lecture 8 October 8, 2008.
COE 202 Introduction to Verilog
Presentation transcript:

Design Synopsys System Verilog API Donations to Accellera João Geada

© 2001 Synopsys, Inc. (2) CONFIDENTIAL Outline Introduction Donations  DirectC (Direct Foreign Language API)  Assertion API  Coverage Metrics API For each donation, will be presenting  Requirements/needs addressed by API  Changes/additions to SV (if any)  Overview of the API  Questions & Answers

© 2001 Synopsys, Inc. (3) CONFIDENTIAL Direct C interface Requirements Use model Additions to System Verilog Value exchange API  Direct access  Abstract access DirectC function DirectC module

© 2001 Synopsys, Inc. (4) CONFIDENTIAL Requirements Users need a simple to use, high-performance interface to incorporate programming language (C/C++) models into their designs Interface should have minimal impact on existing designs Foreign language functions/modules usage must be identical to Verilog functions/modules  To permit arbitrary replacement of functions/modules from C to Verilog or vice-versa by merely changing the declaration

© 2001 Synopsys, Inc. (5) CONFIDENTIAL Use model User declares external functions and/or modules in System Verilog External functions/modules used exactly the same as normal functions & modules Compiler generates a C/C++ header file from the external declarations  Used to validate prototypes of all external functions and modules and any complex structures passed through ports  User is not required to include this header file in their C/C++ code, though it is recommended User supplies the C/C++ source code or object code/library to the simulator/compiler

© 2001 Synopsys, Inc. (6) CONFIDENTIAL Additions to System Verilog One new type over System Verilog  Pointer type  Pointers are opaque in the System Verilog side and cannot be manipulated, only passed to other functions, modules  Size of pointer is not defined, permitting operation on both 32 and 64 bit simulators Keywords  extern Already a System Verilog keyword  cmodule Only a keyword at the top declarative level

© 2001 Synopsys, Inc. (7) CONFIDENTIAL External C function declarations Declarations made in the top-level context  extern [mode] [attribute] return-type function-id ( args ); Mode is the access mode: direct or abstract Attribute indicates if function is “pure”, ie has no side-effects  Pure functions permit more advance optimizations All args have direction:  Input, output, inout

© 2001 Synopsys, Inc. (8) CONFIDENTIAL External cmodule declaration External module declaration  Declarations made in the top-level context  cmodule module-id ( port-list ) port-direction-list { }  All ports have direction: Input, output, inout  Cmodule ports are always registers, never nets No resolution function  Cmodule ports cannot be coerced Assignments to input ports not permitted

© 2001 Synopsys, Inc. (9) CONFIDENTIAL Value exchange API Two value exchange APIs provided  Abstract access  Direct Access Abstract access  Safe operation All values passed via opaque handles Values obtained from handle via a number of provided functions (47 vc_*() functions) Functions will validate arguments and prevent access errors  Compatible across all simulators

© 2001 Synopsys, Inc. (10) CONFIDENTIAL Value exchange API (cont.) Direct access  Highest performance, little error checking Uses simulator’s native format: may be simulator dependent Errors in usage of value may result in core-dumps or unexpected behavior  Input values values with C/C++ compatible types passed by value For all other types, and for output and inout ports, values passed by reference  Values manipulated directly in normal C/C++ operations without any error or bounds checking

© 2001 Synopsys, Inc. (11) CONFIDENTIAL DirectC Functions Have no simulation time duration Can be used anywhere a Verilog function could be used  Only declaration changes, not usage May contain state and or have side-effects  These functions may not be declared “pure”

© 2001 Synopsys, Inc. (12) CONFIDENTIAL DirectC Modules Permit simulation time to pass within C/C++ code Used as any normal Verilog module  Only declaration changes, not usage May contain multiple  Initial blocks  Always blocks  “global” variables, useable by all blocks, but not accessible from Verilog C code can contain  Delay control statements vc_delay(time);  Event control

© 2001 Synopsys, Inc. (13) CONFIDENTIAL Questions & Answers 5 minutes time limit

© 2001 Synopsys, Inc. (14) CONFIDENTIAL Assertion API Requirements Static assertion information  Assertion iterators  Type information  Source information Dynamic assertion information  Callbacks  Assertion controls

© 2001 Synopsys, Inc. (15) CONFIDENTIAL Requirements Tools and test benches require access to assertion information  Reactive test benches  Use of temporal assertions for coverage  Debug/analysis tools Assertions may be built-in to the simulator or provided as a add-on capability  Separate API required, to permit the API to be independent of simulator implementation

© 2001 Synopsys, Inc. (16) CONFIDENTIAL Static assertion information Provides means to obtain  Assertion by name  Assertion iterator  Assertion clock  Assertion source info Start line and column End line and column  Assertion type

© 2001 Synopsys, Inc. (17) CONFIDENTIAL Dynamic assertion information Callbacks  Callbacks on assertion events Attempt, success, failure events, control events Callbacks provide full information on  Attempt start and end times  Type of event  Callbacks on engine events Initialization, finish events, control events Assertion control  Reset, stop or terminate assertion engine  Reset, disable, enable a specific assertion  Terminate current assertion attempt(s) leaving assertion active

© 2001 Synopsys, Inc. (18) CONFIDENTIAL Questions & Answers 5 minutes time limit

© 2001 Synopsys, Inc. (19) CONFIDENTIAL Coverage Metrics API Requirements User level coverage API  System tasks  C API Tool level  C API

© 2001 Synopsys, Inc. (20) CONFIDENTIAL Requirements Realtime coverage information needed  By reactive testbenches  To control random stimulus generators Users require a common means to access coverage information regardless of tool or coverage metric Coverage metrics are available both as a built-in simulator capability and as a feature provided by stand-alone tools  Separate API required, so that API independent of simulator implementation

© 2001 Synopsys, Inc. (21) CONFIDENTIAL Real time coverage system tasks Enums  Coverage types Line, condition, toggle, fsm state, fsm transition Coverage types easily extended without modifying API  Scope control  Return value categories Error, partial success, success Control task  Enable/disable coverage  Query availability of coverage Task to obtain current coverage value Task to obtain coverage limiting value  Coverage % = (current / limit) * 100

© 2001 Synopsys, Inc. (22) CONFIDENTIAL Task scope control All tasks permit operation to be carried out selectively on  Named module  Named instance  Named hierarchy  All the hierarchies below the instances of a given module Each of the above can be arbitrarily combined, as separate individual arguments to a coverage task

© 2001 Synopsys, Inc. (23) CONFIDENTIAL Real time coverage user API C equivalent to the system tasks Addresses coverage reactivity requirements of HLVs and C testbenches Enums  Equivalent to the coverage enums in SV cm_coverage() cm_get_coverage() cm_get_limit()

© 2001 Synopsys, Inc. (24) CONFIDENTIAL Real time coverage tool API Provides more detailed access to FSM coverage  Iterate over all FSMs in module/instance cm_count_fsms(), cm_fsm_id()  State by state coverage cm_fsm_get_state()  Transition by transition coverage cm_fsm_get_transition()  Get FSM state vector cm_fsm_get_statevar() May be null for implied state FSMs

© 2001 Synopsys, Inc. (25) CONFIDENTIAL Questions & Answers 5 minutes time limit