ECE 434 Advanced Digital System L10

Slides:



Advertisements
Similar presentations
Chapter 11 Verilog HDL Application-Specific Integrated Circuits Michael John Sebastian Smith Addison Wesley, 1997.
Advertisements

VHDL ELEC 418 Advanced Digital Systems Dr. Ron Hayne Images Courtesy of Thomson Engineering.
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.
SubprogramsSubprograms. SubprogramsSubprograms ä Similar to subprograms found in other languages ä Allow repeatedly used code to be referenced multiple.
ELEN 468 Lecture 191 ELEN 468 Advanced Logic Design Lecture 19 VHDL.
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.
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.
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.
L13 – VHDL Language Elements. VHDL Language Elements  Elements needed for FPGA design Types  Basic Types  Resolved Types – special attributes of resolved.
Chapter 5 Introduction to VHDL. 2 Hardware Description Language A computer language used to design circuits with text-based descriptions of the circuits.
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.
Lecture #8 Page 1 Lecture #8 Agenda 1.VHDL : Operators 2.VHDL : Signal Assignments Announcements 1.HW #4 assigned ECE 4110– Sequential Logic Design.
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.
1 Introduction to Engineering Spring 2007 Lecture 18: Digital Tools 2.
Definition of the Programming Language CPRL
Introduction To VHDL 홍 원 의.
Subject Name: FUNDAMENTALS OF HDL Subject Code: 10EC45
Operators Assignment Operators Logical Operators Relational Operators
VHDL Basics.
Timing Model Start Simulation Delay Update Signals Execute Processes
Chapter 2. Introduction To VHDL
Behavioral Modeling in Verilog
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
CPE/EE 422/522 Advanced Logic Design L15
CHAPTER 10 Introduction to VHDL
332:437 Lecture 10 Verilog Language Details
OPERATORS and CONCURRENT STATEMENTS
ECE 434 Advanced Digital System L9
332:437 Lecture 10 Verilog Language Details
CPE 528: Lecture #4 Department of Electrical and Computer Engineering University of Alabama in Huntsville.
CPE/EE 422/522 Advanced Logic Design L08
The start of a grand tour of the language.
CPE/EE 422/522 Advanced Logic Design L07
CPE/EE 422/522 Advanced Logic Design L14
CPE/EE 422/522 Advanced Logic Design L11
COE 202 Introduction to Verilog
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
332:437 Lecture 10 Verilog Language Details
Step 2 in behavioral modeling. Use of procedures.
ECE 434 Advanced Digital System L11
VHDL Data Types Module F3.1.
Step 2 in behavioral modeling. Use of procedures.
COE 202 Introduction to Verilog
EEL4712 Digital Design (VHDL Tutorial).
Presentation transcript:

ECE 434 Advanced Digital System L10 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 Wait statements Variables, signals, constants What we do not know 06/12/2018

Review: Wait Statements ... 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. 06/12/2018

Review: 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 06/12/2018

Review: 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 06/12/2018

Review: Variables vs. Signals (cont’d) Process Using Variables Process Using Signals Sum = ? Sum = ? 06/12/2018

Review: 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 06/12/2018

Review: 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 06/12/2018

Review: 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]; 06/12/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); 06/12/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 06/12/2018

Review: 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 06/12/2018

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

For Loops Should not be explicitly declared Can be used inside the loop, but cannot be changed 06/12/2018

Add Function Z <= add4(X, not Y, ‘1’); 06/12/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); 06/12/2018

Procedure for Adding Bit_vectors 06/12/2018

Parameters for Subprogram Calls 06/12/2018

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

Accessing Library Components To access the BITLIB To use entire bit_pack package To use a specific component library BITLIB; use BITLIB.bit_pack.all; use BITLIB.bit_pack.Nand2; 06/12/2018

Library BITLIB – bit_pack package 06/12/2018

Library BITLIB – bit_pack package 06/12/2018

Library BITLIB – bit_pack package 06/12/2018

VHDL Model for a 74163 Counter 74163 – 4-bit fully synchronous binary counter Counter operations Generate a Cout in state 15 if T=1 Cout = Q3Q2Q1Q0T 06/12/2018

VHDL Model for a 74163 Counter 06/12/2018

Cascaded Counters 06/12/2018

Cascaded Counters (cont’d) 06/12/2018

To Do Read Textbook chapters 2.9, 2.10, 2.11, 2.12 06/12/2018

Networks for Arithmetic Operations Serial Adder with Accumulator 06/12/2018

Networks for Arithmetic Operations Serial Adder with Accumulator 06/12/2018

State Graphs for Control Networks Use variable names instead of 0s and 1s E.g., XiXj/ZpZq if Xi and Xj inputs are 1, the outputs Zp and Zq are 1 (all other outputs are 0s) E.g., X = X1X2X3X4, Z = Z1Z2Z3Z4 X1X4’/Z2Z3 == 1 - - 0 / 0 1 1 0 06/12/2018

Constraints on Input Labels Assume: I – input expression => we traverse the arc when I=1 Assures that at most one input label can be 1 at any given time Assures that at least one input label will be 1 at any given time 1 + 2: Exactly one label will be 1 => the next state will be uniquely defined for every input combination 06/12/2018

Constraints on Input Labels (cont’d) 06/12/2018