ENEL111 Digital Electronics

Slides:



Advertisements
Similar presentations
UNIT 8: Synthesis Basics
Advertisements

Chapter 3 Gate-Level Minimization
Verilog Fundamentals Shubham Singh Junior Undergrad. Electrical Engineering.
OBJECTIVES Learn the history of HDL Development. Learn how the HDL module is structured. Learn the use of operators in HDL module. Learn the different.
Verilog Overview. University of Jordan Computer Engineering Department CPE 439: Computer Design Lab.
VHDL - I 1 Digital Systems. 2 «The designer’s guide to VHDL» Peter J. Andersen Morgan Kaufman Publisher Bring laptop with installed Xilinx.
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.
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 
Digital Design with VHDL Presented by: Amir Masoud Gharehbaghi
 HDLs – Verilog and Very High Speed Integrated Circuit (VHSIC) HDL  „ Widely used in logic design  „ Describe hardware  „ Document logic functions.
Evolution and History of Programming Languages Software/Hardware/System.
University Of Vaasa Telecommunications Engineering Automation Seminar Signal Generator By Tibebu Sime 13 th December 2011.
DON’T CARE CONDITIONS Functions that have unspecified output for some input combinations are called incompletely specified functions. Unspecified minterms.
FPGA chips and DSP Algorithms By Emily Fabes. 2 Agenda FPGA Background Reasons to use FPGA’s Advantages and disadvantages of using FPGA’s Sample VHDL.
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.
VHDL Intro What does VHDL stand for? VHSIC Hardware Description Language VHSIC = Very High Speed Integrated Circuit Developed in 1982 by Govt. to standardize.
Silicon Programming--Intro. to HDLs1 Hardware description languages: introduction intellectual property (IP) introduction to VHDL and Verilog entities.
Hardware Description Language HDL. 2 Hardware Description Language HDL  Describes circuits and systems in text. −As a software program.  Can be processed.
ECE Lecture 1 1 ECE 3561 Advanced Digital Design Department of Electrical and Computer Engineering The Ohio State University.
Spring 2002EECS150 - Lec0-intro Page 1 EECS150 - Digital Design Lecture 8 - Hardware Description Languages February 14, 2002 John Wawrzynek.
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.
Hardware Description Language(HDL). Verilog simulator was first used beginning in 1985 and was extended substantially through The implementation.
(1) Introduction © Sudhakar Yalamanchili, Georgia Institute of Technology, 2006.
CSET 4650 Field Programmable Logic Devices
Hardware Design Environment Instructors: Fu-Chiung Cheng ( 鄭福炯 ) Associate Professor Computer Science & Engineering Tatung University.
Introduction Verilog is a HARDWARE DESCRIPTION LANGUAGE (HDL) A hardware description language is a language or means used to describe or model a digital.
COE 405 Design and Modeling of Digital Systems
Galen SasakiEE 260 University of Hawaii1 Electronic Design Automation (EDA) EE 260 University of Hawaii.
CPEN Digital System Design
Module 1.2 Introduction to Verilog
Fall 2004EE 3563 Digital Systems Design EE 3563 VHSIC Hardware Description Language  Required Reading: –These Slides –VHDL Tutorial  Very High Speed.
Anurag Dwivedi. Basic Block - Gates Gates -> Flip Flops.
Electrical and Computer Engineering University of Cyprus LAB 1: VHDL.
1 Hardware Description Languages: a Comparison of AHPL and VHDL By Tamas Kasza AHPL&VHDL Digital System Design 1 (ECE 5571) Spring 2003 A presentation.
1 Hardware description languages: introduction intellectual property (IP) introduction to VHDL and Verilog entities and architectural bodies behavioral,
Verilog A Hardware Description Language (HDL ) is a machine readable and human readable language for describing hardware. Verilog and VHDL are HDLs.
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.
CSCI-365 Computer Organization Lecture Note: Some slides and/or pictures in the following are adapted from: Computer Organization and Design, Patterson.
04/26/20031 ECE 551: Digital System Design & Synthesis Lecture Set : Introduction to VHDL 12.2: VHDL versus Verilog (Separate File)
Digital Design Using VHDL and PLDs ECOM 4311 Digital System Design Chapter 1.
Multiplexers Section Topics Multiplexers – Definition – Examples – Verilog Modeling.
May 9, 2001Systems Architecture I1 Systems Architecture I (CS ) Lab 5: Introduction to VHDL Jeremy R. Johnson May 9, 2001.
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.
Hardware Description Languages ECE 3450 M. A. Jupina, VU, 2014.
VHDL From Ch. 5 Hardware Description Languages. History 1980’s Schematics 1990’s Hardware Description Languages –Increased due to the use of Programming.
EECE 320 L8: Combinational Logic design Principles 1Chehab, AUB, 2003 EECE 320 Digital Systems Design Lecture 8: Combinational Logic Design Principles.
An Overview CS341 Digital Logic and Computer Organization F2003.
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.
SUBJECT : DIGITAL ELECTRONICS CLASS : SEM 3(B) TOPIC : INTRODUCTION OF VHDL.
Introduction to Verilog COE 202 Digital Logic Design Dr. Muhamed Mudawar King Fahd University of Petroleum and Minerals.
Subject Name: FUNDAMENTALS OF HDL Subject Code: 10EC45
Verilog-HDL-1 by Dr. Amin Danial Asham.
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
VHDL Introduction.
Chapter 10 Introduction to VHDL
COE 202 Introduction to Verilog
Presentation transcript:

