Outline. CPE/EE 422/522 Advanced Logic Design L05. Review: General Model of Moore Sequential Machine. Review: Mealy Sequential Networks.

Similar documents
Outline CPE 626. Advanced VLSI Design. Lecture 3: VHDL Recapitulation. Intro to VHDL. Intro to VHDL. Entity-Architecture Pair

Outline. CPE/EE 422/522 Advanced Logic Design L07. Review: JK Flip-Flop Model. Review: VHDL Program Structure. Review: VHDL Models for a MUX

Hardware Description Language VHDL (1) Introduction

Introduction to VHDL Lecture D

Two HDLs used today VHDL. Why VHDL? Introduction to Structured VLSI Design

VHDL. VHDL History. Why VHDL? Introduction to Structured VLSI Design. Very High Speed Integrated Circuit (VHSIC) Hardware Description Language

Abi Farsoni, Department of Nuclear Engineering and Radiation Health Physics, Oregon State University

EEL 4783: Hardware/Software Co-design with FPGAs

EITF35: Introduction to Structured VLSI Design

Control and Datapath 8

Introduction to VHDL #3

CPE/EE 422/522. Chapter 8 - Additional Topics in VHDL. Dr. Rhonda Kay Gaede UAH. 8.1 Attributes - Signal Attributes that return a value

Lecture 3: Modeling in VHDL. EE 3610 Digital Systems

