RTL Hardware Design by P. Chu Chapter 81. 1. Overview on sequential circuits 2. Synchronous circuits 3. Danger of synthesizing asynchronous circuit 4.

Slides:



Advertisements
Similar presentations
Introduction to Sequential Logic Design Latches. 2 Terminology A bistable memory device is the generic term for the elements we are studying. Latches.
Advertisements

ELEC 256 / Saif Zahir UBC / 2000 Timing Methodology Overview Set of rules for interconnecting components and clocks When followed, guarantee proper operation.
CHAPTER 3 Sequential Logic/ Circuits.  Concept of Sequential Logic  Latch and Flip-flops (FFs)  Shift Registers and Application  Counters (Types,
Flip-Flops, Registers, Counters, and a Simple Processor
1 Kuliah Rangkaian Digital Kuliah 8: Rangkaian Logika Sekuensial Teknik Komputer Universitas Gunadarma.
Announcements Assignment 7 posted, due Friday 18 th All project components ordered Dates –Thursday 12/1 review lecture –Tuesday 12/6 project demonstrations.
Introduction to Sequential Logic Design Bistable elements Latches.
K-Maps, Timing Sequential Circuits: Latches & Flip-Flops Lecture 4 Digital Design and Computer Architecture Harris & Harris Morgan Kaufmann / Elsevier,
Digital Logic Design Lecture 22. Announcements Homework 7 due today Homework 8 on course webpage, due 11/20. Recitation quiz on Monday on material from.
EKT 124 / 3 DIGITAL ELEKTRONIC 1
Sequential Circuits A Basic sequential circuit is nothing but a combinational circuit with some feedback paths between its output and input terminals.
Finite State Machine Chapter 10 RTL Hardware Design by P. Chu.
RTL Hardware Design by P. Chu Chapter 161 Clock and Synchronization.
ENGIN112 L20: Sequential Circuits: Flip flops October 20, 2003 ENGIN 112 Intro to Electrical and Computer Engineering Lecture 20 Sequential Circuits: Flip.
Embedded Systems Hardware:
Contemporary Logic Design Finite State Machine Design © R.H. Katz Transparency No Chapter #8: Finite State Machine Design Finite State.
CS 151 Digital Systems Design Lecture 20 Sequential Circuits: Flip flops.
11/15/2004EE 42 fall 2004 lecture 321 Lecture #32 Registers, counters etc. Last lecture: –Digital circuits with feedback –Clocks –Flip-Flops This Lecture:
Embedded Systems Hardware: Storage Elements; Finite State Machines; Sequential Logic.
Chapter #6: Sequential Logic Design 6.2 Timing Methodologies
مرتضي صاحب الزماني  The registers are master-slave flip-flops (a.k.a. edge-triggered) –At the beginning of each cycle, propagate values from primary inputs.
Contemporary Logic Design Sequential Logic © R.H. Katz Transparency No Chapter #6: Sequential Logic Design Sequential Switching Networks.
ENGIN112 L26: Shift Registers November 3, 2003 ENGIN 112 Intro to Electrical and Computer Engineering Lecture 26 Shift Registers.
Sequential Circuit Introduction to Counter
Lecture 21 Overview Counters Sequential logic design.
Chapter 1_4 Part II Counters
1 Sequential Circuits Registers and Counters. 2 Master Slave Flip Flops.
Registers and Counters
Introduction to Sequential Logic Design Flip-flops.
1 Registers and Counters A register consists of a group of flip-flops and gates that affect their transition. An n-bit register consists of n-bit flip-flops.
Rabie A. Ramadan Lecture 3
ECE Advanced Digital Systems Design Lecture 12 – Timing Analysis Capt Michael Tanner Room 2F46A HQ U.S. Air Force Academy I n t e g r i.
1 Sequential Logic Lecture #7. 모바일컴퓨팅특강 2 강의순서 Latch FlipFlop Shift Register Counter.
Introduction to Sequential Logic Design Flip-flops FSM Analysis.
Introduction to Sequential Logic Design Flip-flops.
SEQUENTIAL CIRCUITS Component Design and Use. Register with Parallel Load  Register: Group of Flip-Flops  Ex: D Flip-Flops  Holds a Word of Data 
Basic Sequential Components CT101 – Computing Systems Organization.
FLIP FLOP By : Pn Siti Nor Diana Ismail CHAPTER 1.
1 CSE370, Lecture 15 Lecture 15 u Logistics n HW5 due this Friday n HW6 out today, due Friday Feb 20 n I will be away Friday, so no office hour n Bruce.
ENG241 Digital Design Week #8 Registers and Counters.
Topic: Sequential Circuit Course: Logic Design Slide no. 1 Chapter #6: Sequential Logic Design.
Computer Organization & Programming Chapter 5 Synchronous Components.
Abdullah Said Alkalbani University of Buraimi
RTL Hardware Design by P. Chu Chapter Poor design practice and remedy 2. More counters 3. Register as fast temporary storage 4. Pipelined circuit.
Introduction to Sequential Logic Design Bistable elements.
BR 8/991 DFFs are most common Most programmable logic families only have DFFs DFF is fastest, simplest (fewest transistors) of FFs Other FF types (T, JK)
Sequential logic circuits
VHDL Discussion Finite State Machines
BR 1/991 DataPath Elements Altera LPM library has many elements useful for building common datapath functions –lpm_ram_dq - recommended for either asynchronous.
Registers; State Machines Analysis Section 7-1 Section 5-4.
CEC 220 Digital Circuit Design Latches and Flip-Flops Monday, March 03 CEC 220 Digital Circuit Design Slide 1 of 19.
03/31/031 ECE 551: Digital System Design & Synthesis Lecture Set 8 8.1: Miscellaneous Synthesis (In separate file) 8.2: Sequential Synthesis.
ECE DIGITAL LOGIC LECTURE 20: REGISTERS AND COUNTERS Assistant Prof. Fareena Saqib Florida Institute of Technology Fall 2015, 11/19/2015.
George Mason University Behavioral Modeling of Sequential-Circuit Building Blocks ECE 545 Lecture 8.
ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN Dr. Shi Dept. of Electrical and Computer Engineering.
Modular sequential logic Use latches, flip-flops and combinational logic –Flip-flops usually grouped to form a register Shift registers –n bits {x n …x.
RTL Hardware Design by P. Chu Chapter 9 – ECE420 (CSUN) Mirzaei 1 Sequential Circuit Design: Practice Shahnam Mirzaei, PhD Spring 2016 California State.
Dept. of Electrical Engineering
Sequential logic circuits First Class 1Dr. AMMAR ABDUL-HAMED KHADER.
Sequential Logic Design
Chapter #6: Sequential Logic Design
Registers and Counters
Introduction Introduction to VHDL Entities Signals Data & Scalar Types
Introduction to Sequential Logic Design
CS Fall 2005 – Lec. #5 – Sequential Logic - 1
CSE 370 – Winter Sequential Logic-2 - 1
ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN
CSE 370 – Winter Sequential Logic-2 - 1
ECE 448 Lecture 6 Finite State Machines State Diagrams vs. Algorithmic State Machine (ASM) Charts.
Sequntial-Circuit Building Blocks
Presentation transcript:

RTL Hardware Design by P. Chu Chapter 81

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

 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 RTL Hardware Design by P. Chu Chapter 83

RTL Hardware Design by P. Chu Chapter 84  D latch: level sensitive  D FF: edge sensitive

RTL Hardware Design by P. Chu Chapter 85

RTL Hardware Design by P. Chu Chapter 86  Problem wit D latch: Can the two D latches swap data?

RTL Hardware Design by P. Chu Chapter 87  Timing of a D FF: ◦ Clock-to-q delay ◦ Constraint: setup time and hold time

 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 RTL Hardware Design by P. Chu Chapter 88

 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 RTL Hardware Design by P. Chu Chapter 89

RTL Hardware Design by P. Chu Chapter 810  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

RTL Hardware Design by P. Chu Chapter 811

 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 RTL Hardware Design by P. Chu Chapter 812

 Not formally defined, Just for coding  Three types: ◦ “Regular” sequential circuit ◦ “Random” sequential circuit (FSM) ◦ “Combined” sequential circuit (FSM with a Data path, FSMD) RTL Hardware Design by P. Chu Chapter 813

 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 RTL Hardware Design by P. Chu Chapter 814

RTL Hardware Design by P. Chu Chapter 815 E.g., a D latch from scratch

RTL Hardware Design by P. Chu Chapter 816

 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 RTL Hardware Design by P. Chu Chapter 817

RTL Hardware Design by P. Chu Chapter 818 D Latch No else branch D latch will be inferred

RTL Hardware Design by P. Chu Chapter 819 Pos edge- triggered D FF No else branch Note the sensitivity list

RTL Hardware Design by P. Chu Chapter 820  Neg edge-triggered D FF

RTL Hardware Design by P. Chu Chapter 821 D FF with async reset No else branch Note the sensitivity list

RTL Hardware Design by P. Chu Chapter 822 Register Multiple D FFs with same clock and reset

RTL Hardware Design by P. Chu Chapter Simple design examples  Follow the block diagram ◦ Register ◦ Next-state logic (combinational circuit) ◦ Output logic (combinational circuit)

RTL Hardware Design by P. Chu Chapter 824 D FF with sync enable  Note that the en is controlled by clock  Note the sensitivity list

RTL Hardware Design by P. Chu Chapter 825

RTL Hardware Design by P. Chu Chapter 826

RTL Hardware Design by P. Chu Chapter 827 T FF

RTL Hardware Design by P. Chu Chapter 828

RTL Hardware Design by P. Chu Chapter 829

RTL Hardware Design by P. Chu Chapter 830 Free-running shift register

RTL Hardware Design by P. Chu Chapter 831

RTL Hardware Design by P. Chu Chapter 832

RTL Hardware Design by P. Chu Chapter 833

RTL Hardware Design by P. Chu Chapter 834 Universal shift register  4 ops: parallel load, shift right, shift left, pause

RTL Hardware Design by P. Chu Chapter 835

RTL Hardware Design by P. Chu Chapter 836

RTL Hardware Design by P. Chu Chapter 837 Arbitrary sequence counter

RTL Hardware Design by P. Chu Chapter 838

RTL Hardware Design by P. Chu Chapter 839 Free-running binary counter  Count in binary sequence  With a max_pulse output: asserted when counter is in “11…11” state

RTL Hardware Design by P. Chu Chapter 840

RTL Hardware Design by P. Chu Chapter 841  Wrapped around automatically  Poor practice:

RTL Hardware Design by P. Chu Chapter 842 Binary counter with bells & whistles

RTL Hardware Design by P. Chu Chapter 843

RTL Hardware Design by P. Chu Chapter 844 Decade (mod-10) counter

RTL Hardware Design by P. Chu Chapter 845

RTL Hardware Design by P. Chu Chapter 846 Programmable mod-m counter

RTL Hardware Design by P. Chu Chapter 847

RTL Hardware Design by P. Chu Chapter 848

RTL Hardware Design by P. Chu Chapter 849

 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 RTL Hardware Design by P. Chu Chapter 850

RTL Hardware Design by P. Chu Chapter 851  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

RTL Hardware Design by P. Chu Chapter 852  Setup time violation and maximal clock rate

RTL Hardware Design by P. Chu Chapter 853

RTL Hardware Design by P. Chu Chapter 854  E.g., shift register; let Tcq=1.0ns Tsetup=0.5ns

RTL Hardware Design by P. Chu Chapter 855  E.g., Binary counter; let Tcq=1.0ns Tsetup=0.5ns

RTL Hardware Design by P. Chu Chapter 856

RTL Hardware Design by P. Chu Chapter 857  Hold time violation

RTL Hardware Design by P. Chu Chapter 858

RTL Hardware Design by P. Chu Chapter 859 Output delay

 Combine register and next-state logic/output logic in the same process  May appear compact for certain simple circuit  But it can be error-prone RTL Hardware Design by P. Chu Chapter 860

RTL Hardware Design by P. Chu Chapter 861 D FF with sync enable

RTL Hardware Design by P. Chu Chapter 862

RTL Hardware Design by P. Chu Chapter 863

RTL Hardware Design by P. Chu Chapter 864 Interpretation: any left-hand-side signal within the clk’event and clik=‘1’ branch infers a D FF

RTL Hardware Design by P. Chu Chapter 865 T FF

RTL Hardware Design by P. Chu Chapter 866

RTL Hardware Design by P. Chu Chapter 867

RTL Hardware Design by P. Chu Chapter 868

RTL Hardware Design by P. Chu Chapter 869 Binary counter with bells & whistles

RTL Hardware Design by P. Chu Chapter 870

RTL Hardware Design by P. Chu Chapter 871

RTL Hardware Design by P. Chu Chapter 872 Free-running binary counter  Count in binary sequence  With a max_pulse output: asserted when counter is in “11…11” state

RTL Hardware Design by P. Chu Chapter 873

RTL Hardware Design by P. Chu Chapter 874

RTL Hardware Design by P. Chu Chapter 875

RTL Hardware Design by P. Chu Chapter 876

RTL Hardware Design by P. Chu Chapter 877 Programmable mod-m counter

RTL Hardware Design by P. Chu Chapter 878

RTL Hardware Design by P. Chu Chapter 879

RTL Hardware Design by P. Chu Chapter 880

RTL Hardware Design by P. Chu Chapter 881

 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 RTL Hardware Design by P. Chu Chapter 882