1 An Update on Verilog Ξ – Computer Architecture Lab 28/06/2005 Kypros Constantinides.

Slides:



Advertisements
Similar presentations
Verilog Fundamentals Shubham Singh Junior Undergrad. Electrical Engineering.
Advertisements

Simulation executable (simv)
The Verilog Hardware Description Language
Verilog Overview. University of Jordan Computer Engineering Department CPE 439: Computer Design Lab.
Combinational Logic.
Chapter 11 Verilog HDL Application-Specific Integrated Circuits Michael John Sebastian Smith Addison Wesley, 1997.
Verilog Intro: Part 1.
Combinational Logic with Verilog Materials taken from: Digital Design and Computer Architecture by David and Sarah Harris & The Essentials of Computer.
SYEN 3330 Digital SystemsJung H. Kim Chapter SYEN 3330 Digital Systems Chapters 4 – Part3: Verilog – Part 1.
CSE 201 Computer Logic Design * * * * * * * Verilog Modeling
1 Brief Introduction to Verilog Weiping Shi. 2 What is Verilog? It is a hardware description language Originally designed to model and verify a design.
CSE 341 Verilog HDL An Introduction. Hardware Specification Languages Verilog  Similar syntax to C  Commonly used in  Industry (USA & Japan) VHDL 
 HDLs – Verilog and Very High Speed Integrated Circuit (VHSIC) HDL  „ Widely used in logic design  „ Describe hardware  „ Document logic functions.
