KARTHIK.S Lecturer/ECE S.N.G.C.E

Slides:



Advertisements
Similar presentations
//HDL Example 4-10 // //Gate-level description of circuit of Fig. 4-2 module analysis (A,B,C,F1,F2); input.
Advertisements

Verilog.
The Verilog Hardware Description Language
Verilog Overview. University of Jordan Computer Engineering Department CPE 439: Computer Design Lab.
Supplement on Verilog adder examples
ELEN 468 Lecture 21 ELEN 468 Advanced Logic Design Lecture 2 Hardware Modeling.
Verilog Modules for Common Digital Functions
Verilog Intro: Part 1.
Hardware Description Language (HDL)
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 341 Verilog HDL An Introduction. Hardware Specification Languages Verilog  Similar syntax to C  Commonly used in  Industry (USA & Japan) VHDL 
1 Workshop Topics - Outline Workshop 1 - Introduction Workshop 2 - module instantiation Workshop 3 - Lexical conventions Workshop 4 - Value Logic System.
 HDLs – Verilog and Very High Speed Integrated Circuit (VHSIC) HDL  „ Widely used in logic design  „ Describe hardware  „ Document logic functions.
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 Multicycle Processor II CPSC 321 Andreas Klappenecker.
CSE241 R1 Verilog.1Kahng & Cichy, UCSD ©2003 CSE241 VLSI Digital Circuits Winter 2003 Recitation 1: Verilog Introduction.
University of Jordan Computer Engineering Department CPE 439: Computer Design Lab.
B. RAMAMURTHY Hardware Description Language 8/2/
Hardware Description Language(HDL). Verilog simulator was first used beginning in 1985 and was extended substantially through The implementation.
Verilog Basics Nattha Jindapetch November Agenda Logic design review Verilog HDL basics LABs.
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
Verilog HDL: A solution for Everybody By, Anil Kumar Ram Rakhyani
CS 3850 Lecture 3 The Verilog Language. 3.1 Lexical Conventions The lexical conventions are close to the programming language C++. Comments are designated.
Digital System 數位系統 Verilog HDL Ping-Liang Lai (賴秉樑)  
CPEN Digital System Design
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.
IMPLEMENTATION OF MIPS 64 WITH VERILOG HARDWARE DESIGN LANGUAGE BY PRAMOD MENON CET520 S’03.
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
© 2009 Pearson Education, Upper Saddle River, NJ All Rights ReservedFloyd, Digital Fundamentals, 10 th ed Digital Logic Design Dr. Oliver Faust.
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.
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.
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.
Introduction to Verilog COE 202 Digital Logic Design Dr. Muhamed Mudawar King Fahd University of Petroleum and Minerals.
Hardware Description Languages: Verilog
Hardware Description Language
Adapted from Krste Asanovic
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-HDL-3 by Dr. Amin Danial Asham.
Hardware Description Languages: Verilog
Introduction to DIGITAL CIRCUITS MODELING & VERIFICATION using VERILOG [Part-I]
Hardware Descriptive Languages these notes are taken from Mano’s book
Hardware Description Language
Behavioral Modeling in Verilog
Logic Values 0:logic 0 / false 1:logic 1 / true X:unknown logic value
Hardware Description Language
Introduction to Verilog
Levels in computer design
Hardware Descriptive Languages these notes are taken from Mano’s book
Introduction to Digital System and Microprocessor Design
Hardware Description Language
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.
Hardware Description Language
Hardware Description Language
The Verilog Hardware Description Language
Introduction to Digital IC Design
COE 202 Introduction to Verilog
Reconfigurable Computing (EN2911X, Fall07)
Presentation transcript:

KARTHIK.S Lecturer/ECE S.N.G.C.E VERILOG HDL IEEE STD 1364 " It may not take more than one week, if you happen to know at least one programming language". KARTHIK.S Lecturer/ECE S.N.G.C.E Karthik.S S.N.G.C.E

CONTENTS Introduction. History of Verilog. Design and Tool Flow. What is Verilog HDL. Verilog HDL language elements. My First Program in Verilog. Verilog data flow Modeling. Structural Modeling Verilog behavioral modeling. Procedural Timing Controls. Tasks and Function. System Tasks and Functions. Art of writing test benches. Karthik.S S.N.G.C.E

Introduction. Verilog is a HARDWARE DESCRIPTION LANGUAGE (HDL). A hardware description Language is a language used to describe a digital system, for example, a microprocessor or a memory or a simple flip-flop. This just means that, by using a HDL one can describe any hardware (digital ) at any level. CONTENTS Karthik.S S.N.G.C.E

HISTORY Verilog was started initially as a proprietary hardware modeling language by Gateway Design Automation Inc. around 1984. Verilog simulator was first used beginning in 1985 and was extended substantially through 1987.The implementation was the Verilog simulator sold by Gateway. After many years, new features have been added to Verilog, and new version is called Verilog 2001. CONTENTS Karthik.S S.N.G.C.E