ENEL111 Digital Electronics Richard Nelson G.1.29 richardn@cs.waikato.ac.nz

Second Half of ENEL 111 Digital Electronics Number Systems and Logic Electronic Gates Combinational Logic Sequential Circuits ADC – DAC circuits Memory and Microprocessors Hardware Description Languages

Hardware Description Language

This Lecture - HDL What and why HDL Verilog HDL Modelling a simple circuit. Delays Stimulus Abstraction Levels Gates Dataflow Proceedural

Hardware Description Language (HDL) Basic idea is a programming language to describe hardware Initial purpose was to allow abstract design and simulation Design could be verified then implemented in hardware Now Synthesis tools allow direct implementation from HDL code. Large improvement in designer productivity

HDL HDL allows write-run-debug cycle for hardware development. Similar to programming software Much, much faster than design-implement-debug Combined with modern Field Programmable Gate Array chips large complex circuits (100000s of gates) can be implemented.

HDLs There are many different HDLs VHDL is the most common Verilog HDL ABEL VHDL VHDL is the most common Large standard developed by US DoD VHDL = VHSIC HDL VHSIC = Very High Speed Integrated Circuit

Verilog HDL Verilog HDL is second most common History Easier to use in many ways = better for teaching C - like syntax History Developed as proprietry language in 1985 Opened as public domain spec in 1990 Due to losing market share to VHDL Became IEEE standard in 1995

Verilog HDL Verilog constructs are use defined keywords Examples: and, or, wire, input output One important construct is the module Modules have inputs and outputs Modules can be built up of Verilog primatives or of user defined submodules.

Example: Simple Circuit Diagram All examples and code from Mano “Digital Design” 3rd Ed.

Example: Simple Circuit HDL module smpl_circuit(A,B,C,x,y); input A,B,C; output x,y; wire e; and g1(e,A,B); not g2(y, C); or g3(x,e,y); endmodule

Simple Circuit Notes The module starts with module keyword and finishes with endmodule. Internal signals are named with wire. Comments follow // input and output are ports. These are placed at the start of the module definition. Each statement ends with a semicolon, except endmodule.

Circuit to code module smpl_circuit(A,B,C,x,y); input A,B,C; output x,y; wire e; and g1(e,A,B); not g2(y, C); or g3(x,e,y); endmodule

