Programmable Logic Devices II

Similar documents
LOGIC CIRCUITS. Basic Experiment and Design of Electronics

Memory Elements I. CS31 Pascal Van Hentenryck. CS031 Lecture 6 Page 1

Digital Circuits ECS 371

LOGIC CIRCUITS. Basic Experiment and Design of Electronics. Ho Kyung Kim, Ph.D.

Preparation of Examination Questions and Exercises: Solutions

ELCT201: DIGITAL LOGIC DESIGN

ECE 341. Lecture # 3

Counters. We ll look at different kinds of counters and discuss how to build them

Sequential vs. Combinational

EECS150 - Digital Design Lecture 11 - Shifters & Counters. Register Summary

Chapter 7 Sequential Logic

ELEC Digital Logic Circuits Fall 2014 Sequential Circuits (Chapter 6) Finite State Machines (Ch. 7-10)

Lecture 14: State Tables, Diagrams, Latches, and Flip Flop

Example: vending machine

EECS150 - Digital Design Lecture 23 - FSMs & Counters

ELCT201: DIGITAL LOGIC DESIGN

Introduction EE 224: INTRODUCTION TO DIGITAL CIRCUITS & COMPUTER DESIGN. Lecture 6: Sequential Logic 3 Registers & Counters 5/9/2010

Sequential Logic Circuits

CS221: Digital Design. Dr. A. Sahu. Indian Institute of Technology Guwahati

ECE 448 Lecture 6. Finite State Machines. State Diagrams, State Tables, Algorithmic State Machine (ASM) Charts, and VHDL Code. George Mason University

King Fahd University of Petroleum and Minerals College of Computer Science and Engineering Computer Engineering Department

ALU, Latches and Flip-Flops

Lecture 7: Logic design. Combinational logic circuits

Ch 7. Finite State Machines. VII - Finite State Machines Contemporary Logic Design 1

Digital Logic Design - Chapter 4

ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN. Week 9 Dr. Srinivas Shakkottai Dept. of Electrical and Computer Engineering

Sequential Circuits. Circuits with state. Silvina Hanono Wachman Computer Science & Artificial Intelligence Lab M.I.T. L06-1

Lecture 13: Sequential Circuits, FSM

CSE140: Components and Design Techniques for Digital Systems. Midterm Information. Instructor: Mohsen Imani. Sources: TSR, Katz, Boriello & Vahid

Chapter 4. Sequential Logic Circuits

Review: Designing with FSM. EECS Components and Design Techniques for Digital Systems. Lec 09 Counters Outline.

Dr. Nicola Nicolici COE/EE2DI4 Midterm Test #2 Nov 22, 2006

Synchronous Sequential Circuit Design. Dr. Ehab A. H. AL-Hialy Page 1

I. Motivation & Examples

PGT104 Digital Electronics. PGT104 Digital Electronics

CHW 261: Logic Design

EECS Components and Design Techniques for Digital Systems. FSMs 9/11/2007

Digital Logic and Design (Course Code: EE222) Lecture 19: Sequential Circuits Contd..

Models for representing sequential circuits

EECS150 - Digital Design Lecture 25 Shifters and Counters. Recap

Logic BIST. Sungho Kang Yonsei University

Digital Design. Sequential Logic

Lecture 13: Sequential Circuits, FSM

Integrated Circuits & Systems

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

Appendix B. Review of Digital Logic. Baback Izadi Division of Engineering Programs

Sequential Logic Design: Controllers

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

Digital Electronics Sequential Logic

Digital Control of Electric Drives

EECS150 - Digital Design Lecture 18 - Counters

EECS150 - Digital Design Lecture 18 - Counters

Digital Fundamentals

Table of Content. Chapter 11 Dedicated Microprocessors Page 1 of 25

Digital Fundamentals

Design of Datapath Controllers

Chapter 3. Digital Design and Computer Architecture, 2 nd Edition. David Money Harris and Sarah L. Harris. Chapter 3 <1>

