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.

Slides:



Advertisements
Similar presentations
Verilog HDL -Introduction
Advertisements

Simulation executable (simv)
The Verilog Hardware Description Language
Verilog Overview. University of Jordan Computer Engineering Department CPE 439: Computer Design Lab.
ELEN 468 Lecture 21 ELEN 468 Advanced Logic Design Lecture 2 Hardware Modeling.
Verilog Intro: Part 1.
Hardware Description Language (HDL)
SYEN 3330 Digital SystemsJung H. Kim Chapter SYEN 3330 Digital Systems Chapters 4 – Part3: Verilog – Part 1.
CSE 201 Computer Logic Design * * * * * * * Verilog Modeling
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.
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.
Silicon Programming--Intro. to HDLs1 Hardware description languages: introduction intellectual property (IP) introduction to VHDL and Verilog entities.
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
Digital System Design Verilog ® HDL Modules and Ports Maziar Goudarzi.
Digital System Design Verilog ® HDL Maziar Goudarzi.
University of Jordan Computer Engineering Department CPE 439: Computer Design Lab.
O VERVIEW OF DIGITAL SYSTEMS Hardware Description Language 1.
Hardware Description Language(HDL). Verilog simulator was first used beginning in 1985 and was extended substantially through The implementation.
Chap. 2 Hierarchical Modeling Concepts. 2 Hierarchical Modeling Concepts Design Methodologies 4-bit Ripple Carry Counter Modules Instances Components.
1 VERILOG Fundamentals Workshop סמסטר א ' תשע " ה מרצה : משה דורון הפקולטה להנדסה Workshop Objectives: Gain basic understanding of the essential concepts.
ECE 2372 Modern Digital System Design
Introduction Verilog is a HARDWARE DESCRIPTION LANGUAGE (HDL) A hardware description language is a language or means used to describe or model a digital.
Verilog Language Concepts
CS 3850 Lecture 3 The Verilog Language. 3.1 Lexical Conventions The lexical conventions are close to the programming language C++. Comments are designated.
1 An Update on Verilog Ξ – Computer Architecture Lab 28/06/2005 Kypros Constantinides.
Digital System 數位系統 Verilog HDL Ping-Liang Lai (賴秉樑)  
Module 1.2 Verilog Simulator.  A Verilog program for a particular application consists of two blocks : ◦ Design Block (Module) ◦ Testing Block (Stimulus.
CPEN Digital System Design
Module 2.1 Gate-Level/Structural Modeling UNIT 2: Modeling in Verilog.
CH71 Chapter 7 Hardware Description Language (HDL) By Taweesak Reungpeerakul.
Module 1.2 Introduction to Verilog
Anurag Dwivedi. Basic Block - Gates Gates -> Flip Flops.
Slide 1 2. Verilog Elements. Slide 2 Why (V)HDL? (VHDL, Verilog etc.), Karen Parnell, Nick Mehta, “Programmable Logic Design Quick Start Handbook”, Xilinx.
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.
Digital System Design Verilog ® HDL Design at Structural Level Maziar Goudarzi.
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
COE 202 Introduction to Verilog Computer Engineering Department College of Computer Sciences and Engineering King Fahd University of Petroleum and Minerals.
Chapter 6: Hierarchical Structural Modeling Digital System Designs and Practices Using Verilog HDL and 2008~2010, John Wiley 6-1 Chapter 6: Hierarchical.
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.
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.
EECE6017C - Lab 0 Introduction to Altera tools and Basic Digital Logic
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
EMT 351/4 DIGITAL IC DESIGN Week # Synthesis of Sequential Logic 10.
Verilog-HDL-1 by Dr. Amin Danial Asham.
KARTHIK.S Lecturer/ECE S.N.G.C.E
Hardware Description Languages
Introduction to DIGITAL CIRCUITS MODELING & VERIFICATION using VERILOG [Part-I]
For NTUEE Undergraduate
Introduction to Verilog
SYNTHESIS OF SEQUENTIAL LOGIC
332:437 Lecture 8 Verilog and Finite State Machines
CS 153 Logic Design Lab Professor Ian G. Harris
The Verilog Hardware Description Language
Introduction to Verilog® HDL
332:437 Lecture 8 Verilog and Finite State Machines
Introduction to Digital IC Design
COE 202 Introduction to Verilog
Dept of ECM Verilog HDL Verilog Evolution Verilog Attributes The verilog language Verilog Evolution  Verilog was designed in early 1984 by Gateway Design.
Reconfigurable Computing (EN2911X, Fall07)
Presentation transcript:

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 Wu, E.E., NTU.

OUTLINE Introduction Basics of the Verilog Language Gate-level modeling Data-flow modeling Behavioral modeling Task and function

Verilog HDL (continue) • Invented by Philip Moorby in 1983/ 1984 at Gateway Design Automation • Enables specification of a digital system at a range of levels of abstraction: switches, gates, RTL, and higher • Initially developed in conjunction with the Verilog simulator

Verilog HDL • Verilog- based synthesis tool introduced by Synopsys in 1987 • Gateway Design Automation bought by Cadence in 1989 • Verilog placed in public domain to compete with VHDL – Open Verilog International (OVI) IEEE 1364 -1995 and revised version IEEE 1364 -2001 revised version IEEE 1364 -2005 For more details, please read the document of IEEE Standard for Verilog® Hardware Description Language

What is Verilog HDL ? Mixed level modeling Behavioral Algorithmic ( like high level language) Register transfer (Synthesizable) Structural Gate (AND, OR ……) Switch (PMOS, NOMS, JFET ……) Single language for design and simulation Built-in primitives and logic functions User-defined primitives Built-in data types High-level programming constructs

Basic Conventions Verilog is case sensitive – Keywords are in lowercase Extra white space is ignored – But whitespace does separate tokens Comments – One liners are // – Multiple lines /* */ – Comments may not be nested

OUTLINE Introduction Basics of the Verilog Language Overview of Verilog Module Identifier & Keywords Logic Values Data Types Numbers Gate-level modeling Data-flow modeling Behavioral modeling Task and function

Overview of Verilog Module Test bench

module functionality or structure Basic unit --Module module module_name (port_name); port declaration data type declaration module functionality or structure endmodule

D-FlipFlop module D_FF(q,d,clk,reset); output q; //port declaration input d,clk,reset; reg q; // data type declaration always @ (posedge reset or negedge clk) if (reset) q=1'b0; else q=d; endmodule

Instance A module provides a template which you can create actual objects. When a module is invoked, Verilog creates a unique object from the template The process of creating a object from module template is called instantiation The object is called instance

Instances module adder8(....) ; module adder (in1,in2,cin,sum,cout); ....... endmodule module adder8(....) ; adder add1(a1,b1,1’b0,s1,c1) ;// assign by order add2(.in1(a2),.in2(b2),.cin(c1),.sum(s2) ,.cout(c2)) ;// assign by name, the order is changeable ..... endmodule Mapping port positions Mapping names

T-FlipFlop 。 module T_FF(q,clk,reset); output q; input clk,reset; ○ clk 。 T-FlipFlop module T_FF(q,clk,reset); output q; input clk,reset; wire d; D_FF dff0(q,d,clk,reset); // create an instance not n1(d,q); endmodule

Identifier & Keywords Identifier Keywords User-provided names for Verilog objects in the descriptions Legal characters are “a-z”, “A-Z”, “0-9”, “_”, and “$” First character has to be a letter or an “_” Example: Count, _R2D2, FIVE$ Keywords Predefined identifiers to define the language constructs All keywords are defined in lower case Cannot be used as identifiers Example:initial, assign, module, always….

Hierarchical Modeling Concepts Top level block Sub-block 1 Leaf cell

Hierarchical Modeling Concepts module ripple_carry_counter(q,clk, reset); output [3:0] q; input clk, reset; T_FF tff0(q[0], clk, reset); T_FF tff1(q[1], q[0], reset); T_FF tff2(q[2], q[1], reset); T_FF tff3(q[3], q[2], reset); endmodule

Hierarchical Modeling Concepts module T_FF(q, clk, reset); output q; input clk, reset; wire d; D_FF dff0(q, d, clk, reset); not na(d, q); endmodule

Hierarchical Modeling Concepts module D_FF(q, d, clk, reset); output q; input d, clk, reset; reg q; always @(posedge reset or negedge clk) if (reset) q=1’b0; else q=d; endmodule

4-bits Ripple Carry Counter T_FF (tff0) T_FF (tff1) T_FF (tff2) T_FF (tff3) D_ FF Inverter

Exercise module FullAdd4(a, b, carry_in, sum, carry_out); input [3:0] a, b; input carry_in; output [3:0] sum; output carry_out; wire [3:0] sum; wire carry_out; FullAdd fa0(a[0], b[0], carry_in, sum[0], carry_out1); FullAdd fa1(a[1], b[1], carry_out1, sum[1], carry_out2); FullAdd fa2(a[2], b[2], carry_out2, sum[2], carry_out3); FullAdd fa3(a[3], b[3], carry_out3, sum[3], carry_out); endmodule

Exercise // FullAdd.V, 全加器 module FullAdd(a, b, carryin, sum, carryout); input a, b, carryin; output sum, carryout; wire sum, carryout; assign {carryout, sum} = a + b + carryin; endmodule

Homework 1 Implement a 16-bits adder in Verilog HDL by using four 4 bits full adders.