1 Hardware description languages: introduction intellectual property (IP) introduction to VHDL and Verilog entities and architectural bodies behavioral,
Verilog Sequential Circuits Ibrahim Korpeoglu. Verilog can be used to describe storage elements and sequential circuits as well. So far continuous assignment.
CSE241 R1 Verilog.1Kahng & Cichy, UCSD ©2003 CSE241 VLSI Digital Circuits Winter 2003 Recitation 1: Verilog Introduction.
Reconfigurable Computing (EN2911X, Fall07) Lecture 05: Verilog (1/3) Prof. Sherief Reda Division of Engineering, Brown University
ECEN ECEN475 Introduction to VLSI System Design Verilog HDL.
Prof. John Nestor ECE Department Lafayette College Easton, Pennsylvania ECE VLSI System Design Lecture 4 - Advanced Verilog.
Digital System Design Verilog ® HDL Maziar Goudarzi.
ELEN468 Lecture 11 ELEN468 Advanced Logic Design Lecture 1Introduction.
University of Jordan Computer Engineering Department CPE 439: Computer Design Lab.
Hardware Description Language(HDL). Verilog simulator was first used beginning in 1985 and was extended substantially through The implementation.
Overview Logistics Last lecture Today HW5 due today
Verilog Basics Nattha Jindapetch November Agenda Logic design review Verilog HDL basics LABs.
INTRODUCTION TO VERILOG HDL Presented by m.vinoth.
1 VERILOG Fundamentals Workshop סמסטר א ' תשע " ה מרצה : משה דורון הפקולטה להנדסה Workshop Objectives: Gain basic understanding of the essential concepts.
Introduction to FPGA AVI SINGH. Prerequisites Digital Circuit Design - Logic Gates, FlipFlops, Counters, Mux-Demux Familiarity with a procedural programming.
ECE 2372 Modern Digital System Design
1 H ardware D escription L anguages Modeling Digital Systems.
ECE 551 Digital System Design & Synthesis Fall 2011 Midterm Exam Overview.
Digital System 數位系統 Verilog HDL Ping-Liang Lai (賴秉樑)  
1 Workshop Topics - Outline Workshop 1 - Introduction Workshop 2 - module instantiation Workshop 3 - Lexical conventions Workshop 4 - Value Logic System.
Module 1.2 Introduction to Verilog
COE 202 Introduction to Verilog Computer Engineering Department College of Computer Sciences and Engineering King Fahd University of Petroleum and Minerals.
Anurag Dwivedi. Basic Block - Gates Gates -> Flip Flops.
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.
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,
1 Hardware description languages: introduction intellectual property (IP) introduction to VHDL and Verilog entities and architectural bodies behavioral,
IMPLEMENTATION OF MIPS 64 WITH VERILOG HARDWARE DESIGN LANGUAGE BY PRAMOD MENON CET520 S’03.
The Verilog Hardware Description Language. GUIDELINES How to write HDL code: How to write HDL code:
Verilog A Hardware Description Language (HDL ) is a machine readable and human readable language for describing hardware. Verilog and VHDL are HDLs.
ELEE 4303 Digital II Introduction to Verilog. ELEE 4303 Digital II Learning Objectives Get familiar with background of HDLs Basic concepts of Verilog.
CSCE 211: Digital Logic Design Chin-Tser Huang University of South Carolina.
Introduction to ASIC flow and Verilog HDL
04/26/20031 ECE 551: Digital System Design & Synthesis Lecture Set : Introduction to VHDL 12.2: VHDL versus Verilog (Separate File)
Introduction to Verilog. Data Types A wire specifies a combinational signal. – Think of it as an actual wire. A reg (register) holds a value. – A reg.
Introduction to Verilog
COE 202 Introduction to Verilog Computer Engineering Department College of Computer Sciences and Engineering King Fahd University of Petroleum and Minerals.
Chapter1: Introduction Digital System Designs and Practices Using Verilog HDL and 2008~2010, John Wiley 1-1 Chapter 1: Introduction Prof. Ming-Bo.
Verilog Intro: Part 1. Hardware Description Languages A Hardware Description Language (HDL) is a language used to describe a digital system, for example,
1 University of Jordan Computer Engineering Department CPE 439: Computer Design Lab.
1 Lecture 1: Verilog HDL Introduction. 2 What is Verilog HDL? Verilog Hardware Description Language(HDL)? –A high-level computer language can model, represent.
Exp#5 & 6 Introduction to Verilog COE203 Digital Logic Laboratory Dr. Ahmad Almulhem KFUPM Spring 2009.
1 A hardware description language is a computer language that is used to describe hardware. Two HDLs are widely used Verilog HDL VHDL (Very High Speed.
Overview Logistics Last lecture Today HW5 due today
Hardware Description Languages: Verilog
Verilog-HDL Reference: Verilog HDL: a guide to digital design and synthesis, Palnitkar, Samir Some of slides in this lecture are supported by Prof. An-Yeu.
Discussion 2: More to discuss
Verilog Introduction Fall
Hardware Description Languages: Verilog
Introduction to DIGITAL CIRCUITS MODELING & VERIFICATION using VERILOG [Part-I]
Introduction to Verilog
Behavioral Modeling in Verilog
Introduction to Digital System and Microprocessor Design
Verilog-HDL Reference: Verilog HDL: a guide to digital design and synthesis, Palnitkar, Samir Some of slides in this lecture are supported by Prof. An-Yeu.
The Verilog Hardware Description Language
COE 202 Introduction to Verilog
Reconfigurable Computing (EN2911X, Fall07)
Presentation transcript:

1 An Update on Verilog Ξ – Computer Architecture Lab 28/06/2005 Kypros Constantinides

2 Outline  The Verilog Hardware Description Language Structural Verilog Behaviorial Verilog  Design Flow Functional Verification Logic Synthesis  Supporting Tools  Online Resources

3 Hardware Description Languages  Need a description one level up from logic gates  Work at the level of functional blocks, not logic gates Complexity of the functional blocks is up to the designer A functional unit could be an adder, or even a microprocessor  The description consists of functional blocks and their interconnections Describe functional block (not predefined) Support hierarchical description (function block nesting)

4 Verilog History  Verilog was created in the mid 1980’s. It was designed by taking features from the most popular HDL language of the time, called HiLo as well as from traditional computer languages such as C  In 1990, Cadence recognized that if Verilog remained a closed language, the pressures of standardization would eventually cause the industry to shift to VHDL. This was the event which "opened" the language  First version was standardized by IEEE 1364 in 1995  Second version in 2001 (still used today)  Future Work: Accellera is working on standardizing SystemVerilog 3.1

5 High-level view of Verilog  Verilog descriptions look like programs:  Modules resemble subroutines in that you can write one description and use (instantiate) it in multiple places  Block structure is a key principle Use hierarchy/modularity to manage complexity  But they aren’t ‘normal’ programs Module evaluation is concurrent (every block has its own “program counter”)

6 Structural Verilog  Structural models Are built from gate primitives and/or other modules They describe the circuit using logic gates — much as you would see in an implementation of a circuit Basically you are clearly specifying the structure of the circuit  Identify: Gate instances, wire names, delay from a or b to f. 

7 Behavioral Modelling  More abstract, no direct description of how a module is implemented using primitives  Mux using behavioral:  It looks like C: mix of ifs, case statements, assignments …  Different ways for writing descriptions of combinational and sequential logic

8 Behavioral Statements Behavioral Statements  if-then-else What you would expect, except that it’s doing 4-valued logic. 1 is interpreted as True; 0, x, and z are interpreted as False  case What you would expect, except for 4-valued logic There is no break statement — it is assumed Casex statement treats Z/X as don’t cares

9 ASIC Design Traditional Flow  Two major steps in the implementation of the design Functional Verification: Test the functional correctness of the high level design (fast) Gate Level Simulation: Test the functional correctness of the design post synthesis (slow)

10 Functional Verification  We use simulators to test if the RTL code meets the functional requirements of the specifications  To achieve this we need to write testbench, which generates clock, reset and required test vectors  The testbench is non synthesizable code and drives the simulation. It’s not part of the design  Examples of simulators are VCS and ModelSim 

11 Logic Synthesis  Logic Synthesis translates HDL code into a connected set of standard cells (called a netlist)  Technology Library: A collection of optimized standard cells with known parameters (i.e. NAND2 gate).  Provide to synthesis tool timing/area/power constraints

12 An Example HDL Code Synthesis APR Testing Prototype Fabrication Place & Route netlist

13 Supporting Tools  Related Supporting Tools: Synopsys VCS : RTL verification simulator Synopsys Design Compiler : Synthesis tool Synopsys OpenVera (HVL): Based on Verilog, C++, and Java, with additional constructs specifically for verification Synopsys Tetramax : Transparent DFT integration. Scan chain & ATPG Programming Language Interface (PLI) : Lets you add your own custom applications such as C models, delay calculators, file I/O, and more DirectC : It allows Verilog code to call C code directly without any wrapper code

14 Online Verilog Resources  ASICs the book, Ch. 11: –  Verilog Quick Reference Guide: –  Alternate Verilog FAQ: –  Verilog Introduction –  Newsgroup: –  Verilog implementation of an Alpha microprocessor at the Register Transfer Level (IVM) –

15

16 Numbers  Number notation: ‘  Examples: 4’b1111 // 4 bit binary number 12’habc //12 bit hexadecimal number 16’d255 //16 bit decimal number  Z is high impedance, X is don’t care, ? = 0 or 1 or X

17 Operators  Arithmetic * multiply / divide + add - subtract % modulus  Logical ! Not && and || or  Relational > greater < less >= greater-equal <= less-equal (also used for non- blocking assignments, later)  Equality == equal != not equal === (case equality)  Bitwise ~ negation & and \ or ^ xor ^~ xnor

18 Connections: Ports  Keywords: input - input output - output inout - bi-directional  Ports do not store information  Example module ex (a, b, c, out) output out; input a, b, c; endmodule

19 Wires  Wires Connection between hardware elements (visualize as a node in the circuit) Module connections Used to connect signals from sensitivity list Memoryless - Must be continuously driven by an assignment statement ( assign) Assigned outside of always blocks  Example: wire a; // declared wire net wire b = 1’b0 // tied to zero at declaration (alternatively: wire b; assign b = 1’b0;

20 Memory Elements  Register Keyword = reg Represents storage in that its value is whatever was most recently (procedurally) assigned to it - But it does NOT necessarily instantiate an actual register Assigned within always blocks  Examples: reg clock; // clock reg [0:4] vec_reg // 5 bit register vector

21 Blocking Vs Non-Blocking  Relates to scheduling of events  Blocking Ex: begin A = B; B = A; end Each assignment is completed before moving to the next line In this case, value held in B is assigned to A, and then the value assigned in A (same as in B) is then assigned back to B.  Non-blocking (preferable in sequential elements) Ex: begin A <= B; B <= A; end Values on RHS of both expressions are held in temp locations, all assignments are done concurrently à A and B are swapped

22 Full-Adder Code  Sample Code module full_adder (a, b, ci, sum, co); input/output signal list input a, b, ci; //input declaration output sum, co; //output declaration assign sum = a ^ b ^ ci; assign co = (a & b) | (a & ci) | (b & ci); endmodule

23 Positive Edge-Triggered registers with reset module ff1(d,clk,reset,q) input d, clk, reset; output q; reg q; clk) if (reset == 1) q <= 0; else q <= d; OR clk or posedge reset) if (reset == 1) q <= 0; else q <= d; endmodule