CPEN Digital System Design

Slides:



Advertisements
Similar presentations
Chapter 3 Gate-Level Minimization
Advertisements

ENEL111 Digital Electronics
//HDL Example 4-10 // //Gate-level description of circuit of Fig. 4-2 module analysis (A,B,C,F1,F2); input.
Verilog.
The Verilog Hardware Description Language
CPEN Digital System Design
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.
16/04/20151 Hardware Descriptive Languages these notes are taken from Mano’s book It can represent: Truth Table Boolean Expression Diagrams of gates and.
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 
 HDLs – Verilog and Very High Speed Integrated Circuit (VHSIC) HDL  „ Widely used in logic design  „ Describe hardware  „ Document logic functions.
Mridula Allani Fall 2010 (Refer to the comments if required) ELEC Fall 2010, Nov 21(Adopted from Profs. Nelson and Stroud)

1 Lecture 1: Verilog HDL Introduction. 2 What is Verilog HDL? Verilog Hardware Description Language(HDL)? –A high-level computer language can model, represent.
DON’T CARE CONDITIONS Functions that have unspecified output for some input combinations are called incompletely specified functions. Unspecified minterms.
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 Hardware description languages: introduction intellectual property (IP) introduction to VHDL and Verilog entities and architectural bodies behavioral,
ECE 353 Computer Systems Lab I Verilog Hardware Description Language.
Hardware Description Language HDL. 2 Hardware Description Language HDL  Describes circuits and systems in text. −As a software program.  Can be processed.
Digital System Design Verilog ® HDL Maziar Goudarzi.
ECE 331 – Digital System Design Single-bit Adder Circuits and Adder Circuits in VHDL (Lecture #12) The slides included herein were taken from the materials.
University of Jordan Computer Engineering Department CPE 439: Computer Design Lab.
Spring 2002EECS150 - Lec0-intro Page 1 EECS150 - Digital Design Lecture 8 - Hardware Description Languages February 14, 2002 John Wawrzynek.
B. RAMAMURTHY Hardware Description Language 8/2/
O VERVIEW OF DIGITAL SYSTEMS Hardware Description Language 1.
Digital System Design EEE344 Lecture 2 Introduction to Verilog HDL Prepared by: Engr. Qazi Zia, Assistant Professor EED, COMSATS Attock1.
Lecture 7 Verilog Additional references Structural constructs
Electronic Design Automation. Course Outline 1.Digital circuit design flow 2.Verilog Hardware Description Language 3.Logic Synthesis –Multilevel logic.
CORRECTION Last session, I have made a mistake about two digital coding methods. I explained Hamming code as Grey code mistakenly. Here is correct explanation.
Chap. 1 Overview of Digital Design with Verilog. 2 Overview of Digital Design with Verilog HDL Evolution of computer aided digital circuit design Emergence.
EN3542 – Digital System Design
ECE/CS 352 Digital Systems Fundamentals
VHDL TUTORIAL Preetha Thulasiraman ECE 223 Winter 2007.
Figure 5.1. Conversion from decimal to binary.. Table 5.1. Numbers in different systems.
Verilog HDL. Hardware Description Language  HDL – a “language” for describing hardware  Two industry IEEE standards: Verilog VHDL (Very High Speed Integrated.
Hardware Design Environment Instructors: Fu-Chiung Cheng ( 鄭福炯 ) Associate Professor Computer Science & Engineering Tatung University.
Combinational Logic. Digital Circuits Introduction Logic circuits for digital systems may be combinational or sequential. A combinational circuit.
CENG 241 Digital Design 1 Lecture 5 Amirali Baniasadi
C ONTINUOUS A SSIGNMENTS. C OMBINATIONAL L OGIC C IRCUITS each output of a Combinational Logic Circuit  A function of the inputs - Mapping functions.
Digital System 數位系統 Verilog HDL Ping-Liang Lai (賴秉樑)  
CWRU EECS 317 EECS 317 Computer Design LECTURE 1: The VHDL Adder Instructor: Francis G. Wolff Case Western Reserve University.
Chapter 0 deSiGn conCepTs EKT 221 / 4 DIGITAL ELECTRONICS II.
Module 1.2 Introduction to Verilog
3.Gate-Level Minimization
Use of HDLs in Teaching of Computer Hardware Courses Zvonko Vranesic and Stephen Brown University of Toronto.
ELEE 4303 Digital II Introduction to Verilog. ELEE 4303 Digital II Learning Objectives Get familiar with background of HDLs Basic concepts of Verilog.
Introduction to ASIC flow and Verilog HDL
HDL Model Combinational circuits. module halfadder(s, cout, a, b); input a, b; output s, cout; xor g1(s, a, b); and g2(cout, a, b); endmodule.
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 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.
Hardware Description Languages: Verilog
Combinational Logic Design
Systems Architecture Lab: Introduction to VHDL
Verilog-HDL-1 by Dr. Amin Danial Asham.
Hardware Description Languages: Verilog
Hardware Descriptive Languages these notes are taken from Mano’s book
Introduction to Verilog
Lecture 1.3 Hardware Description Languages (HDLs)
Hardware Descriptive Languages these notes are taken from Mano’s book
HDL Hardware Description Language
فصل چهارم مدارهای ترکیبی.
مدار منطقی به نام یگانه مهندس هستی مهدی قدیری
Chapters 4 – Part3: Verilog – Part 1
The Verilog Hardware Description Language
COE 202 Introduction to Verilog
Presentation transcript:

CPEN 315 - Digital System Design Digital Circuit Verification Hardware Descriptive Language Verilog C. Gerousis © Logic and Computer Design Fundamentals, 3rd Ed., Mano Prentice Hall

Overview Behavioral vs. Structural Description Hardware Descriptive Language (HDL) Behavioral vs. Structural Description Gate-Level Description of a simple circuit Model Abstractions in Verilog User Defined Primitives (UDPs) HDL Examples

Hardware Descriptive Language (HDL) HDL languages resemble programming languages, but are specifically oriented to describing hardware structures and behavior. Uses of HDLs: – They provide alternative to schematics. – They can represent Boolean equations, truth tables and complex operations. In top-down design, a very high description of an entire system can be precisely specified using an HDL.

HDL (continued) Most popular HDLs are – VHDL (VHSIC (Very High Speed Integrated Circuits) HDL – Developed for the U. S. DOD. – Verilog® – Developed by Gateway Design Automation, which was bought by Cadence® Design Systems. Verilog represents circuits at a level closer to the physical hardware. Language standards are defined, approved and published by the IEEE.

Behavioral vs. Structural Description Behavioral Description More like high level software language Easy to read and understand In the early stage of design to test the correctness of functionality of the design Structural Description Less readable Like gate level netlist In the late stage of the design, used to generate netlist.

HDL Example 1 //HDL Example 1 //-------------------------- //Gate-Level Description of a simple circuit module smpl_circuit(A,B,C,x,y); // building block input A,B,C; // input port output x,y; // output port wire e; and g1(e,A,B); // AND gate (output, inputs) not g2(y, C); or g3(x,e,y); endmodule Draw the simple circuit

Model Abstractions in Verilog Previous Example is a “netlist” – Contains enough information to construct in lab – Structural Model – Commonly “Lowest” level of abstraction RTL (register transfer language) Level – Composed of Boolean Expressions and Registers – Can be Automatically Synthesized to a netlist Behavioral Level – High-level that only Describe Functionality – Automatic Behavioral Synthesis Tools do Exist

User Defined Primitives (UDPs) • Keywords and, or, not, xor, etc. are System Primitives • Can Define your Own Primitives (UDPs) • Can do this in a variety of ways including Truth Tables • Instead of module/endmodule use the keywords primitive/endprimitive • Only one output and must be listed first • Keywords table and endtable used • Input values listed in order • Output is always last entry

HDL Example 2 //HDL Example 2 //User defined primitive(UDP) primitive crctp (x,A,B,C); // user defined output x; input A,B,C; //Truth table for x(A,B,C) = Minterms ( ? ) table // truth table // A B C : x (Note that this is only a comment) 0 0 0 : 1; 0 0 1 : 0; 0 1 0 : 1; 0 1 1 : 0; 1 0 0 : 1; 1 0 1 : 0; 1 1 0 : 1; 1 1 1 : 1; endtable endprimitive

HDL Example 2 (continued) module declare_crctp; reg x,y,z; wire w; crctp (w,z,y,z); // produces a circuit that implements endmodule // w (x,y,z) = S(0, 2, 4, 6 ,7)

HDL Example 3 //HDL Example 3 //------------------------------ //Circuit specified with Boolean equations module circuit_bln (x,y,A,B,C,D); input A,B,C,D; output x,y; assign x = A | (B & C) | (~B & C); // assign y = (~B & C) | (B & ~C & ~D); // endmodule

4-bit Adder: Bottom-Up Hierarchical Structure Half-Adder 2. Full-Adder 3. 4-bit Adder

4-bit Adder: Verilog Description //HDL Example 4 //----------------------------------------- //Gate-level hierarchical description of 4-bit adder // Description of half adder module halfadder (S,C,x,y); input x,y; output S,C; //Instantiate primitive gates xor (S,x,y); and (C,x,y); endmodule

4-bit Adder: Verilog (continued) //Description of the full adder module fulladder (S,C,x,y,z); input x,y,z; output S,C; wire S1,D1,D2; //Outputs of first XOR and two AND gates //Instantiate the halfadder halfadder HA1 (S1,D1,x,y), HA2 (S,D2,S1,z); or g1(C,D2,D1); endmodule S1 D1 D2

4-bit Adder: Verilog (continued) //Description of 4-bit adder module _4bit_adder (S,C4,A,B,C0); input [3:0] A,B; // Input vectors A, B with bits 0 through 3 input C0; output [3:0] S; output C4; wire C1,C2,C3; //Intermediate carries //Instantiate the fulladder fulladder FA0 (S[0],C1,A[0],B[0],C0), FA1 (S[1],C2,A[1],B[1],C1), FA2 (S[2],C3,A[2],B[2],C2), FA3 (S[3],C4,A[3],B[3],C3); endmodule

4-bit Adder: Verilog (continued) `timescale 1 ps / 1 ps module testbed(); reg c_in; reg [3:0] y; reg [3:0] x; wire c_out; wire [3:0]sum; FourBitAdder A1(sum, c_out, x, y, c_in); initial begin //SIGNAL x x = 4'b1001; #25000 x = 4'b0001; ; end

4-bit Adder: Verilog (Final) initial begin //SIGNAL y y = 4'b0001; #25000 y = 4'b0010; ; end begin //SIGNAL c_in c_in = 1'b0; #100000 c_in = 1'b1; #250000 $finish; endmodule