Multi-valued Logic. Standard Logic IEEE 1164 Type std_ulogic is ( U, uninitialized

Outline CPE 626. Advanced VLSI Design. Lecture 4: VHDL Recapitulation (Part 2) Signals. Variables. Constants. Variables vs.

VHDL simulation and synthesis

VHDL Testbench. Test Bench Syntax. VHDL Testbench Tutorial 1. Contents

Lecture 12 VHDL Synthesis

Part 4: VHDL for sequential circuits. Introduction to Modeling and Verification of Digital Systems. Memory elements. Sequential circuits

[VARIABLE declaration] BEGIN. sequential statements

EEL 4712 Digital Design Test 1 Spring Semester 2007

Synthesis from VHDL. Krzysztof Kuchcinski Department of Computer Science Lund Institute of Technology Sweden

DIGITAL LOGIC WITH VHDL (Fall 2013) Unit 6

Lecture 7. Standard ICs FPGA (Field Programmable Gate Array) VHDL (Very-high-speed integrated circuits. Hardware Description Language)

Introduction to VHDL. Main language concepts

5. VHDL - Introduction - 5. VHDL - Design flow - 5. VHDL - Entities and Architectures (1) - 5. VHDL - Entities and Architectures (2) -

EE 459/500 HDL Based Digital Design with Programmable Logic. Lecture 6 Combinational and sequential circuits

Lattice VHDL Training

VHDL for Synthesis. Course Description. Course Duration. Goals

The University of Alabama in Huntsville ECE Department CPE Midterm Exam February 26, 2003

CCE 3202 Advanced Digital System Design

Lab 3: Standard Combinational Components

DIGITAL LOGIC DESIGN VHDL Coding for FPGAs Unit 6

DESCRIPTION OF DIGITAL CIRCUITS USING VHDL

ECE 3401 Lecture 10. More on VHDL

The University of Alabama in Huntsville ECE Department CPE Midterm Exam Solution Spring 2016

Hardware Design Environments. Dr. Mahdi Abbasi Computer Engineering Department Bu-Ali Sina University

UNIT I Introduction to VHDL VHDL: - V -VHSIC, H - Hardware, D - Description, L Language Fundamental section of a basic VHDL code Library :

CSE 260 Introduction to Digital Logic and Computer Design. Exam 1. Your name 2/13/2014

Chapter 6 Combinational-Circuit Building Blocks

Midterm Exam Thursday, October 24, :00--2:15PM (75 minutes)

EL 310 Hardware Description Languages Midterm

EE 459/500 HDL Based Digital Design with Programmable Logic. Lecture 4 Introduction to VHDL

The block diagram representation is given below: The output equation of a 2x1 multiplexer is given below:

Sequential Statement

Concurrent Signal Assignment Statements (CSAs)

Timing in synchronous systems

Computer-Aided Digital System Design VHDL

The University of Alabama in Huntsville Electrical and Computer Engineering CPE/EE 422/522 Spring 2005 Homework #6 Solution

ECE 545 Lecture 6. Behavioral Modeling of Sequential-Circuit Building Blocks. George Mason University

VHDL: RTL Synthesis Basics. 1 of 59

VHDL. Chapter 1 Introduction to VHDL. Course Objectives Affected. Outline

310/ ICTP-INFN Advanced Tranining Course on FPGA and VHDL for Hardware Simulation and Synthesis 27 November - 22 December 2006

IT T35 Digital system desigm y - ii /s - iii

CprE 583 Reconfigurable Computing

Fundamental Design Concepts. Fundamental Concepts. Modeling Domains. Basic Definitions. New terminology and overloaded use of common words

CCE 3202 Advanced Digital System Design

CS/EE Homework 7 Solutions

Sequential Logic - Module 5

The process. Sensitivity lists

Introduction to VHDL. Yvonne Avilés Colaboration: Irvin Ortiz Flores Rapid System Prototyping Laboratory (RASP) University of Puerto Rico at Mayaguez

Advanced Training Course on FPGA Design and VHDL for Hardware Simulation and Synthesis. 26 October - 20 November, 2009

JUNE, JULY 2013 Fundamentals of HDL (10EC45) PART A

Lecture 2 Hardware Description Language (HDL): VHSIC HDL (VHDL)

C-Based Hardware Design

CMPT 250: Computer Architecture. Using LogicWorks 5. Tutorial Part 1. Somsubhra Sharangi

IE1204 Digital Design L7: Combinational circuits, Introduction to VHDL

Digital Systems Design

VHDL And Synthesis Review

Logic and Computer Design Fundamentals VHDL. Part 1 Chapter 4 Basics and Constructs

VHDL. Chapter 7. Behavioral Modeling. Outline. Behavioral Modeling. Process Statement

Assignment. Last time. Last time. ECE 4514 Digital Design II. Back to the big picture. Back to the big picture

CSCI Lab 3. VHDL Syntax. Due: Tuesday, week6 Submit to: \\fs2\csci250\lab-3\

FSM Components. FSM Description. HDL Coding Methods. Chapter 7: HDL Coding Techniques

ECOM 4311 Digital Systems Design

ENGIN 241 Digital Systems with Lab

(ii) Simplify and implement the following SOP function using NOR gates:

VHDL Modeling Behavior from Synthesis Perspective -Part B - EL 310 Erkay Savaş Sabancı University

A bird s eye view on VHDL!

Outline of this Introduction to VHDL

Digital Systems Design

ECE 448 Lecture 4. Sequential-Circuit Building Blocks. Mixing Description Styles

CS211 Digital Systems/Lab. Introduction to VHDL. Hyotaek Shim, Computer Architecture Laboratory

ECE U530 Digital Hardware Synthesis. Programming Assignments

Hardware Synthesis. References

ACS College of Engineering. Department of Biomedical Engineering. Logic Design Lab pre lab questions ( ) Cycle-1

Hardware Description Languages. Modeling Complex Systems

Mid-Term Exam Solutions

!"#$%&&"'(')"*+"%,%-".#"'/"'.001$$"

Hardware Description Languages (HDLs) Verilog

SRI SUKHMANI INSTITUTE OF ENGINEERING AND TECHNOLOGY, DERA BASSI (MOHALI)

Very High Speed Integrated Circuit Har dware Description Language

The University of Alabama in Huntsville ECE Department CPE Final Exam Solution Spring 2016

VHDL 2 Combinational Logic Circuits. Reference: Roth/John Text: Chapter 2

ECE4401 / CSE3350 ECE280 / CSE280 Digital Design Laboratory

INSTITUTE OF AERONAUTICAL ENGINEERING Dundigal, Hyderabad ELECTRONICS AND COMMUNICATIONS ENGINEERING

1. What is y-chart? ans: The y- chart consists of three domains:- behavioral, structural and geometrical.

