Sequential Circuit Design: Principle

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

Software Engineering 2DA4. Slides 9: Asynchronous Sequential Circuits

Counters

Digital Fundamentals: A Systems Approach

Lecture 8: Sequential Logic

Objectives. Combinational logics Sequential logics Finite state machine Arithmetic circuits Datapath

Experiment 8 Introduction to Latches and Flip-Flops and registers

Unit 11. Latches and Flip-Flops

Universal Asynchronous Receiver- Transmitter (UART)

cascading flip-flops for proper operation clock skew Hardware description languages and sequential logic

Review of digital electronics. Storage units Sequential circuits Counters Shifters

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

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

Logic Design. Flip Flops, Registers and Counters

Combinational vs Sequential

Asynchronous (Ripple) Counters

(CSC-3501) Lecture 7 (07 Feb 2008) Seung-Jong Park (Jay) CSC S.J. Park. Announcement

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

ASYNCHRONOUS COUNTER CIRCUITS

MC9211 Computer Organization

COMP2611: Computer Organization. Introduction to Digital Logic

ALGORITHMS IN HW EECS150 ALGORITHMS IN HW. COMBINATIONAL vs. SEQUENTIAL. Sequential Circuits ALGORITHMS IN HW

EMT 125 Digital Electronic Principles I CHAPTER 6 : FLIP-FLOP

Introduction to Sequential Circuits

Latches, Flip-Flops, and Registers. Dr. Ouiem Bchir

Chapter 6. sequential logic design. This is the beginning of the second part of this course, sequential logic.

Fundamentals of Computer Systems

Fundamentals of Computer Systems

ELCT201: DIGITAL LOGIC DESIGN

DEPARTMENT OF ELECTRICAL &ELECTRONICS ENGINEERING DIGITAL DESIGN

Chapter 5 Synchronous Sequential Logic

Flip-Flops. Because of this the state of the latch may keep changing in circuits with feedback as long as the clock pulse remains active.

DEDICATED TO EMBEDDED SOLUTIONS

ELCT201: DIGITAL LOGIC DESIGN

ESE 570 STATIC SEQUENTIAL CMOS LOGIC CELLS. Kenneth R. Laker, University of Pennsylvania, updated 25Mar15

YEDITEPE UNIVERSITY DEPARTMENT OF COMPUTER ENGINEERING. EXPERIMENT VIII: FLIP-FLOPS, COUNTERS 2014 Fall

ELE2120 Digital Circuits and Systems. Tutorial Note 8

The outputs are formed by a combinational logic function of the inputs to the circuit or the values stored in the flip-flops (or both).

Sequential Logic Counters and Registers

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

Synchronous Sequential Logic

EKT 121/4 ELEKTRONIK DIGIT 1

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

SEQUENTIAL LOGIC. Satish Chandra Assistant Professor Department of Physics P P N College, Kanpur

CSE140: Components and Design Techniques for Digital Systems. More D-Flip-Flops. Tajana Simunic Rosing. Sources: TSR, Katz, Boriello & Vahid

Switching Circuits & Logic Design

EITF35: Introduction to Structured VLSI Design

Feedback Sequential Circuits

LATCHES & FLIP-FLOP. Chapter 7

HDL & High Level Synthesize (EEET 2035) Laboratory II Sequential Circuits with VHDL: DFF, Counter, TFF and Timer

CMSC 313 Preview Slides

Digital Design, Kyung Hee Univ. Chapter 5. Synchronous Sequential Logic

2.6 Reset Design Strategy

Final Exam review: chapter 4 and 5. Supplement 3 and 4

Digital Systems Laboratory 3 Counters & Registers Time 4 hours

RS flip-flop using NOR gate

Fundamentals of Computer Systems

Sequential Circuits: Latches & Flip-Flops

Counter dan Register

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

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

Digital Logic & Computer Design CS Professor Dan Moldovan Spring Chapter 3 :: Sequential Logic Design

Chapter 6. sequential logic design. This is the beginning of the second part of this course, sequential logic.

