EECS150 - Digital Design Lecture 10 - Interfacing. Recap and Topics

Similar documents
Outline. EECS150 - Digital Design Lecture 27 - Asynchronous Sequential Circuits. Cross-coupled NOR gates. Asynchronous State Transition Diagram

EECS150 - Digital Design Lecture 15 Finite State Machines. Announcements

EECS150 - Digital Design Lecture 12 - Video Interfacing. Recap and Outline

EE178 Spring 2018 Lecture Module 5. Eric Crabill

EITF35: Introduction to Structured VLSI Design

EE178 Lecture Module 4. Eric Crabill SJSU / Xilinx Fall 2005

EECS150 - Digital Design Lecture 19 - Finite State Machines Revisited

Metastability Analysis of Synchronizer

EECS150 - Digital Design Lecture 3 Synchronous Digital Systems Review. Announcements

Chapter 2. Digital Circuits

More on Flip-Flops Digital Design and Computer Architecture: ARM Edition 2015 Chapter 3 <98> 98

EECS150 - Digital Design Lecture 17 - Circuit Timing. Performance, Cost, Power

Asynchronous inputs. 9 - Metastability and Clock Recovery. A simple synchronizer. Only one synchronizer per input

EEC 118 Lecture #9: Sequential Logic. Rajeevan Amirtharajah University of California, Davis Jeff Parkhurst Intel Corporation

Lec 24 Sequential Logic Revisited Sequential Circuit Design and Timing

Synchronization in Asynchronously Communicating Digital Systems

EECS150 - Digital Design Lecture 3 - Timing

Asynchronous (Ripple) Counters

Synchronous Sequential Design

Digital Electronics II 2016 Imperial College London Page 1 of 8

CSE115: Digital Design Lecture 23: Latches & Flip-Flops

Clock Domain Crossing. Presented by Abramov B. 1

EECS 373 Design of Microprocessor-Based Systems

VARIABLE FREQUENCY CLOCKING HARDWARE

CHAPTER 6 DESIGN OF HIGH SPEED COUNTER USING PIPELINING


Figure 1 shows a simple implementation of a clock switch, using an AND-OR type multiplexer logic.

Logic Devices for Interfacing, The 8085 MPU Lecture 4

Universal Asynchronous Receiver- Transmitter (UART)

DIGITAL ELECTRONICS MCQs

Sequential Circuit Design: Principle

BUSES IN COMPUTER ARCHITECTURE

11. Sequential Elements

ECEN454 Digital Integrated Circuit Design. Sequential Circuits. Sequencing. Output depends on current inputs

Chapter 6. Flip-Flops and Simple Flip-Flop Applications

FSM Cookbook. 1. Introduction. 2. What Functional Information Must be Modeled

DEDICATED TO EMBEDDED SOLUTIONS

EECS150 - Digital Design Lecture 2 - CMOS

EE241 - Spring 2005 Advanced Digital Integrated Circuits

FIFO Memories: Solution to Reduce FIFO Metastability

Chapter 5 Flip-Flops and Related Devices

EECS150 - Digital Design Lecture 18 - Circuit Timing (2) In General...

CS8803: Advanced Digital Design for Embedded Hardware

(12) United States Patent (10) Patent No.: US 8,707,080 B1

Clock and Asynchronous Signals

Why FPGAs? FPGA Overview. Why FPGAs?

INC 253 Digital and electronics laboratory I

DEPARTMENT OF ELECTRICAL &ELECTRONICS ENGINEERING DIGITAL DESIGN

Introduction. NAND Gate Latch. Digital Logic Design 1 FLIP-FLOP. Digital Logic Design 1

EECS150 - Digital Design Lecture 3 - Timing

CS61C : Machine Structures

FPGA Design with VHDL

Sequential logic. Circuits with feedback. How to control feedback? Sequential circuits. Timing methodologies. Basic registers

FPGA TechNote: Asynchronous signals and Metastability

CPS311 Lecture: Sequential Circuits

Logic Design. Flip Flops, Registers and Counters

Sequential Circuit Design: Part 1

Flip-Flops and Related Devices. Wen-Hung Liao, Ph.D. 4/11/2001

EECS 373 Design of Microprocessor-Based Systems

DIGITAL SYSTEM FUNDAMENTALS (ECE421) DIGITAL ELECTRONICS FUNDAMENTAL (ECE422) LATCHES and FLIP-FLOPS

CS3350B Computer Architecture Winter 2015

Counter dan Register

Good afternoon! My name is Swetha Mettala Gilla you can call me Swetha.

Registers. Unit 12 Registers and Counters. Registers (D Flip-Flop based) Register Transfers (example not out of text) Accumulator Registers

Chapter 4: One-Shots, Counters, and Clocks

The basic logic gates are the inverter (or NOT gate), the AND gate, the OR gate and the exclusive-or gate (XOR). If you put an inverter in front of

Measurements of metastability in MUTEX on an FPGA