COE 405, Term 062. Design & Modeling of Digital Systems. HW# 1 Solution. Due date: Wednesday, March. 14

VHDL Basics. Mehdi Modarressi. Department of Electrical and Computer Engineering, University of Tehran. ECE381(CAD), Lecture 4:

VHDL. ELEC 418 Advanced Digital Systems Dr. Ron Hayne. Images Courtesy of Cengage Learning

Transcription:

Outline CPE/EE 422/522 Advanced Logic Design L05 Electrical and Computer Engineering University of Alabama in Huntsville What we know Combinational Networks Sequential Networks: Basic Building Blocks, Mealy & Moore Machines, Max Frequency, Setup & Hold Times, Synchronous Design What we do not know Equivalent states and reduction of state tables Hardware Description Languages 11/06/200 UAH-CPE/EE 422/522 AM 2 Review: Mealy Sequential Networks General model of Mealy Sequential Network Review: General Model of Moore Sequential Machine s depend only on present state! Combinational Network s(z) s(x) Combinational Network Next State State Register State(Q) Clock (1) X inputs are changed to a new value (2) After a delay, the Z outputs and next state appear at the output of CM () The next state is clocked into the state register and the state changes X = x 1 x 2... x n + Q ( t ) = G ( X ( t ), Q ( t )) Q = Q 1 Q 2... Q k Z ( t ) = F( Q ( t )) Z = z 1 z 2... z m 11/06/200 UAH-CPE/EE 422/522 AM 11/06/200 UAH-CPE/EE 422/522 AM 4 Intro to VHDL Technology trends 1 billion transistor chip running at 20 GHz in 2007 Need for Hardware Description Languages Systems become more complex Design at the gate and flip-flop level becomes very tedious and time consuming HDLs allow Design and debugging at a higher level before conversion to the gate and flip-flop level Tools for synthesis do the conversion VHDL, Verilog VHDL VHSIC Hardware Description Language 11/06/200 UAH-CPE/EE 422/522 AM 5 Intro to VHDL Developed originally by DARPA for specifying digital systems International IEEE standard (IEEE 1076-199) Hardware Description, Simulation, Synthesis Provides a mechanism for digital design and reusable design documentation Support different description levels Structural (specifying interconnections of the gates), Dataflow (specifying logic equations), and Behavioral (specifying behavior) Top-down, Technology Dependent 11/06/200 UAH-CPE/EE 422/522 AM 6 1

VHDL Description of Combinational Networks Entity-Architecture Pair Full Adder Example 11/06/200 UAH-CPE/EE 422/522 AM 7 11/06/200 UAH-CPE/EE 422/522 AM 8 VHDL Program Structure 4-bit Adder 11/06/200 UAH-CPE/EE 422/522 AM 9 11/06/200 UAH-CPE/EE 422/522 AM 10 4-bit Adder (cont d) 4-bit Adder - Simulation 11/06/200 UAH-CPE/EE 422/522 AM 11 11/06/200 UAH-CPE/EE 422/522 AM 12 2

Modeling Flip-Flops Using VHDL Processes General form of process Concurrent Statements vs. Process A, B, C, D are integers A=1, B=2, C=, D=0 D changes to 4 at time 10 Whenever one of the signals in the sensitivity list changes, the sequential statements are executed in sequence one time time delta A B C D 0 +0 0 1 2 0 10 +0 1 2 4 (stat. exe.) 10 +1 1 2 4 4 (stat. 2 exe.) 10 +2 1 4 4 4 (stat. 1 exe.) 10 + 4 4 4 4 (no exec.) Simulation Results 11/06/200 UAH-CPE/EE 422/522 AM 1 11/06/200 UAH-CPE/EE 422/522 AM 14 D Flip-flop Model JK Flip-Flop Model Bit values are enclosed in single quotes 11/06/200 UAH-CPE/EE 422/522 AM 15 11/06/200 UAH-CPE/EE 422/522 AM 16 JK Flip-Flop Model Using Nested IFsand ELSEIFs 11/06/200 UAH-CPE/EE 422/522 AM 17 11/06/200 UAH-CPE/EE 422/522 AM 18