Chapter 3 Unit Combinational

CS8803: Advanced Digital Design for Embedded Hardware

Logic Design II (17.342) Spring Lecture Outline

Flip Flop. S-R Flip Flop. Sequential Circuits. Block diagram. Prepared by:- Anwar Bari

Sequential circuits. Same input can produce different output. Logic circuit. William Sandqvist

EEE2135 Digital Logic Design Chapter 6. Latches/Flip-Flops and Registers/Counters 서강대학교 전자공학과

ECE 172 Digital Systems. Chapter 2.2 Review: Ring Counter, Johnson Counter. Herbert G. Mayer, PSU Status 7/14/2018

Laboratory 1 - Introduction to Digital Electronics and Lab Equipment (Logic Analyzers, Digital Oscilloscope, and FPGA-based Labkit)

CHAPTER 6 COUNTERS & REGISTERS

Administrative issues. Sequential logic

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

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

Flip-Flops and Registers

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

ECE 545 Digital System Design with VHDL Lecture 2. Digital Logic Refresher Part B Sequential Logic Building Blocks

Registers and Counters

Microprocessor Design

Name Of The Experiment: Sequential circuit design Latch, Flip-flop and Registers

Registers and Counters

Sequential Circuits. Output depends only and immediately on the inputs Have no memory (dependence on past values of the inputs)

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

Sequential Circuit Design: Part 1

VeriLab. An introductory lab for using Verilog in digital design (first draft) VeriLab

Learning Outcomes. Unit 13. Sequential Logic BISTABLES, LATCHES, AND FLIP- FLOPS. I understand the difference between levelsensitive

Advanced Digital Logic Design EECS 303

Modeling Latches and Flip-flops

Sequential Logic. E&CE 223 Digital Circuits and Systems (A. Kennings) Page 1

Digital Logic Design Sequential Circuits. Dr. Basem ElHalawany

RS flip-flop using NOR gate

CHAPTER 6 DESIGN OF HIGH SPEED COUNTER USING PIPELINING

System IC Design: Timing Issues and DFT. Hung-Chih Chiang

Digital Logic Design ENEE x. Lecture 19

Chapter 1: Switching Algebra Chapter 2: Logical Levels, Timing & Delays. Introduction to latches Chapter 9: Binary Arithmetic

Computer Science 324 Computer Architecture Mount Holyoke College Fall Topic Notes: Sequential Circuits

CprE 281: Digital Logic

Sequential Design Basics

Why FPGAs? FPGA Overview. Why FPGAs?

Transcription:

Sequential Circuit Design: Principle modified by L.Aamodt 1

Outline 1. 2. 3. 4. 5. 6. 7. 8. Overview on sequential circuits Synchronous circuits Danger of synthesizing asynchronous circuit Inference of basic memory elements Simple design examples Timing analysis Alternative one-segment coding style Use of variable for sequential circuit 2

1. Overview on sequential circuit Combinational vs sequential circuit Sequential circuit: output is a function of current input and state (memory) Basic memory elements D latch D FF (Flip-Flop) RAM Synchronous vs asynchronous circuit 3

D latch: level sensitive D FF: edge sensitive 4

5

Problem wit D latch: Can the two D latches swap data? 6

Timing of a D FF: Clock-to-q delay Constraint: setup time and hold time 7

Synch vs asynch circuits Globally synchronous circuit: all memory elements (D FFs) controlled (synchronized) by a common global clock signal Globally asynchronous but locally synchronous circuit (GALS). Globally asynchronous circuit Use D FF but not a global clock Use no clock signal 8

2. Synchronous circuit One of the most difficult design aspects of a sequential circuit: How to satisfy the timing constraints The Big idea: Synchronous methodology Group all D FFs together with a single clock: Synchronous methodology Only need to deal with the timing constraint of one memory element 9