EECS150 - Digital Design Lecture 17 - Sequential Circuits 3 (Counters)

ECE/Comp Sci 352 Digital Systems Fundamentals. Charles R. Kime Section 2 Fall Logic and Computer Design Fundamentals

Sequential Logic Worksheet

Sequential Circuits Sequential circuits combinational circuits state gate delay

Problem Set 9 Solutions

MASSACHUSETTS INSTITUTE OF TECHNOLOGY Department of Electrical Engineering and Computer Sciences

Roger L. Tokheim. Chapter 8 Counters Glencoe/McGraw-Hill

Review: Designing with FSM. EECS Components and Design Techniques for Digital Systems. Lec09 Counters Outline.

Vidyalankar S.E. Sem. III [ETRX] Digital Circuits and Design Prelim Question Paper Solution

COE 328 Final Exam 2008

CPE100: Digital Logic Design I

10/12/2016. An FSM with No Inputs Moves from State to State. ECE 120: Introduction to Computing. Eventually, the States Form a Loop

Lecture 9: Sequential Logic Circuits. Reading: CH 7

EXPERIMENT Bit Binary Sequential Multiplier

Topic 8: Sequential Circuits

Fundamentals of Computer Systems

Lecture 3 Review on Digital Logic (Part 2)

CPE100: Digital Logic Design I

Chapter 7. Sequential Circuits Registers, Counters, RAM

EEE2135 Digital Logic Design

6. Finite State Machines

Chapter 13. Clocked Circuits SEQUENTIAL VS. COMBINATIONAL CMOS TG LATCHES, FLIP FLOPS. Baker Ch. 13 Clocked Circuits. Introduction to VLSI

COE 202: Digital Logic Design Sequential Circuits Part 4. Dr. Ahmad Almulhem ahmadsm AT kfupm Phone: Office:

Digital Integrated Circuits A Design Perspective

UNIVERSITY OF BOLTON SCHOOL OF ENGINEERING BENG (HONS) ELECTRICAL & ELECTRONICS ENGINEERING EXAMINATION SEMESTER /2017

Synchronous Sequential Circuit Design. Digital Computer Design

Lecture 17: Designing Sequential Systems Using Flip Flops

CHAPTER 9: SEQUENTIAL CIRCUITS

Chapter 3. Chapter 3 :: Topics. Introduction. Sequential Circuits

EE141- Spring 2007 Digital Integrated Circuits

Synchronous Sequential Logic

Timing Constraints in Sequential Designs. 63 Sources: TSR, Katz, Boriello & Vahid

ALU A functional unit

EET 310 Flip-Flops 11/17/2011 1

EECS150 - Digital Design Lecture 16 Counters. Announcements

Ch 9. Sequential Logic Technologies. IX - Sequential Logic Technology Contemporary Logic Design 1

Sequential Logic. Rab Nawaz Khan Jadoon DCS. Lecturer COMSATS Lahore Pakistan. Department of Computer Science

GMU, ECE 680 Physical VLSI Design

CSE 140 Midterm 2 - Solutions Prof. Tajana Simunic Rosing Spring 2013

9/18/2008 GMU, ECE 680 Physical VLSI Design

FYSE420 DIGITAL ELECTRONICS

Lecture 7: Sequential Networks

Last lecture Counter design Finite state machine started vending machine example. Today Continue on the vending machine example Moore/Mealy machines

Transcription:

Lecture 04: Efficient Design of Sequential Circuits Prof. Arliones Hoeller arliones.hoeller@ifsc.edu.br Prof. Marcos Moecke moecke@ifsc.edu.br 1 / 94

Reference These slides are based on the material made available by the author of the book in the reference bellow Pong P. Chu, Chapter 8 Efficient Design of Sequential Circuits, In RTL Hardware Design Using VHDL: Coding for Efficiency, Portability, and Scalability. Wiley-IEEE Press, Hoboken, 2006, Pages 1-22, ISBN 0471720925. 2 / 94

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 3 / 94

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 4 / 94