problem maximum score 1 28pts 2 10pts 3 10pts 4 15pts 5 14pts 6 12pts 7 11pts total 100pts

VLSI Clock Domain Crossing

Go BEARS~ What are Machine Structures? Lecture #15 Intro to Synchronous Digital Systems, State Elements I C

T 2 : WR = 0, AD 7 -AD 0 (μp Internal Reg.) T 3 : WR = 1,, M(AB) AD 7 -AD 0 or BDB

CS 110 Computer Architecture. Finite State Machines, Functional Units. Instructor: Sören Schwertfeger.

EECS150 - Digital Design Lecture 13 - Project Description, Part 3 of? Project Overview

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

CHAPTER1: Digital Logic Circuits

Digital Fundamentals: A Systems Approach

Experiment 8 Introduction to Latches and Flip-Flops and registers

data and is used in digital networks and storage devices. CRC s are easy to implement in binary

Logic and Computer Design Fundamentals. Chapter 7. Registers and Counters

Advanced Devices. Registers Counters Multiplexers Decoders Adders. CSC258 Lecture Slides Steve Engels, 2006 Slide 1 of 20

A Low Power Delay Buffer Using Gated Driver Tree

Glitches/hazards and how to avoid them. What to do when the state machine doesn t fit!

Chapter 9. Timing Design. (Based on Chapter 7 and Chapter 8 of Wakerly)

Chapter 3 Unit Combinational

VTU NOTES QUESTION PAPERS NEWS RESULTS FORUMS Registers

CHAPTER 6 ASYNCHRONOUS QUASI DELAY INSENSITIVE TEMPLATES (QDI) BASED VITERBI DECODER

FPGA Laboratory Assignment 4. Due Date: 06/11/2012

CMSC 313 Preview Slides

Clock Generator 82C84A

Software Engineering 2DA4. Slides 9: Asynchronous Sequential Circuits

Sequential Circuit Design: Part 1

6.S084 Tutorial Problems L05 Sequential Circuits

NH 67, Karur Trichy Highways, Puliyur C.F, Karur District UNIT-III SEQUENTIAL CIRCUITS

Gated Driver Tree Based Power Optimized Multi-Bit Flip-Flops

Lecture 11: Sequential Circuit Design

L4: Sequential Building Blocks (Flip-flops, Latches and Registers)

Lecture-47 INTEL 8085A INTERRUPT STRUCTURE

Lecture 13: Clock and Synchronization. TIE Logic Synthesis Arto Perttula Tampere University of Technology Spring 2017

Logic Analysis Basics

Logic Analysis Basics

Transcription:

EECS150 - Digital Design Lecture 10 - Interfacing Oct. 1, 2013 Prof. Ronald Fearing Electrical Engineering and Computer Sciences University of California, Berkeley (slides courtesy of Prof. John Wawrzynek) http://www-inst.eecs.berkeley.edu/~cs150 1 Recap and Topics add 1 Thu 9/29: pipelining and parallelism Today How do components (modules) communicate? Synchronizing FIFO 2 1

Synchronous Data Transfer In synchronous systems, the clock signal is used to coordinate the movement of data around the system. Take for example, transferring from module to module: By design, the clock period is sufficiently long to accommodate wire delay and time to get the data into the receiver. Assumes: sender is ready to send data on each cycle & receiver is ready to receive data on each cycle What if the communication is sporadic? Fall 2013 EECS150 Lec10-interfacing Page 3 Data Transfer with Control Sender Dout valid Receiver ready Din clock? After checking to see if the receiver is ready to receive, the sender asserts the valid signal to indicate that the data lines hold data for transferring As with synchronous transfer, the sender assumes that the transfer happens successfully Design constraint: the ready signal needs to be stable early enough in the cycle to allow the sender to respond with data and the valid signal before set-up time of receiver. Can we pipeline the control? Fall 2013 EECS150 Lec10-interfacing Page 4 2

Communicating Across Clock Boundaries Many synchronous systems need to interface to asynchronous input signals: Consider a computer system running at some clock frequency, say 1GHz with: Interrupts from I/O devices, keystrokes, etc. Data transfers from devices with their own clocks Ethernet has its own 100MHz clock PCI bus transfers, 66MHz standard clock. These signals could have no known timing relationship with the system clock of the CPU. 5 Synchronizer Circuit For a single asynchronous input, we use a simple flip-flop to bring the external input signal into the timing domain of the system clock: what if async input went to FSM? The D flip-flop samples the asynchronous input at each cycle and produces a synchronous output that meets the setup time of the next stage. 6 3

Synchronizer Circuit It is essential for asynchronous inputs to be synchronized at only one place. Two flip-flops may not receive the clock and input signals at precisely the same time (clock and data skew). When the asynchronous data changes near the clock edge, one flip-flop may sample input as 1 and the other as 0. 7 Synchronizer Circuit Single point of synchronization is even more important when input goes to a combinational logic block (ex. FSM) The CL block can accidentally hide the fact that the signal is synchronized at multiple points. The CL magnifies the chance of the multiple points of synchronization seeing different values. Sounds simple, right? 8 4

