Verification Presentation to SystemVerilog Basic Committee Peter Flake Nov 15, 2002.

Slides:



Advertisements
Similar presentations
Verilog HDL -Introduction
Advertisements

Simulation executable (simv)
Combinational Logic.
Hardware Description Language (HDL)
CSE 201 Computer Logic Design * * * * * * * Verilog Modeling
Chapter 3 Data Abstraction: The Walls. © 2005 Pearson Addison-Wesley. All rights reserved3-2 Abstract Data Types Modularity –Keeps the complexity of a.
1 Chapter 4 Language Fundamentals. 2 Identifiers Program parts such as packages, classes, and class members have names, which are formally known as identifiers.
ENEE 408C Lab Capstone Project: Digital System Design Verilog Tutorial Class Web Site:
ECE 353 Computer Systems Lab I Verilog Hardware Description Language.
Topics of Lecture Structural Model Procedures Functions Overloading.
CS-341 Dick Steflik Introduction. C++ General purpose programming language A superset of C (except for minor details) provides new flexible ways for defining.
Fundamental Programming Structures in Java: Comments, Data Types, Variables, Assignments, Operators.
Lesson 6 Functions Also called Methods CS 1 Lesson 6 -- John Cole1.
2/3/03ΗΥ220 - Μαυροειδής Ιάκωβος1 Delays in Behavioral Verilog - Interassignment Delay  Key idea: unlike blocking delay, RHS is evaluated before delay.
VB .NET Programming Fundamentals
Today’s Lecture Process model –initial & always statements Assignments –Continuous & procedural assignments Timing Control System tasks.
Design Synopsys System Verilog API Donations to Accellera João Geada.
Lesson15. JavaScript Objects Objects encapsulate data (properties) and behavior(methods); the properties and the methods of an object are tied together.
Overview Logistics Last lecture Today HW5 due today
Tasks and Functions Programmable Logic Design (40-493) Fall 2001 Computer Engineering Department Sharif University of Technology Maziar Gudarzi.
1 CISC181 Introduction to Computer Science Dr. McCoy Lecture 19 Clicker Questions November 3, 2009.
1 VERILOG Fundamentals Workshop סמסטר א ' תשע " ה מרצה : משה דורון הפקולטה להנדסה Workshop Objectives: Gain basic understanding of the essential concepts.
IAY 0600 Digitaalsüsteemide disain Event-Driven Simulation Alexander Sudnitson Tallinn University of Technology.
1 Workshop Topics - Outline Workshop 1 - Introduction Workshop 2 - module instantiation Workshop 3 - Lexical conventions Workshop 4 - Value Logic System.
Chapter 6: Functions Starting Out with C++ Early Objects
SoC Verification HW #2 TA: Wei-Ting Tu Assignment: 04/12/06
System Verilog Testbench Language David W. Smith Synopsys Scientist
A VHDL Tutorial ENG2410. ENG241/VHDL Tutorial2 Goals Introduce the students to the following: –VHDL as Hardware description language. –How to describe.
Verilog Language Concepts
ECE 551 Digital System Design & Synthesis Fall 2011 Midterm Exam Overview.
Hello.java Program Output 1 public class Hello { 2 public static void main( String [] args ) 3 { 4 System.out.println( “Hello!" ); 5 } // end method main.
SystemVerilog. History Enhancement of Verilog Enhancement of Verilog 2002 – accellera publishes SystemVerilog – accellera publishes SystemVerilog.
1 An Update on Verilog Ξ – Computer Architecture Lab 28/06/2005 Kypros Constantinides.
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.
ADTs and C++ Classes Classes and Members Constructors The header file and the implementation file Classes and Parameters Operator Overloading.
Chapter 7 Functions. Types of Functions Value returning Functions that return a value through the use of a return statement They allow statements such.
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.
Chapter 4 Introduction to Classes, Objects, Methods and strings
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.
Topics AliasesSubprograms Generics & Configurations.
Chap. 4 Modules and Ports. 2 Modules and Ports Modules Ports Hierarchical Names Summary.
3/4/20031 ECE 551: Digital System Design * & Synthesis Lecture Set 3 3.1: Verilog - User-Defined Primitives (UDPs) (In separate file) 3.2: Verilog – Operators,
Starting Out with C++ Early Objects ~~ 7 th Edition by Tony Gaddis, Judy Walters, Godfrey Muganda Modified for CMPS 1044 Midwestern State University 6-1.
1 Verilog Digital System Design Z. Navabi, 2006 Verilog Language Concepts.
SVA Encapsulation in UVM enabling phase and configuration aware assertions by Mark Litterick Verification Consultant Verilab GmbH, Munich, Germany.
UMass Lowell Computer Science Java and Distributed Computing Prof. Karen Daniels Fall, 2000 Lecture 9 Java Fundamentals Objects/ClassesMethods Mon.
 In the java programming language, a keyword is one of 50 reserved words which have a predefined meaning in the language; because of this,
Functions Chapter 6. Modular Programming Modular programming: breaking a program up into smaller, manageable functions or modules Function: a collection.
EEL 3801 C++ as an Enhancement of C. EEL 3801 – Lotzi Bölöni Comments  Can be done with // at the start of the commented line.  The end-of-line terminates.
Slide 1 3.VHDL/Verilog Description Elements. Slide 2 To create a digital component, we start with…? The component’s interface signals Defined in MODULE.
Lecture 4 – Function (Part 1) FTMK, UTeM – Sem /2014.
UMass Lowell Computer Science Java and Distributed Computing Prof. Karen Daniels Fall, 2000 Lecture 10 Java Fundamentals Objects/ClassesMethods.
Structural Description
Adapted from Krste Asanovic
Verilog Introduction Fall
Classes and Objects.
SystemVerilog for Verification
COP 3330 Object-oriented Programming in C++
Object-Oriented Programming
SystemVerilog and Verification
Fundamental OOP Programming Structures in Java: Comments, Data Types, Variables, Assignments, Operators.
In this class, we will cover:
Introduction to Verilog – Part-2 Procedural Statements
COE 202 Introduction to Verilog
EEL4712 Digital Design (VHDL Tutorial).
Presentation transcript:

Verification Presentation to SystemVerilog Basic Committee Peter Flake Nov 15, 2002

© 2002 Synopsys, Inc. (2) CONFIDENTIAL Agenda AM Interfaces Instantiation syntax Logic type Type use before definition

© 2002 Synopsys, Inc. (3) CONFIDENTIAL Interfaces Fundamental idea  Modules encapsulate behavior  Interfaces encapsulate communication Structural communication  Named bundles of wires Procedural communication  Prototype tasks and functions

© 2002 Synopsys, Inc. (4) CONFIDENTIAL Structural Communication Wires in interface default to inout Need to specify direction for documentation, linting, synthesis QOR So introduce modports  refer to names in enclosing interface

© 2002 Synopsys, Inc. (5) CONFIDENTIAL Procedural Communication Point to point messages  process in one module calls a task in another Needs hierarchical name - hard to maintain and re-use Interface prototype means name is local to module  import to calling module  export from called module

© 2002 Synopsys, Inc. (6) CONFIDENTIAL Broadcast Messages One module sends a message and does not know how many receive it forkjoin task Allows address to be coded in receiver module - correct encapsulation Allows registration of receivers e.g. count No slower than fork join and task call

© 2002 Synopsys, Inc. (7) CONFIDENTIAL Slippery Slope How about being able to translate task calls to values on wires? Put in tasks and continuous assignment  No new scheduling semantics How about being able to translate signals to task calls, and check bus activity? Put in always blocks

© 2002 Synopsys, Inc. (8) CONFIDENTIAL Conclusion Interfaces are not modules  The design intent is connectivity, checkers, testbench  They synthesize to P&R wires, not logic blocks Interfaces are not structures  Interfaces are static objects, never automatic  Interfaces can contain wires and modports  Interfaces can contain always blocks

© 2002 Synopsys, Inc. (9) CONFIDENTIAL Instantiation Syntax Parentheses required moduleType instance ( ); interfaceType instance ( );

© 2002 Synopsys, Inc. (10) CONFIDENTIAL Logic Type Two basic communication mechanisms  Resolved drivers - Verilog wire or VHDL signal  Shared variable - last write wins Verilog reg is a mixture (legacy)  Shared variable inside module  Gets converted to a wire through a port Reals and 2 state variables (e.g. bit) must be shared Useful to have a 4 valued data type that behaves like a shared variable through ports Must not be driven with strengths

© 2002 Synopsys, Inc. (11) CONFIDENTIAL Type Use Before Definition typedef foo; Minor convenience in SV 3.0 allows less attention to file order Type checking must be at elaboration time anyway  parameters, generate Essential with classes in Testbench donation

© 2002 Synopsys, Inc. (12) CONFIDENTIAL Agenda PM Time precision and time scale Time data type Typedef syntax Strings as array and structure literals Unions and 4 state members Masked and unmasked Short real to 32 bits Constants always_comb Increment and decrement

© 2002 Synopsys, Inc. (13) CONFIDENTIAL Time Precision and Time Scale For $root, use timeunit & timeprecision as first thing in source. `timescale does not affect $root timeunit & timeprecision override `timescale in their module or interface definition `timescale applies to any subsequent module or interface

© 2002 Synopsys, Inc. (14) CONFIDENTIAL Time Data Type Time variable is a logic [63:0] for backward compatibility Time literal is 3.4ns Time literals can be considered as floating point numbers scaled to the current time unit When passed as a parameter the floating point number may have to be re-scaled When used in an expression the number is rounded to the current time precision Only operators that are valid for reals can be used with time literals

© 2002 Synopsys, Inc. (15) CONFIDENTIAL Typedef Syntax ?

© 2002 Synopsys, Inc. (16) CONFIDENTIAL Strings as Array and Structure Literals A structure member or an array element should behave like a scalar of the same type A shortreal can be set to a real literal shortreal a = 4.5 An array can be set to a string

© 2002 Synopsys, Inc. (17) CONFIDENTIAL Unions and 4 State Members If a union contains a 2 state member and a 4 state member, the union is 4 state If the 2 state member is written and then the 4 state member is read, there is no Z or X Like assigment var4state = var2state

© 2002 Synopsys, Inc. (18) CONFIDENTIAL Masked and Unmasked Masked and unmasked are the terms in the Superlog manual and in the Co-Design donation They were changed to 4 state and 2 state by the Accellera committee Some changes were missed

© 2002 Synopsys, Inc. (19) CONFIDENTIAL Short Real to 32 Bits Real and short real should be cast to integer or 32 bits with rounding To get same bit pattern use union (like C)

© 2002 Synopsys, Inc. (20) CONFIDENTIAL Constants A parameter or localparam can only be set to an expression of literals, parameters or local parameters, or a constant function of these A const in a static scope can also be set to an expression containing a hierarchical name A const in an automatic scope can also be set to an expression containing arguments

© 2002 Synopsys, Inc. (21) CONFIDENTIAL always_comb Used to model combinational logic  indicates design intent  execution at time 0 is guaranteed Cannot drive from anywhere else - no resolution Functions can be used to partition the combinational logic & so add to sensitivity  useful with large case statement No timing or event controls should be allowed

© 2002 Synopsys, Inc. (22) CONFIDENTIAL always_comb continued Sensitivity list should be with functions inlined Static function locals should be treated like static variables in modules

© 2002 Synopsys, Inc. (23) CONFIDENTIAL Increment and Decrement Consider int i = 1; $display( "%d %d %d %d %d %d", i++, i++, ++i, --i, i--, i-- ); Current implementation gives Alternative is to limit to only one per variable per statement like C