D latch: level sensitive D FF: edge sensitive 5 / 94

6 / 94

Problem wit D latch: Can the two D latches swap data? 7 / 94

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

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 9 / 94

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 10 / 94

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 11 / 94

12 / 94

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 13 / 94

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) 14 / 94

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 15 / 94

E.g., a D latch from scratch 16 / 94

17 / 94

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 18 / 94

D Latch No else branch D latch will be inferred 19 / 94

Pos edge-triggered D FF No else branch Note the sensitivity list 20 / 94

Neg edge-triggered D FF 21 / 94

D FF with async reset No else branch Note the sensitivity list 22 / 94

Register Multiple D FFs with same clock and reset 23 / 94

Simple design examples Follow the block diagram Register Next-state logic (combinational circuit) Output logic (combinational circuit) 24 / 94

D FF with sync enable Note that the en is controlled by clock Note the sensitivity list 25 / 94

26 / 94

27 / 94

T FF 28 / 94

29 / 94

30 / 94

Free-running shift register 31 / 94

32 / 94

33 / 94

34 / 94

Universal shift register 4 ops: parallel load, shift right, shift left, pause 35 / 94

36 / 94

37 / 94

Arbitrary sequence counter 38 / 94

39 / 94

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

41 / 94

Wrapped around automatically Poor practice: 42 / 94

Binary counter with bells & whistles 43 / 94

44 / 94

Decade (mod-10) counter 45 / 94

46 / 94

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 47 / 94

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 48 / 94

Setup time violation and maximal clock rate 49 / 94

50 / 94

E.g., shift register; let Tcq=1.0ns Tsetup=0.5ns 51 / 94

E.g., Binary counter; let Tcq=1.0ns Tsetup=0.5ns 52 / 94

53 / 94

Hold time violation 54 / 94

55 / 94

Output delay 56 / 94

D FF with sync enable 57 / 94

58 / 94

59 / 94

Interpretation: any left-hand-side signal within the clk event and clik= 1 branch infers a D FF 60 / 94

D FF with sync enable (FPGA) 61 / 94

T FF 62 / 94

63 / 94

64 / 94

65 / 94

T FF (FPGA) 66 / 94

Binary counter with bells & whistles 67 / 94

68 / 94

69 / 94

Contador binário com pulso em max 70 / 94

71 / 94

72 / 94

73 / 94

74 / 94

Uso de Variable: Inference of FF/Register Signal assignment on rising(falling) edge of the clock => Inference of FF/Register. Variable assignment on rising(falling) edge of the clock: If assigned a value before it is used, it will get a value every time when the process is invoked and there is no need to keep its previous value => no memory is inferred if used before it is assigned a value, it will use the value from the previous process execution. The variable has to memorize the value between the process invocations => FF/register will be inferred. 75 / 94

Uso de Variable: (a AND b) registrado 76 / 94

77 / 94

78 / 94

Tentativa 2 - OK Tentativa 1 signal NOK Tentativa 3 variable NOK 79 / 94

Contador programável mod-m 80 / 94

81 / 94

82 / 94

83 / 94

84 / 94

85 / 94

86 / 94

87 / 94

88 / 94

89 / 94

90 / 94

91 / 94

Two-segment X One-segment 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 92 / 94

Timing constraints combinational circuit => desired maximal propagation delay. sequential circuit => desired maximal clock rate. In a synchronous design, maximal clock rate => maximal propagation delay of the combinational next-state logic 93 / 94

Synthesis guidelines Strictly follow the synchronous design methodology; => all registers should be synchronized by a common global clock signal. Isolate the memory components => code them in a separate segment. The memory components should be coded clearly => predesigned cell can be inferred from the device library. Asynchronous reset, only for system initialization. Unless there is a compelling reason, a variable should not be used to infer a memory component. 94 / 94