Basic block diagram State register (memory elements) Next-state logic (combinational circuit) Output logic (combinational circuit) Operation At the rising edge of the clock, state_next sampled and stored into the register (and becomes the new value of state_reg The next-state logic determines the new value (new state_next) and the output logic generates the output At the rising edge of the clock, the new value of state_next sampled and stored into the register Glitches has no effects as long as the state_next is stabled at the sampling edge 10

11

Sync circuit and EDA Synthesis: reduce to combinational circuit synthesis Timing analysis: involve only a single closed feedback loop (others reduce to combinational circuit analysis) Simulation: support cycle-based simulation Testing: can facilitate scan-chain 12

Types of sync circuits Not formally defined, Just for coding Three types: Regular sequential circuit Random sequential circuit (FSM) Combined sequential circuit (FSM with a Data path, FSMD) 13

3. Danger of synthesizing asynchronous circuit D Latch/DFF Are combinational circuits with feedback loop Design is different from normal combinational circuits (it is delay-sensitive) Should not be synthesized from scratch Should use pre-designed cells from device library 14

E.g., a D latch from scratch 15

16

4. Inference of basic memory elements VHDL code should be clear so that the pre-designed cells can be inferred VHDL code D Latch Positive edge-triggered D FF Negative edge-triggered D FF D FF with asynchronous reset 17

Notes from Xilinx Synthesis and Simuation Design Guide

Notes from Xilinx Synthesis and Simuation Design Guide

D Latch No else branch D latch will be inferred 18

From Xilinx:

Pos edge-triggered D FF No else branch Note the sensitivity list 19

Neg edge-triggered D FF 20

D FF with async reset No else branch Note the sensitivity list 21

Register Multiple D FFs with same clock and reset 22

5. Simple design examples Follow the block diagram Register Next-state logic (combinational circuit) Output logic (combinational circuit) 23

D FF with sync enable Note that the en is controlled by clock Note the sensitivity list 24

25

26

T FF 27

28

29

Free-running shift register 30

31

32

33

Universal shift register 4 ops: parallel load, shift right, shift left, pause 34

35

36

Arbitrary sequence counter 37

38

Free-running binary counter Count in binary sequence With a max_pulse output: asserted when counter is in 11 11 state 39

40

Wrapped around automatically Poor practice: 41

Binary counter with bells & whistles 42

43

Decade (mod-10) counter 44

45

Programmable mod-m counter 46

47

48

49

6. Timing analysis Combinational circuit: characterized by propagation delay Sequential circuit: Has to satisfy setup/hold time constraint Characterized by maximal clock rate (e.g., 200 MHz counter, 2.4 GHz Pentium II) Setup time and clock-to-q delay of register and the propagation delay of next-state logic are embedded in clock rate 50

state_next must satisfy the constraint Must consider effect of state_reg: can be controlled synchronized external input (from a subsystem of same clock) unsynchronized external input Approach First 2: adjust clock rate to prevent violation Last: use synchronization circuit to resolve violation 51

Setup time violation and maximal clock rate 52

53

E.g., shift register; let Tcq=1.0ns Tsetup=0.5ns 54

E.g., Binary counter; let Tcq=1.0ns Tsetup=0.5ns 55

56

Hold time violation 57

58

Output delay 59

Consider two segment vs one segment counter description. First 2-segment: 73

Here is a one segment version that creates an unintended one-clock delay in max_pulse output (see circuit in next slide) 75

Intended circuit with max_pulse asserted during state 1111. This circuit created with the two-segment description. Circuit created with the one-segment example description. Note unintended flip-flop That means max_pulse is asserted during state 0000 rather than 1111. 74

Revised one-segment counter description 76

Programmable mod-m counter 77

78

79

80

81

A failed attempt to create an up/down counter. This will not synthesize. Two edge sensing statements in one if-else construct will cause a synthesis error.

Two-segment code Separate memory segment from the rest Can be little cumbersome Has a clear mapping to hardware component One-segment code Mix memory segment and next-state logic / output logic Can sometimes be more compact No clear hardware mapping Error prone Two-segment code is preferred 82