VHDL Models for a MUX MUX Models (1) If a MUX model is used inside a process, the MUX can be modeled using a CASE statement (cannot use a concurrent statement): Sel represents the integer equivalent of a 2-bit binary number with bits A and B library IEEE; use IEEE.std_logic_1164.all; use IEEE.std_logic_unsigned.all; entity SELECTOR is port ( A : in std_logic_vector(15 downto 0); SEL : in std_logic_vector( downto 0); Y : out std_logic); end SELECTOR; architecture RTL1 of SELECTOR is p0 : process (A, SEL) if (SEL = "0000") then Y <= A(0); elsif (SEL = "0001") then Y <= A(1); elsif (SEL = "0010") then Y <= A(2); elsif (SEL = "0011") then Y <= A(); elsif (SEL = "0100") then Y <= A(4); elsif (SEL = "0101") then Y <= A(5); elsif (SEL = "0110") then Y <= A(6); elsif (SEL = "0111") then Y <= A(7); elsif (SEL = "1000") then Y <= A(8); elsif (SEL = "1001") then Y <= A(9); elsif (SEL = "1010") then Y <= A(10); elsif (SEL = "1011") then Y <= A(11); elsif (SEL = "1100") then Y <= A(12); elsif (SEL = "1101") then Y <= A(1); elsif (SEL = "1110") then Y <= A(14); else Y <= A(15); end if; end process; end RTL1; 11/06/200 UAH-CPE/EE 422/522 AM 19 11/06/200 UAH-CPE/EE 422/522 AM 20 MUX Models (2) MUX Models () library IEEE; use IEEE.std_logic_1164.all; use IEEE.std_logic_unsigned.all; entity SELECTOR is port ( A : in std_logic_vector(15 downto 0); SEL : in std_logic_vector( downto 0); Y : out std_logic); end SELECTOR; architecture RTL of SELECTOR is with SEL select Y <= A(0) when "0000", A(1) when "0001", A(2) when "0010", A() when "0011", A(4) when "0100", A(5) when "0101", A(6) when "0110", A(7) when "0111", A(8) when "1000", A(9) when "1001", A(10) when "1010", A(11) when "1011", A(12) when "1100", A(1) when "1101", A(14) when "1110", A(15) when others; end RTL; library IEEE; use IEEE.std_logic_1164.all; use IEEE.std_logic_unsigned.all; entity SELECTOR is port ( A : in std_logic_vector(15 downto 0); SEL : in std_logic_vector( downto 0); Y : out std_logic); end SELECTOR; architecture RTL2 of SELECTOR is p1 : process (A, SEL) case SEL is when "0000" => Y <= A(0); when "0001" => Y <= A(1); when "0010" => Y <= A(2); when "0011" => Y <= A(); when "0100" => Y <= A(4); when "0101" => Y <= A(5); when "0110" => Y <= A(6); when "0111" => Y <= A(7); when "1000" => Y <= A(8); when "1001" => Y <= A(9); when "1010" => Y <= A(10); when "1011" => Y <= A(11); when "1100" => Y <= A(12); when "1101" => Y <= A(1); when "1110" => Y <= A(14); when others => Y <= A(15); end case; end process; end RTL2; 11/06/200 UAH-CPE/EE 422/522 AM 21 11/06/200 UAH-CPE/EE 422/522 AM 22 MUX Models (4) Compilation and Simulation of VHDL Code library IEEE; use IEEE.std_logic_1164.all; use IEEE.std_logic_unsigned.all; entity SELECTOR is port ( A : in std_logic_vector(15 downto 0); SEL : in std_logic_vector( downto 0); Y : out std_logic); end SELECTOR; architecture RTL4 of SELECTOR is Y <= A( conv_integer(sel)); end RTL4; 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 11/06/200 UAH-CPE/EE 422/522 AM 2 11/06/200 UAH-CPE/EE 422/522 AM 24 4