Adding Delays To simulate a circuits real world behaviour it is important that propogation delays are included. The units of time for the simulation can be specified with timescale. Default is 1ns with precision of 100ps Component delays are specified as #(delay)

Simple Circuit with Delay module circuit_with_delay (A,B,C,x,y); input A,B,C; output x,y; wire e; and #(30) g1(e,A,B); or #(20) g3(x,e,y); not #(10) g2(y,C); endmodule

Effect of delay Time (ns) Input A B C Output y e x <0 0 0 0 1 0 1 1 1 1 10 0 0 1 20 30 0 1 0 40 50 0 1 1

Input signals In order to simulate a circuit the input signals need to be known so as to generate an output signal. The input signals are often called the circuit stimulus. An HDL module is written to provide the circuit stimulus. This is known as a testbench.

Testbench The testbench module includes the module to be tested. There are no input or output ports for the testbench. The inputs to the test circuit are defined with reg and the outputs with wire. The input values are specified with the keyword initial A sequence of values can be specified between begin and end.

Signal Notation In Verilog signals are generalised to support multi-bit values (e.g. for buses) The notation A = 1’b0; means signal A is one bit with value zero. The end of the simulation is specified with $finish.

Stimulus module for simple circuit module stimcrct; reg A,B,C; wire x,y; circuit_with_delay cwd(A,B,C,x,y); initial begin A = 1'b0; B = 1'b0; C = 1'b0; #100 A = 1'b1; B = 1'b1; C = 1'b1; #100 $finish; end endmodule

Timing Diagram

Gate Level Modelling The simple circuit used so far is an example of gate-level modelling. The module is a text description of the circuit layout. Verilog has all the standard gates and, nand or, nor xor, xnor not, buf

Primatives The standard logic gates are Verilog system primatives. It is possible to specify new user-defined primatives (UDPs). UDPs are specified by there truth-table. UDPs may only have one output.

User Defined Primative primitive crctp (x,A,B,C); output x; input A,B,C; //Truth table for x(A,B,C) table // A B C : x (Note -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

Using a Primative A Primative by itself is not a module. To use it (e.g. for testing), it needs to be instantiated in a module. It can be combined with other primatives.

Instantiate User-defined Primative module declare_crctp; reg x,y,z; wire w; crctp (w,x,y,z); endmodule

Dataflow modelling Another level of abstraction is to model dataflow. In dataflow models, signals are continuously assigned values using the assign keyword. assign can be used with Boolean expressions. Verilog uses & (and), | (or), ^ (xor) and ~ (not) Logic expressions and binary arithmetic are also possible.

Simple Circuit Boolean Expression x = A.B + C y = C

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

Multiplexor Multiplexor is a combinational circuit where an input is chosen by a select signal. Two input mux output =A if select =1 output= B if select =0 A x B s

Two Input Multiplexor A two-input mux is actually a three input device. s A B x 1 A x B s x = A.s + B.s

Dataflow description of 2-input Mux Conditional operator ?:takes three operands: condition? true_expression : false_expression module mux2x1_df (A,B,select,OUT); input A,B,select; output OUT; assign OUT = select ? A : B; endmodule

Behavioural Modelling Represents circuits at functional and algorithmic level. Use proceedural statements similar in concept to proceedural programming languages (e.g. C, Java), Behavioural modelling is mostly used to represent sequential circuits.

Behavioural Modelling Behavioural models place proceedural statements in a block after the always keyword. The always keyword takes a list of variables. The block of statements is executed whenever one of the variables changes. The target variables are of type reg. This type retains its value until a new value is assigned.

Behavioral description of 2-input mux module mux2x1_bh(A,B,select,OUT); input A,B,select; output OUT; reg OUT; always @ (select or A or B) if (select == 1) OUT = A; else OUT = B; endmodule

HDL Summary Hardware Description Languages allow fast design and verification of digital circuits. Accurate simulation and testing requires delays and inputs to be specified. There are three different levels of abstraction for modelling circuits.