INTRODUCTION Typical Design flow Karthik.S S.N.G.C.E

SPECIFICATION HIGH LEVEL DESIGN This is the stage at which we define what are the important parameters of the system/design that you are planning to design. HIGH LEVEL DESIGN This is the stage at which you define various blocks in the design and how they communicate. Example: Microprocessor Karthik.S S.N.G.C.E

LOW LEVEL DESIGN RTL CODING Low level design or Micro design is the phase in which, designer describes how each block is implemented. RTL CODING In RTL coding, Micro Design is converted into Verilog/VHDL code, using synthesizable constructs of the language. Karthik.S S.N.G.C.E

SIMULATION Simulation is the process of verifying the functional characteristics of models We use simulators to simulate the Hardware models. To test if the RTL code meets the functional requirements of the specification, see if all the RTL blocks are functionally correct. SYNTHESIS Simulation is the process in which the synthesis tools takes the RTL code to the target technology. It maps RTL codes to the gates & primitives and do minimal amount of timing analysis. Example: Xillinx ISE, QuatrusII. CONTENTS Karthik.S S.N.G.C.E

MY Ist PROGRAM If we refer to any text book on programming language it starts with “HELLO WORLD” program. I start with “WELCOME” program. // Design name: Welcome to FDP @ SNGCE // File name: welcome.v // Coder: Karthik.S module welcome; initial begin $display (“welcome to FDP @ SNGCE”); end endmodule CONTENTS Karthik.S S.N.G.C.E

VERILOG HDL Single language for design & Simulation. Three types of modeling 1. DATAFLOW 2. STRUCTURAL 3. BEHAVIORAL Built-in primitives & logic functions Built-in data types User defined primitives. Karthik.S S.N.G.C.E

BASIC UNIT-MODULE Modules communicates externally with input & output. A module can be instantiated into other module. Karthik.S S.N.G.C.E

EXAMPLE One can describe a simple Flip flop as that in above figure as well as one can describe a complicated designs having 1 million gates. CONTENTS Karthik.S S.N.G.C.E

VERILOG SYNTAX Verilog is free-format language. White space can be used freely. Verilog is CASE Sensitive User provided names are called identifiers and should start with a “letter” or “_” example: CONUT_1 Predefined identifiers are called keywords. All keywords are lower case. Example: assign, module, begin, end, etc., Comments- two forms: /* first form*/ & // second form Value set: 1(high), 0(low), X(unknown), Z(high impedance). Karthik.S S.N.G.C.E

NUMBER REPRESENTATION <size><base format><number> Examples: 8'h FF // hex number 8‘d65 // octal number 4'b11 // 4-bit binary number 0011 Karthik.S S.N.G.C.E

DATA TYPES Represent abstract data values. NETS: Connects b/w structural elements. Values comes from it’s drivers Can be used in data flow & structural modeling Default value is Z Example: wire REGISTERS: Represent abstract data values. Values in a register is saved until new value is stored. Default value is X Example: reg CONTENTS Karthik.S S.N.G.C.E

DATA FLOW Karthik.S S.N.G.C.E

INTRODUCTION Karthik.S S.N.G.C.E

DELAYS Karthik.S S.N.G.C.E

OPERATORS Karthik.S S.N.G.C.E

EXAMPLE module half_adder (sum,cout,a,b,cin); input a, b, cin; output sum, cout; assign sum = a ^ b;// assignment should be done //with <= sign. assign cout = a & b; endmodule Karthik.S S.N.G.C.E

EXAMPLE 2 2X1 MUX module mux_2 ( y, s, a, b); input s, a, b; output y; assign y = s?a : b; // if s=0 y=a else y=b endmodule CONTENTS Karthik.S S.N.G.C.E

STRUCTURAL Karthik.S S.N.G.C.E

GATE LEVEL MODELING Karthik.S S.N.G.C.E

4X1 MUX module mux_4 (y,s0,s1,a,b,c,d); input a,b,c,d,s0,s1; output y; not n1(s0bar,s0); // gate instantiation starts here not n2(s1bar,s1); and a1(t0,s0bar,s1bar,a); and a1(t1,s0bar,s1,b); and a1(t2,s0,s1bar,c); and a1(t3,s0,s1,d); or o1(y,t0,t1,t2,t3); endmodule Karthik.S S.N.G.C.E

UER DEFINED PRIMITIVES Module instantiation can be done i.e. module within a module. A 4-bit RCA can be designed using 4 full adders. First a full adder is designed and it is called or instantiated in the RCA Karthik.S S.N.G.C.E

EXAMPLE module RCA ( sum, cout, a, b, cin); input [3:0] a, b; output[3:0] sum; input cin; output cout; module fa ( s, cy, x, y, c); input x,y,c; output s, cy; assign s<= x^y^c; assign cy<= (x&y) | (y&c) | (c&x); endmodule Karthik.S S.N.G.C.E

Karthik.S S.N.G.C.E CONTENTS