Timing Model VHDL uses the following simulation cycle to model the stimulus and response nature of digital hardware Start Simulation Delay Delay Types All VHDL signal assignment statements prescribe an amount of time that must transpire before the signal assumes its new value This prescribed delay can be in one of three forms: Transport -- prescribes propagation delay only Inertial -- prescribes propagation delay and minimum input pulse width Delta -- the default if no delay time is explicitly specified Update Signals Execute Processes delay End Simulation 11/06/200 UAH-CPE/EE 422/522 AM 25 11/06/200 UAH-CPE/EE 422/522 AM 26 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 <= TRANSPORT NOT AFTER 10 ns; Inertial Delay Provides for specification propagation delay and input pulse width, i.e. inertia of output: target <= [REJECT time_expression] INERTIAL waveform; Inertial delay is default and REJECT is optional: <= NOT AFTER 10 ns; -- Propagation delay and minimum pulse width are 10ns 0 5 10 15 20 25 0 5 11/06/200 UAH-CPE/EE 422/522 AM 27 0 5 10 15 20 25 0 5 11/06/200 UAH-CPE/EE 422/522 AM 28 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 <= REJECT 5ns INERTIAL NOT AFTER 10ns; 0 5 10 15 20 25 0 5 Note: the REJECT feature is new to VHDL 1076-199 11/06/200 UAH-CPE/EE 422/522 AM 29 Delta Delay Default signal assignment propagation delay if no delay is explicitly prescribed VHDL signal assignments do not take place immediately Delta is an infinitesimal VHDL time unit so that all signal assignments can result in signals assuming their values at a future time E.g. <= NOT ; -- assumes new value in one delta cycle Supports a model of concurrent VHDL process execution Order in which processes are executed by simulator does not affect simulation output 11/06/200 UAH-CPE/EE 422/522 AM 0 5

Simulation Example 11/06/200 UAH-CPE/EE 422/522 AM 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'. Problem #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 end oh_behave; signal b, c, d, e, f: bit; L1: d <= not(in1); L2: c<= not(in2); L: f <= (d and in2) ; L4: e <= (c and in1) ; L5: a <= not b; L6: b <= e or f; 11/06/200 UAH-CPE/EE 422/522 AM 2 Problem #2 Under what conditions do the two assignments below result in the same behavior? Different behavior? Draw waveforms to support your answers. Modeling a Sequential Machine Mealy Machine for 8421 BCD to 8421 BCD + bit serial converter out <= reject 5 ns inertial (not a) after 20 ns; out <= transport (not a) after 20 ns; How to model this in VHDL? 11/06/200 UAH-CPE/EE 422/522 AM 11/06/200 UAH-CPE/EE 422/522 AM 4 Behavioral VHDL Model Simulation of the VHDL Model Simulation command file: Waveforms: Two processes: the first represents the combinational network; the second represents the state register 11/06/200 UAH-CPE/EE 422/522 AM 5 11/06/200 UAH-CPE/EE 422/522 AM 6 6

Dataflow VHDL Model Structural Model + Q ( t ) = Q 1 Q ( t ) = Q 2 + + Q ( t ) = Q 1 Q 2 Q Z = X ' Q ' + XQ 2 1 + X ' Q Q ' + X ' Q ' Q ' 1 1 2 Package bit_pack is a part of library BITLIB includes gates, flip-flops, counters (See Appendix B for details) 11/06/200 UAH-CPE/EE 422/522 AM 7 11/06/200 UAH-CPE/EE 422/522 AM 8 Simulation of the Structural Model Simulation command file: Waveforms: 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 sequential-statements wait statement sequential-statements 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 ning. 11/06/200 UAH-CPE/EE 422/522 AM 9 11/06/200 UAH-CPE/EE 422/522 AM 40 Forms of Wait Statements Using Wait Statements (1) 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 booleanexpression is evaluated whenever one of the signals in the expression changes, and the process continues execution when the expression evaluates to TRUE 11/06/200 UAH-CPE/EE 422/522 AM 41 11/06/200 UAH-CPE/EE 422/522 AM 42 7

Using Wait Statements (2) To Do Read Textbook chapters 2.1, 2.2 11/06/200 UAH-CPE/EE 422/522 AM 4 11/06/200 UAH-CPE/EE 422/522 AM 44 8