ECE 434 Advanced Digital System L9

Slides:



Advertisements
Similar presentations
VHDL ELEC 418 Advanced Digital Systems Dr. Ron Hayne Images Courtesy of Thomson Engineering.
Advertisements

Introduction to VHDL (Lecture #5) ECE 331 – Digital System Design The slides included herein were taken from the materials accompanying Fundamentals of.
VHDL Data Types Module F3.1. VHDL Data Types Scalar Integer Enumerated Real (floating point)* Physical* Composite Array Record Access (pointers)* * Not.
Topics of Lecture Structural Model Procedures Functions Overloading.
HDL-Based Digital Design Part I: Introduction to VHDL (I) Dr. Yingtao Jiang Department Electrical and Computer Engineering University of Nevada Las Vegas.
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.
1 H ardware D escription L anguages Basic Language Concepts.
CPE 626 Advanced VLSI Design Lecture 3: VHDL Recapitulation Aleksandar Milenkovic
ECE 2372 Modern Digital System Design
VHDL – Dataflow and Structural Modeling and Testbenches ENGIN 341 – Advanced Digital Design University of Massachusetts Boston Department of Engineering.
Fall 2004EE 3563 Digital Systems Design EE 3563 VHDL – Basic Language Elements  Identifiers: –basic identifier: composed of a sequence of one or more.
Basic VHDL RASSP Education & Facilitation Module 10 Version 2.02 Copyright  RASSP E&F All rights reserved. This information is copyrighted by.
COE 202 Introduction to Verilog Computer Engineering Department College of Computer Sciences and Engineering King Fahd University of Petroleum and Minerals.
CPE 626 Advanced VLSI Design Lecture 4: VHDL Recapitulation (Part 2) Aleksandar Milenkovic
Lecture #8 Page 1 Lecture #8 Agenda 1.VHDL : Operators 2.VHDL : Signal Assignments Announcements 1.HW #4 assigned ECE 4110– Digital Logic Design.
Copyright(c) 1996 W. B. Ligon III1 Getting Started with VHDL VHDL code is composed of a number of entities Entities describe the interface of the component.
Fall 2004EE 3563 Digital Systems Design EE 3563 VHSIC Hardware Description Language  Required Reading: –These Slides –VHDL Tutorial  Very High Speed.
IAY 0600 Digital Systems Design VHDL discussion Verification: Testbenches Alexander Sudnitson Tallinn University of Technology.
Design Methodology Based on VHDL Instructors: Fu-Chiung Cheng ( 鄭福炯 ) Associate Professor Computer Science & Engineering Tatung University.
Electrical and Computer Engineering University of Cyprus LAB 1: VHDL.
Timing Model VHDL uses the following simulation cycle to model the stimulus and response nature of digital hardware Start Simulation Update Signals Execute.
(1) Basic Language Concepts © Sudhakar Yalamanchili, Georgia Institute of Technology, 2006.
L13 – VHDL Language Elements. VHDL Language Elements  Elements needed for FPGA design Types  Basic Types  Resolved Types – special attributes of resolved.
CEC 220 Digital Circuit Design More VHDL Fri, February 27 CEC 220 Digital Circuit Design Slide 1 of 15.
CEC 220 Digital Circuit Design Introduction to VHDL Wed, February 25 CEC 220 Digital Circuit Design Slide 1 of 19.
04/26/20031 ECE 551: Digital System Design & Synthesis Lecture Set : Introduction to VHDL 12.2: VHDL versus Verilog (Separate File)
BASIC VHDL LANGUAGE ELEMENTS Digital Design for Instrumentation with VHDL 1.
CEC 220 Digital Circuit Design Introduction to VHDL Friday, February 21 CEC 220 Digital Circuit Design Slide 1 of 10.
55:032 - Intro. to Digital DesignPage 1 VHDL and Processes Defining Sequential Circuit Behavior.
Lecture #8 Page 1 Lecture #8 Agenda 1.VHDL : Operators 2.VHDL : Signal Assignments Announcements 1.HW #4 assigned ECE 4110– Sequential Logic Design.
VHDL Tutorial.
IAY 0600 Digital Systems Design VHDL discussion Verification: Testbenches Alexander Sudnitson Tallinn University of Technology.
CEC 220 Digital Circuit Design Introduction to VHDL Wed, Oct 14 CEC 220 Digital Circuit Design Slide 1 of 19.
1 CS 352 Introduction to Logic Design Lecture 5 Ahmed Ezzat Multiplexers, Decoders, Programmable Logic Devices, and Intro to VHDL Ch-9 + Ch-10.
Fundamentals of Digital Signal Processing יהודה אפק, נתן אינטרטור אוניברסיטת תל אביב.
Definition of the Programming Language CPRL
Introduction To VHDL 홍 원 의.
Basic Language Concepts
Subject Name: FUNDAMENTALS OF HDL Subject Code: 10EC45
Design Entry: Schematic Capture and VHDL
Introduction Introduction to VHDL Entities Signals Data & Scalar Types
Dataflow Style Combinational Design with VHDL
CHAPTER 17 VHDL FOR SEQUENTIAL LOGIC
Timing Model Start Simulation Delay Update Signals Execute Processes
Chapter 2. Introduction To VHDL
IAS 0600 Digital Systems Design
CPE 626 Advanced VLSI Design Lecture 2: VHDL Recapitulation Aleksandar Milenkovic
ECE 434 Advanced Digital System L17
ECE 434 Advanced Digital System L15
CPE/EE 422/522 Advanced Logic Design L06
ECE 434 Advanced Digital System L08
Signal & Variables April 14,2007 DSD,USIT,GGSIPU.
CHAPTER 10 Introduction to VHDL
OPERATORS and CONCURRENT STATEMENTS
CPE 528: Lecture #4 Department of Electrical and Computer Engineering University of Alabama in Huntsville.
CPE/EE 422/522 Advanced Logic Design L08
CPE/EE 422/522 Advanced Logic Design L07
CPE/EE 422/522 Advanced Logic Design L11
ECE 434 Advanced Digital System L10
VHDL Discussion Subprograms
CPE 528: Lecture #5 Department of Electrical and Computer Engineering University of Alabama in Huntsville.
CPE 528: Lecture #3 Department of Electrical and Computer Engineering University of Alabama in Huntsville.
VHDL Discussion Subprograms
ECE 434 Advanced Digital System L11
VHDL Data Types Module F3.1.
Data Object By E. Thirumeni Department of Electronics
COE 202 Introduction to Verilog
EEL4712 Digital Design (VHDL Tutorial).
Presentation transcript:

ECE 434 Advanced Digital System L9 Electrical and Computer Engineering University of Western Ontario

Outline What we know What we do not know Design of Combinational and Sequential Networks VHDL description of combinational networks VHDL processes – description of sequential networks What we do not know How to use VHDL for design, simulation/verification, and synthesis 23/11/2018

Review: Compilation and Simulation of VHDL Code Compiler (Analyzer) – checks the VHDL source code does it conforms with VHDL syntax and semantic rules are references to libraries correct Intermediate form used by a simulator or by a synthesizer Elaboration create ports, allocate memory storage, create interconnections, ... establish mechanism for executing of VHDL processes 23/11/2018

Review: Transport Delay Transport delay must be explicitly specified I.e. keyword “TRANSPORT” must be used Signal will assume its new value after specified delay -- TRANSPORT delay example Output <= TRANSPORT NOT Input AFTER 10 ns; Input Output 0 5 10 15 20 25 30 35 The keyword TRANSPORT must be used to specify a transport delay. Transport delay is the simplest in that when it is specified, any change in an input signal value may result in a new value being assigned to the output signal after the specified propagation delay. Note that no restrictions are specified on input pulse widths. In this example, Output will be an inverted copy of Input delayed by the 10ns propagation delay regardless of the pulse widths seen on Input . 23/11/2018

Review: Inertial Delay Provides for specification propagation delay and input pulse width, i.e. ‘inertia’ of output: Inertial delay is default and REJECT is optional: target <= [REJECT time_expression] INERTIAL waveform; Output <= NOT Input AFTER 10 ns; -- Propagation delay and minimum pulse width are 10ns Input Output 0 5 10 15 20 25 30 35 The keyword INERTIAL may be used in the signal assignment statement to specify an inertial delay, or it may be left out because inertial delay is used by default in VHDL signal assignment statements which contain “after” clauses. If the optional REJECT construct is not used, the specified delay is then used as both the ‘inertia’ (i.e. minimum input pulse width requirement) and the propagation delay for the signal. Note that in the example above, pulses on Input narrower than 10ns are not observed on Output. 23/11/2018

Review: Inertial Delay (cont.) Example of gate with ‘inertia’ smaller than propagation delay e.g. Inverter with propagation delay of 10ns which suppresses pulses shorter than 5ns Note: the REJECT feature is new to VHDL 1076-1993 Output <= REJECT 5ns INERTIAL NOT Input AFTER 10ns; Input Output 0 5 10 15 20 25 30 35 The REJECT construct is a new feature to VHDL introduced in the VHDL 1076-1993 standard. The REJECT construct can only be used with the keyword INERTIAL to include a time parameter that specifies the input pulse width constraint. Prior to this, a description for such a gate would have needed the use of an intermediate signal with the appropriate inertial delay followed by an assignment of this intermediate signal’s value to the actual output via a transport delay. 23/11/2018

Review: Simulation Example 23/11/2018

Review: Modeling a Sequential Machine Mealy Machine for 8421 BCD to 8421 BCD + 3 bit serial converter How to model this in VHDL? 23/11/2018

Review: Behavioral VHDL Model Two processes: the first represents the combinational network; the second represents the state register 23/11/2018

Review: Dataflow VHDL Model 23/11/2018

Review: Structural Model Package bit_pack is a part of library BITLIB – includes gates, flip-flops, counters (See Appendix B for details) 23/11/2018

Problem #1 Using the labels, list the order in which the following signal assignments are evaluated if in2 changes from a '0' to a '1'. Assume in1 has been a '1' and in2 has been a '0' for a long time, and then at time t in2 changes from a '0' to a '1'. entity not_another_prob is port (in1, in2: in bit; a: out bit); end not_another_prob;   architecture oh_behave of not_another_prob is signal b, c, d, e, f: bit; begin L1: d <= not(in1); L2: c<= not(in2); L3: f <= (d and in2) ; L4: e <= (c and in1) ; L5: a <= not b; L6: b <= e or f; end oh_behave; 23/11/2018

Problem #2 Under what conditions do the two assignments below result in the same behavior? Different behavior? Draw waveforms to support your answers. out <= reject 5 ns inertial (not a) after 20 ns; out <= transport (not a) after 20 ns; 23/11/2018

How wait statements work? ... an alternative to a sensitivity list Note: a process cannot have both wait statement(s) and a sensitivity list Generic form of a process with wait statement(s) process begin sequential-statements wait statement wait-statement ... end process; How wait statements work? Execute seq. statement until a wait statement is encountered. Wait until the specified condition is satisfied. Then execute the next set of sequential statements until the next wait statement is encountered. ... When the end of the process is reached start over again at the beginning. 23/11/2018

Forms of Wait Statements wait on sensitivity-list; wait for time-expression; wait until boolean-expression; Wait on until one of the signals in the sensitivity list changes Wait for waits until the time specified by the time expression has elapsed What is this: wait for 0 ns; Wait until the boolean expression is evaluated whenever one of the signals in the expression changes, and the process continues execution when the expression evaluates to TRUE 23/11/2018

Using Wait Statements (1) 23/11/2018

Using Wait Statements (2) 23/11/2018

Variables What are they for: Local storage in processes, procedures, and functions Declaring variables variable list_of_variable_names : type_name [ := initial value ]; Variables must be declared within the process in which they are used and are local to the process Note: exception to this is SHARED variables 23/11/2018

Signals Signals must be declared outside a process Declaration form signal list_of_signal_names : type_name [ := initial value ]; Declared in an architecture can be used anywhere within that architecture 23/11/2018

Constants Declaration form constant constant_name : type_name := constant_value; constant delay1 : time := 5 ns; Constants declared at the start of an architecture can be used anywhere within that architecture Constants declared within a process are local to that process 23/11/2018

Variables vs. Signals Variable assignment statement variable_name := expression; expression is evaluated and the variable is instantaneously updated (no delay, not even delta delay) Signal assignment statement signal_name <= expression [after delay]; expression is evaluated and the signal is scheduled to change after delay; if no delay is specified the signal is scheduled to be updated after a delta delay 23/11/2018

Variables vs. Signals (cont’d) Process Using Variables Process Using Signals Sum = ? Sum = ? 23/11/2018

Predefined VHDL Types Variables, signals, and constants can have any one of the predefined VHDL types or they can have a user-defined type Predefined Types bit – {‘0’, ‘1’} boolean – {TRUE, FALSE} integer – [-231 - 1.. 231 – 1} real – floating point number in range –1.0E38 to +1.0E38 character – legal VHDL characters including lower- uppercase letters, digits, special characters, ... time – an integer with units fs, ps, ns, us, ms, sec, min, or hr 23/11/2018

User Defined Type Common user-defined type is enumerated type state_type is (S0, S1, S2, S3, S4, S5); signal state : state_type := S1; If no initialization, the default initialization is the leftmost element in the enumeration list (S0 in this example) VHDL is strongly typed language => signals and variables of different types cannot be mixed in the same assignment statement, and no automatic type conversion is performed 23/11/2018

Arrays Example General form ALT_WORD(0) – rightmost bit type SHORT_WORD is array (15 downto 0) of bit; signal DATA_WORD : SHORT_WORD; variable ALT_WORD : SHORT_WORD := “0101010101010101”; constant ONE_WORD : SHORT_WORD := (others => ‘1’); ALT_WORD(0) – rightmost bit ALT_WORD(5 downto 0) – low order 6 bits General form type arrayTypeName is array index_range of element_type; signal arrayName : arrayTypeName [:=InitialValues]; 23/11/2018

Arrays (cont’d) Multidimensional arrays Unconstrained array type type matrix4x3 is array (1 to 4, 1 to 3) of integer; variable matrixA: matrix4x3 := ((1,2,3), (4,5,6), (7,8,9), (10,11,12)); matrixA(3, 2) = ? Unconstrained array type type intvec is array (natural range<>) of integer; type matrix is array (natural range<>,natural range<>) of integer; range must be specified when the array object is declared signal intvec5 : intvec(1 to 5) := (3,2,6,8,1); 23/11/2018

Sequential Machine Model Using State Table 23/11/2018

Predefined Unconstrained Array Types Bit_vector, string constant A : bit_vector(0 to 5) := “10101”; -- (‘1’, ‘0’, ‘1’, ‘0’, ‘1’); Subtypes include a subset of the values specified by the type subtype SHORT_WORD is : bit_vector(15 to 0); POSITIVE, NATURAL – predefined subtypes of type integer 23/11/2018

VHDL Operators Binary logical operators: and or nand nor xor xnor Relational: = /= < <= > >= Shift: sll srl sla sra rol ror Adding: + - & (concatenation) Unary sign: + - Multiplying: * / mod rem Miscellaneous: not abs ** Class 7 has the highest precedence (applied first), followed by class 6, then class 5, etc 23/11/2018

Example of VHDL Operators 23/11/2018

Example of Shift Operators 23/11/2018

VHDL Functions Functions execute a sequential algorithm and return a single value to calling program A = “10010101” General form 23/11/2018

For Loops 23/11/2018

Add Function 23/11/2018

VHDL Procedures Facilitate decomposition of VHDL code into modules Procedures can return any number of values using output parameters General form procedure procedure_name (formal-parameter-list) is [declarations] begin Sequential-statements end procedure_name; procedure_name (actual-parameter-list); 23/11/2018

Procedure for Adding Bit_vectors 23/11/2018

Parameters for Subprogram Calls 23/11/2018

Packages and Libraries Provide a convenient way of referencing frequently used functions and components Package declaration Package body [optional] 23/11/2018

Library BITLIB – bit_pack package 23/11/2018

Library BITLIB – bit_pack package 23/11/2018

Library BITLIB – bit_pack package 23/11/2018

To Do Read Textbook chapters 2.6, 2.7, 2.8, 2.9, 2.10, 2.11 23/11/2018