Hardware Descriptive Languages these notes are taken from Mano’s book

Slides:



Advertisements
Similar presentations
Chapter 3 Gate-Level Minimization
Advertisements

ENEL111 Digital Electronics
Verilog.
The Verilog Hardware Description Language
CPEN Digital System Design
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.
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.
Anurag Dwivedi.  Verilog- Hardware Description Language  Modules  Combinational circuits  assign statement  Control statements  Sequential circuits.
SYEN 3330 Digital SystemsJung H. Kim Chapter SYEN 3330 Digital Systems Chapters 4 – Part3: Verilog – Part 1.
 HDLs – Verilog and Very High Speed Integrated Circuit (VHSIC) HDL  „ Widely used in logic design  „ Describe hardware  „ Document logic functions.
1 Lecture 13 VHDL 3/16/09. 2 VHDL VHDL is a hardware description language. The behavior of a digital system can be described (specified) by writing a.
Introduction to VHDL (Lecture #5) ECE 331 – Digital System Design The slides included herein were taken from the materials accompanying Fundamentals of.
Introduction to Verilog (Behavioral Modeling). Agenda Gate Delays and User-Defined Primitives Behavioral Modeling Design Examples Hands-on Practice.
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.
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.
CSET 4650 Field Programmable Logic Devices Dan Solarek VHDL Behavioral & Structural.
ECE 332 Digital Electronics and Logic Design Lab Lab 5 VHDL Design Styles Testbenches.
ECE/CS 352 Digital Systems Fundamentals
VHDL TUTORIAL Preetha Thulasiraman ECE 223 Winter 2007.
Verilog HDL. Hardware Description Language  HDL – a “language” for describing hardware  Two industry IEEE standards: Verilog VHDL (Very High Speed Integrated.
Combinational Logic. Digital Circuits Introduction Logic circuits for digital systems may be combinational or sequential. A combinational circuit.
A VHDL Tutorial ENG2410. ENG241/VHDL Tutorial2 Goals Introduce the students to the following: –VHDL as Hardware description language. –How to describe.
Verilog HDL: A solution for Everybody By, Anil Kumar Ram Rakhyani
Digital System 數位系統 Verilog HDL Ping-Liang Lai (賴秉樑)  
CPEN Digital System Design
CWRU EECS 317 EECS 317 Computer Design LECTURE 1: The VHDL Adder Instructor: Francis G. Wolff Case Western Reserve University.
Basic Overview of VHDL Matthew Murach Slides Available at:
Module 1.2 Introduction to Verilog
Introduction to VHDL Spring EENG 2920 Digital Systems Design Introduction VHDL – VHSIC (Very high speed integrated circuit) Hardware Description.
Fall 2004EE 3563 Digital Systems Design EE 3563 VHSIC Hardware Description Language  Required Reading: –These Slides –VHDL Tutorial  Very High Speed.
1 component OR_3 port (A,B,C: in bit; Z: out bit); end component ; Reserved Words  Declarations of Components and Entities are similar  Components are.
ECE 331 – Digital System Design Single-bit Adder Circuits and Adder Circuits in VHDL (Lecture #11) The slides included herein were taken from the materials.
Hardware languages "Programming"-language for modelling of (digital) hardware 1 Two main languages: VHDL (Very High Speed Integrated Circuit Hardware Description.
CEC 220 Digital Circuit Design Introduction to VHDL Wed, February 25 CEC 220 Digital Circuit Design Slide 1 of 19.
LECTURE III INTRODUCTION TO HDL/VERILOG. HDL: Hardware Description Languages (Verilog for this class) are a way in which digital circuits can be described.
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
04/26/20031 ECE 551: Digital System Design & Synthesis Lecture Set : Introduction to VHDL 12.2: VHDL versus Verilog (Separate File)
VHDL ELEC 311 Digital Logic and Circuits Dr. Ron Hayne Images Courtesy of Cengage Learning.
CEC 220 Digital Circuit Design Introduction to VHDL Friday, February 21 CEC 220 Digital Circuit Design Slide 1 of 10.
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,
CEC 220 Digital Circuit Design Introduction to VHDL Wed, Oct 14 CEC 220 Digital Circuit Design Slide 1 of 19.
ECE 171 Digital Circuits Chapter 8 Hardware Description Language
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.
Combinational Circuit Design COE 202 Digital Logic Design Dr. Muhamed Mudawar King Fahd University of Petroleum and Minerals.
Basic Language Concepts
Subject Name: FUNDAMENTALS OF HDL Subject Code: 10EC45
Verilog-HDL-1 by Dr. Amin Danial Asham.
Verilog-HDL-3 by Dr. Amin Danial Asham.
Behavioral Modeling in Verilog
UNIT 2: Data Flow description
مدار منطقی Logic Circuits
CHAPTER 10 Introduction to VHDL
Introduction to Verilog
Lecture 1.3 Hardware Description Languages (HDLs)
102-1 Under-Graduate Project Verilog
Hardware Descriptive Languages these notes are taken from Mano’s book
مدار منطقی به نام یگانه مهندس هستی مهدی قدیری
Chapters 4 – Part3: Verilog – Part 1
The Verilog Hardware Description Language
© Copyright Joanne DeGroat, ECE, OSU
COE 202 Introduction to Verilog
Combinational Circuit Design
EEL4712 Digital Design (VHDL Tutorial).
Presentation transcript:

Hardware Descriptive Languages these notes are taken from Mano’s book It can represent: Truth Table Boolean Expression Diagrams of gates and complex functions Signals Gates, and complex functions A Complete Digital System 12/11/2018

HDL, Area of Application Design Entry Logic Simulation Functional Verification Digital Circuit Synthesis Timing Verification Fault Simulation Documntation 12/11/2018

Declarations Language Manual describes Syntax Reserved words….around 100 Reserved words are lower case: module, endmodule, input, output, wire, timescale….. // is used for comments /*….*/ Is used for multi-line comments Blank spaces are ignored Blank spaces may not appear within a reserved word, identifier, an operator or a number 12/11/2018

Declarations Verilog is case sensitive module .. Must be closed with endmodule and there is no “;” after endmodule. Combinational Logic can be described by: Boolean Equations , Truth Table, Schematic Capture A digital System can be modeled in structural, algorithmic or behavioural. 12/11/2018

Identifiers Are case sensitive, Must NOT start with numeric characters They may contain the underscore “ _” Example: Asim Al_Khalili Al-khalili COEN212 12/11/2018

Verilog Constructs Each module starts with reserved word module and ends with endmodule. The port list is enclosed within parenthesis. Commas are used to separate the elements. All statements must end with a “;”. input and out define the ports. wire defines the internal connections. Gates are defined with reserved words and, not or … Each gate is called by a gate instantiation. Gates names are optional but help in identifying the circuit. Gate output, inputs are ordered separated with a comma and enclosed by parenthesis. 12/11/2018

Example (Mano’s book 4thEdition) B G1 w1 G3 D C G2 E // Verilog model circuit of above figure. IEEE 1364-1995 Syntax module Simple_Circuit (A,B,C,D,E); output D,E; input A,B,C; wire w1; and G1 (w1,A,B); not G2 (E,C); or G3 (D,w1,E); endmodule 12/11/2018

Delays The propagation delay is specified in terms of time units and is specified by the symbol # and #(10) G1 (w1, A,B) The association of time unit and the time scale is made with the compiler directive ‘timescale The directive is specified before the declaration of a module ‘timescale 1 ns/100ps indicates unit of measurement for time delay followed by the precision round off. 12/11/2018

Test Bench // Test bench for Simple_Circuit__delay T_Simple_Circuit Test generator Circuit reg wire Circuit Stimulator // Test bench for Simple_Circuit__delay module t_Simple_Circuit_delay; wire D,E; // circuit output of the circuit to be tsted within the test bench reg A,B,C; // output from stimulator and input to the circuit Simple_Circuit_delay M1 (A,B,C,D,E); //instantiation of M1 Initial // statement to describe the testing waveform begin A= 1’b0; B=1’b0; C=1’b0; // one binary digit with a value of 0 for A,B and C #100 A=1’b1; B=1’b1; C=1”b1; // after 100 ns inputs are changed to ABC 111 end Initial #200 $finish; // end of the test application, ie. entire test simulation time endmodule 12/11/2018

Example (Mano’s book 4thEdition) A (30ns) w1 (20 ns) B G1 G3 D E C G2 (10) ns // Verilog model circuit of above figure. IEEE 1364-1995 Syntax module Simple_Circuit_with_delay (A,B,C,D,E); output D,E; input A,B,C; wire w1; and #(30) G1 (w1,A,B); not #(10) G2 (E,C); or #(20)G3 (D,w1,E); endmodule Time units (ns) Input A B C Output E w1 D 0 0 0 1 0 1 Initial 1 1 1 initial 10 0 01 20 0 0 1 30 0 1 0 40 50 0 1 1 12/11/2018

Example (Mano’s book 4thEdition) A 30 ns w1 20 ns B G1 G3 D C 10 ns E G2 A B C W1 E D 100 110 130 150 12/11/2018

Boolean Expressions Use reserved word assign and &, | and ~ for AND,OR,NOT Example: // Boolean Circuit representation module Boolean Circuit (E,F,A,B,C,D); output E,F; input A,B,C,D; assign E= A| (B&C)|(~B&D); // A + (B.C) + (B’.D) assign F= (~B &C) | (B& ~C & ~D); // (B’.C) + (B.C’.D’) endmodule 12/11/2018

User Defined Primitives System primitives: and, or, nand, xor One way is to define own primitive by a Truth Table…. Use primitive and endprimitive to create a UDP It is declared with the reserved word primitive followed by a name and port list One output and it must be listed first in the port listing and following the output declaration Any number of inputs, however the order given in the port declaration must be the same as the Table The table must start with the reserved word table and end with endtable The values of the inputs are listed in order and separated from output by : the line ends with ; 12/11/2018

User Defined Primitives Example: // Verilog model: User Defined Primitive primitive UDP_02467 (D,A,B,C); output D; input A,B,C; // Truth Table for D= f( A, B ,C ) = Σ m(0,2,4,6,7); table // A B C : D // headers endtable endprimitive : 1; 1 0; 12/11/2018

Calling of UDP // Verilog model: Circuit instantiation of Circuit_UPD_02467 module Circuit_with UDP_02467 (e,f,a,b,c,d); output e,f; input a,b,c,d; UDP_02467 (e,a,b,c); and (f,e,d); endmodule a b c d UDP_02467 e f 12/11/2018

Concurrent assignment statement VHDL EXAMPLE -- Interface ………… 1 entity XOR_2 is ……………… 2 Port ……………… .3 (A,B : in BIT; Z : out BIT); …………… 4 end XOR_2; ……………… 5 -- Body ………… …6 architecture DATA_FLOW of XOR_2 is …7 signal Sig 1, Sig 2: BIT; ……… 8 begin ………………9 Sig 1 <= A and not B; …………… ..10 Sig 2 <= B and not A; ………………11 Z <=Sig1 or Sig 2; ……………12 end DATA_FLOW; ……………13 Reserved word Signal Declaration Concurrent assignment statement

AND Gate simulation

library ieee; use ieee.std_logic_1164.all; entity Full_Adder is -- generic (TS : TIME := 0.11 ns; TC : TIME := 0.1 ns); port (X, Y, Cin: in std_logic; Cout, Sum: out std_logic); end Full_Adder; architecture Concurrent of Full_Adder is begin Sum <= X xor Y xor Cin after 0.11 ns ; Cout <= (X and Y) or (X and Cin) or (Y and Cin) after 0.11 ns; end Concurrent;

Example : Multiplicand = 100010012 = 8916 Multiplier = 101010112 = AB16 Expected Result = 1011011100000112 =5B8316