Synchronizer Failure & Metastability We think of flip-flops having only two stable states - but all have a third metastable state halfway between 0 and 1. When the setup and hold times of a flipflop are not met, the flip-flop could be put into the metastable state. Noise will be amplified and push the flipflop one way or other. However, in theory, the time to transition to a legal state is unbounded. Does this really happen? The probability is low, but the number of trials is high! WB 9 Synchronizer Failure & Metastability If the system uses a synchronizer output while the output is still in the metastable state synchronizer failure. Initial versions of several commercial ICs have suffered from metastability problems - effectively synchronization failure: AMD9513 system timing controller AMD9519 interrupt controller Zilog Z-80 Serial I/O interface Intel 8048 microprocessor AMD 29000 microprocessor To avoid synchronizer failure wait long enough before using a synchronizer s output. Long enough, according to Wakerly, is so that the mean time between synchronizer failures is several orders of magnitude longer than the designer s expected length of employment! In practice all we can do is reduce the probability of failure to a vanishing small value. 10 5

Reliable Synchronizer Design The probability that a flip-flop stays in the metastable state decreases exponentially with time. Therefore, any scheme that delays using the signal can be used to decrease the probability of failure. In practice, delaying the signal by a cycle is usually sufficient: WB If the clock period is greater than metastability resolution time plus FF2 setup time, FF2 gets a synchronized version of ASYNCIN. Multi-cycle synchronizers (using counters or more cascaded flip-flops) are even better but often overkill. 11 First-in-first-out (FIFO) Memory Used to implement queues. These find common use in computers and communication circuits. Generally, used to decouple actions of producer and consumer: stating state after write d after read c c d c b a b a b Producer can perform many writes without consumer performing any reads (or vis versa). However, because of finite buffer size, on average, need equal number of reads and writes. Typical uses: interfacing I/O devices. Example network interface. Data bursts from network, then processor bursts to memory buffer (or reads one word at a time from interface). Operations not synchronized. Example: Audio output. Processor produces output samples in bursts (during process swap-in time). Audio DAC clocks it out at constant sample rate. 12 6

FIFO Interfaces D IN WE FULL EMPTY RE D OUT RST HALF FULL FIFO CLK After write or read operation, FULL and EMPTY indicate status of buffer. Used by external logic to control own reading from or writing to the buffer. FIFO resets to EMPTY state. HALF FULL (or other indicator of partial fullness) is optional. Address pointers are used internally to keep next write position and next read position into a dual-port memory. write ptr If pointers equal after write FULL: write ptr If pointers equal after read EMPTY: write ptr read ptr read ptr read ptr 13 Decoupled Communication Sender full FIFO empty Receiver Dout Din WE RE Allow sender and receiver to transfer data independently Assumes, on average, equal number of sends and receives FIFO buffer must be large enough to accommodate instantaneous difference in send and receive rate Fall 2013 EECS150 Lec10-interfacing Page 14 7

Xilinx Virtex5 FIFOs Virtex5 BlockRAMS include dedicated circuits for FIFOs (details in User Guide (ug190)). Takes advantage of separate dual ports and independent ports clocks. Often used for crossing clock boundaries. 15 Xilinx Virtex FIFO Clock domain 1 Clock domain 2 Virtex5HDL p. 41 16 8

Purely Asynchronous Circuits Many researchers (and a few industrial designers) have proposed a variety of circuit design methodologies that eliminate the need for a globally distributed clock. They cite a variety of important potential advantages over synchronous systems. To date, these attempts have remained mainly in Universities. A few commercial asynchronous chips/systems have been build. Sometimes, asynchronous blocks sometimes appear inside otherwise synchronous systems. Asynchronous techniques have long been employed in DRAM and other memory chips for generation internal control without external clocks. (Precharge/sense-amplifier timing based on address line changes. In GALS (globally asynchronous locally synchronous) systems, independently synchronous islands communicate asynchronously. 17 Delay Insensitive (self-timed transfer) Request/acknowledge handshake signal pair used to coordinate data transfer. Hello, here s some data You re welcome WB Thanks, I got it See you later 4-cycle ( return-to-zero ) signaling Note, transfer is insensitive to any delay in sending and receiving. Fall 2013 EECS150 Lec10-interfacing Page 18 9

Delay Insensitive (self-timed transfer) 2-cycle ( non-return-to-zero ) signaling Only two transitions per transfer. Maybe higher performance. More complex logic. 4-cycle return to zero can usually be overlapped with other operations. Fall 2013 EECS150 Lec10-interfacing Page 19 Summary Asynchronous inputs need synchronizer multiple data sources and sinks with different clocks dual clock FIFO Asynchronous data transfer: full handshaking 20 10