04/26/20031 ECE 551: Digital System Design & Synthesis Lecture Set 12 12.1: Introduction to VHDL 12.2: VHDL versus Verilog (Separate File)

Slides:



Advertisements
Similar presentations
Give qualifications of instructors: DAP
Advertisements

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.
History TTL-logic PAL (Programmable Array Logic)
Mridula Allani Fall 2010 (Refer to the comments if required) ELEC Fall 2010, Nov 21(Adopted from Profs. Nelson and Stroud)
Introduction to VHDL (Lecture #5) ECE 331 – Digital System Design The slides included herein were taken from the materials accompanying Fundamentals of.
ECE C03 Lecture 18ECE C03 Lecture 61 Lecture 18 VHDL Modeling of Sequential Machines Prith Banerjee ECE C03 Advanced Digital Design Spring 1998.
Verilog Sequential Circuits Ibrahim Korpeoglu. Verilog can be used to describe storage elements and sequential circuits as well. So far continuous assignment.
Introduction to VHDL CSCE 496/896: Embedded Systems Witawas Srisa-an.
ELEN 468 Lecture 191 ELEN 468 Advanced Logic Design Lecture 19 VHDL.
VHDL Intro What does VHDL stand for? VHSIC Hardware Description Language VHSIC = Very High Speed Integrated Circuit Developed in 1982 by Govt. to standardize.
HDL-Based Digital Design Part I: Introduction to VHDL (I) Dr. Yingtao Jiang Department Electrical and Computer Engineering University of Nevada Las Vegas.
331 W05.1Spring :332:331 Computer Architecture and Assembly Language Spring 2006 Week 5: VHDL Programming [Adapted from Dave Patterson’s UCB CS152.
ECE C03 Lecture 141 Lecture 14 VHDL Modeling of Sequential Machines Hai Zhou ECE 303 Advanced Digital Design Spring 2002.
VHDL. What is VHDL? VHDL: VHSIC Hardware Description Language  VHSIC: Very High Speed Integrated Circuit 7/2/ R.H.Khade.
Simple Testbenches Behavioral Modeling of Combinational Logic
Fall 08, Oct 29ELEC Lecture 7 (updated) 1 Lecture 7: VHDL - Introduction ELEC 2200: Digital Logic Circuits Nitin Yogi
Introduction to VHDL (part 2)
1 Data Object Object Types A VHDL object consists of one of the following: –Signal, Which represents interconnection wires that connect component instantiation.
ECE 332 Digital Electronics and Logic Design Lab Lab 5 VHDL Design Styles Testbenches.
ECE 2372 Modern Digital System Design
1 Digital System Design Subject Name : Digital System Design Course Code : IT- 308 Instructor : Amit Prakash Singh Home page :
VHDL TUTORIAL Preetha Thulasiraman ECE 223 Winter 2007.
A VHDL Tutorial ENG2410. ENG241/VHDL Tutorial2 Goals Introduce the students to the following: –VHDL as Hardware description language. –How to describe.
VHDL Introduction. V- VHSIC Very High Speed Integrated Circuit H- Hardware D- Description L- Language.
VHDL IE- CSE. What do you understand by VHDL??  VHDL stands for VHSIC (Very High Speed Integrated Circuits) Hardware Description Language.
George Mason University ECE 545 – Introduction to VHDL ECE 545 Lecture 5 Finite State Machines.
Language Concepts Ver 1.1, Copyright 1997 TS, Inc. VHDL L a n g u a g e C o n c e p t s Page 1.
CWRU EECS 317 EECS 317 Computer Design LECTURE 1: The VHDL Adder Instructor: Francis G. Wolff Case Western Reserve University.
Introduction to VHDL Spring EENG 2920 Digital Systems Design Introduction VHDL – VHSIC (Very high speed integrated circuit) Hardware Description.
1 ECE 545 – Introduction to VHDL Dataflow Modeling of Combinational Logic Simple Testbenches ECE 656. Lecture 2.
Fall 2004EE 3563 Digital Systems Design EE 3563 VHSIC Hardware Description Language  Required Reading: –These Slides –VHDL Tutorial  Very High Speed.
VHDL Very High Speed Integrated Circuit Hardware Description Language Shiraz University of shiraz spring 2011.
Modern VLSI Design 4e: Chapter 8 Copyright  2008 Wayne Wolf Topics VHDL register-transfer modeling: –basics using traffic light controller; –synthesis.
M. Balakrishnan Dept of Computer Science & Engg. I.I.T. Delhi
(1) Basic Language Concepts © Sudhakar Yalamanchili, Georgia Institute of Technology, 2006.
Introduction to VHDL Simulation … Synthesis …. The digital design process… Initial specification Block diagram Final product Circuit equations Logic design.
Hardware languages "Programming"-language for modelling of (digital) hardware 1 Two main languages: VHDL (Very High Speed Integrated Circuit Hardware Description.
Chapter 5 Introduction to VHDL. 2 Hardware Description Language A computer language used to design circuits with text-based descriptions of the circuits.
16/11/2006DSD,USIT,GGSIPU1 Packages The primary purpose of a package is to encapsulate elements that can be shared (globally) among two or more design.
VHDL Discussion Sequential Sytems. Memory Elements. Registers. Counters IAY 0600 Digital Systems Design Alexander Sudnitson Tallinn University of Technology.
Digital System Projects
Introduction to ASIC flow and Verilog HDL
5-1 Logic System Design I VHDL Design Principles ECGR2181 Reading: Chapter 5.0, 5.1, 5.3 port ( I: in STD_LOGIC_VECTOR (1 to 9); EVEN, ODD: out STD_LOGIC.
EE121 John Wakerly Lecture #17
VHDL Discussion Subprograms IAY 0600 Digital Systems Design Alexander Sudnitson Tallinn University of Technology 1.
George Mason University ECE 448 – FPGA and ASIC Design with VHDL VHDL Coding for Synthesis ECE 448 Lecture 12.
VHDL Programming Fundamentals Presented By Dr. Pradyut Kumar Biswal Department of Electronics, IIIT Bhubaneswar.
55:032 - Intro. to Digital DesignPage 1 VHDL and Processes Defining Sequential Circuit Behavior.
George Mason University Behavioral Modeling of Sequential-Circuit Building Blocks ECE 545 Lecture 8.
Case Study: Xilinx Synthesis Tool (XST). Arrays & Records 2.
1 Introduction to Engineering Spring 2007 Lecture 18: Digital Tools 2.
Basic Language Concepts
Design Entry: Schematic Capture and VHDL
Behavioral Style Combinational Design with VHDL
B e h a v i o r a l to R T L Coding
Introduction Introduction to VHDL Entities Signals Data & Scalar Types
Dataflow Style Combinational Design with VHDL
CHAPTER 17 VHDL FOR SEQUENTIAL LOGIC
Behavioral Style Combinational Design with VHDL
IAS 0600 Digital Systems Design
ECE 434 Advanced Digital System L08
VHDL Discussion Subprograms
VHDL Introduction.
Behavioral Modeling of Sequential-Circuit Building Blocks
VHDL Discussion Subprograms
IAS 0600 Digital Systems Design
Sequntial-Circuit Building Blocks
4-Input Gates VHDL for Loops
(Sequential-Circuit Building Blocks)
EEL4712 Digital Design (VHDL Tutorial).
Presentation transcript:

04/26/20031 ECE 551: Digital System Design & Synthesis Lecture Set : Introduction to VHDL 12.2: VHDL versus Verilog (Separate File)

10/15/01 2 ECE Digital System Design & Synthesis Lecture 12.2 – Introduction to VHDL  Overview  VHDL Abstraction Levels  VHDL Constructs  Entities and Architectures  Signals and Variables  Concurrent VHDL  Sequential VHDL  Structural VHDL  VHDL Types  Libraries and Packages  A Bit on Clocking

10/15/01 3 VHDL Abstraction Levels  Functional:  Algorithms without timing  Behavioral:  Algorithms (Behavior) with timing. Register level implementation not defined  RTL (Register Transfer Level):  Register level implementation defined in terms of registers, datapaths, state machines  Logic or Gate Level:  Implementation defined in terms of logic components such as gates, flip-flops, and Boolean equations

10/15/01 4 VHDL Constructs  Concurrent VHDL or Dataflow:  Consists of a collection of statements and processes that execute concurrently  Sequential VHDL:  Consists of the sequences of statements within processes  Logic described may be combinational or sequential  Structural:  Describes interconnections of components (entities)  Analogous to logic diagrams or netlists

10/15/01 5 Entities and Architectures  Entity:  The primary hardware abstraction in VHDL  Represents a part of a hardware design that has well-defined inputs and outputs and a well-defined function  Provides: the entity name, the inputs and outputs  Analogous to a symbol in a block diagram  Architecture Body:  Specifies the relationships between the inputs and outputs of a design entity  May be a mixture of structural, concurrent and sequential VHDL.  A given entity may have multiple different architectures.

10/15/01 6 Entities and Architectures - An Example library ieee; -- Instantiations of a library and a package are tied use ieee.std_logic_1164.all; -- to the following entity only. entity decoder_3_to_8 is -- Declaration of entity named decoder_3_to_8 port (A : in std_logic_vector(2 downto 0); -- 3-bit input A of type std_logic D : out std_logic_vector(7 downto 0)); -- 8-bit output D of type std_logic end decoder_3_to_8; -- End of entity declaration architecture functional of decoder_3_to_8 is -- Architecture named functional begin -- for entity decoder_3_to_8 D <= B" " when A = B"000” -- Concurrent when else statement else B" " when A = B"001" -- for evaluation of output D. else B" " when A = B"010" else B" " when A = B"011"

10/15/01 7 Entities and Architectures – An Example (Continued) else B" " when A = B"100" else B" " when A = B"101" else B" " when A = B"110" else B" " when A = B"111" else B"XXXXXXXX" when others; -- For combinations involving std_logic end functional; --values in addition to 0 and 1.

10/15/01 8 Signals and Variables  A signal can be viewed as a wire or cluster of wires  Signals are concurrent and sequential objects  A variable is not viewed as wire  A variable is only a sequential object

10/15/01 9 Signals and Variables – Declaration  VHDL is case-insensitive: OR, Or and or are equivalent  VHDL keywords are highlighted using boldface type  Keywords may not be used for identifiers, etc.  Port declarations for entities are signal declarations  Signal declarations use modes and typing  Variable declarations use typing  Variables declared within processes, functions, or procedures

10/15/01 10 Signals and Variables – Assignment  Signal assignment:  F <= A and B;  Variable assignment:  F = A and B;  Variables can be used only in a process (sequential VHDL).  Variables are immediately evaluated with new value available to the next statement.  Process has sensitivity list.

10/15/01 11 Concurrent VHDL  <= z <= a or b;  when else F <= X or Y when S = "00" else X xor Y when S = "01" else X and Y when S = "10" else Y when T = ’1’; -- Statements are evaluated in order else X;  with select with S select-- Limited to single selection expression F <= X or Y when "00“ -- So less flexible than when else X xor Y when "01" X and Y when "10" not X when "11" "XXXX" when others;

10/15/01 12 Sequential VHDL  Used within processes, functions and procedures  Statements are executed sequentially as in the typical programming language  Processes execute concurrently with each other  A complete process behaves like a concurrent statement  In a process, variables can be used as well as signals  Variables are evaluated without delay, i.e., immediately  The result of a variable evaluation is available to subsequent statements in the process  Variables are declared and assigned only within sequential VHDL  Variables may be equated to signals and signals to variables as long as they are of the same type

10/15/01 13 Sequential VHDL – The Process  A sequence of sequentially-executed statements.  The statements are ordered  A sensitivity list governs the activation of the process.  The process executes only when a signal on the sensitivity list changes  If process represents a combinational circuit, all inputs must be on the sensitivity list  If process represents the state of a synchronous state machine, the clock and asynchronous reset signal typically are the sensitivity list

10/15/01 14 Sequential VHDL - A Process Example pick: process (S, D) is-- Process statement with sensitivity list begin case S is-- Case statement conditioned by S when B"00" => Y <= D(0); -- Use of subarrays D(i) of when B"01" => Y <= D(1);-- array D. when B"10" => Y <= D(2); when B"11" => Y <= D(3); when others => Y <= 'X'; end case; end process pick;

10/15/01 15 Sequential VHDL – if then else if … then … elsif … then … … else endif

10/15/01 16 Sequential VHDL - case  Not evaluated in order; synthesizes more like regular “flat decoder.”  Example – Case: case S is -- Case statement conditioned by S when B"00" => Y <= D(0); when B"01" => Y <= D(1); when B"10" => Y <= D(2); when B"11" => Y <= D(3); when others => Y <=’X’; end case;

10/15/01 17 Sequential VHDL – Other Constructs  Loops  for  while  Statements  wait  null Used on right hand side to leave signals unchanged Example: acc <= null when others;  Subprograms  function  procedure

10/15/01 18 Structural VHDL  Structural VHDL is based on an interconnection of components (entities).  A key element of structural VHDL is the component.  Within an entity, declaration of another entity to be instantiated  Declaration of component must match referenced entity  In VHDL 87, use of components is required  In VHDL 93, the component not required; can use direct instantiation  No built-in logic gates

10/15/01 19 Structural VHDL – Components (Continued)  Example: Component Declaration component full_adder port (X, Y, Z : in std_logic; S, C : out std_logic); end component;  Example: Component Instantiation  Explicit fa0: full_adder port map (X => A(0), Y => B(0), Z => C0, S => S(0), C => C(1));  Implicit fa0: full_adder port map (A(0), B(0), C0, S(0), C(1)); -- order dependent

10/15/01 20 VHDL Types  VHDL Operators highly restricted to types  +, - : integer; or, and : bit, bit_vector  IEEE 1076 Standard Package Types:  type bit is (‘0’,’1’);  type bit_vector is array (integer range <>) of bit;  type integer is range MININT to MAXINT;  subtype positive is integer range 1 to MAXINT;  subtype natural is integer range 0 to MAXINT;  type boolean is (TRUE, FALSE);

10/15/01 21 VHDL Types (Continued)  IEEE 1164 Package – allows simulation values beyond 0 and 1  IEEE 1164 Types: (allows 7 added values for simulation)  type std_ulogic is (‘U’,’X’,’0’,’1’,’Z’,’W’,’L’,’H’,’-’);  type std_ulogic_vector is array (natural range <>) of std_ulogic;  subtype std_logic is resolution_func std_logic;  type std_logic_vector is (natural range <>) of std_logic;  subtype X01Z is resolution_func std_logic range ‘X’ to ‘Z’;  -- includes X, 0, 1, Z  std_logic is widely used

10/15/01 22 Libraries  Compiled VHDL entities stored in a library with a logical name.  These entities can be components or packages.  Library or libraries containing components or packages to be used must be specified for each of the entities in a description.  By default, std and work libraries are specified for each entity declared  Typically specify IEEE library and user libraries (if any): library ieee; library lcdf; -- user library for Mano & Kime textbook

10/15/01 23 Packages  A package contains functions, procedures, types, constants, attributes or components  A package consists of a declaration and a body  Declaration is similar to multiple entities, but describes instead exportable objects  Body is similar to multiple architectures, providing the actual subprograms and component bodies  By default, the following package use is specified:  use std.standard.all;  Typically specify IEEE packages and user packages (if any): use ieee.std_logic_1164.all; use lcdf.gates; -- gate package in user library for Mano & Kime

10/15/01 24 Packages (continued)  Other packages may be essential to the designs you do to avoid difficult VHDL coding, e. g., typing problems.  To handle +,- and and, or for the same signals, use IEEE packages: ieee.std_logic_arith ieee.std_numeric

10/15/01 25 A Bit on Clocking  Clocking uses notion of event, i. e., a change in signal value.  Example – Positive Edge-Triggered Flip-Flop: signal D, clk, Q: std_logic; process (clk, reset) is begin if (reset = ’1’) Q <= ’0’; elsif (clk’event and clk = ’1’) then Q <= D; end if; end process;

10/15/01 26 References  IEEE Standard VHDL Language Reference Manual, ANSI/IEEE Std , Institute of Electrical and Electronic Engineers, Inc.,  HDL Synthesis Guide (Version 4.2), Exemplar Logic, Inc.,  Ashenden, P., The Designer’s Guide to VHDL, Morgan Kaufmann, 1996 (paperback).  Sjoholm, S., and L. Lindh, VHDL for Designers, Prentice Hall Europe,  Mano, M., and C. Kime, Logic and Computer Design Fundamentals, 2nd Edition, Prentice-Hall, 2000.