Propagation Delay: capacitances introduce delay

Slides:



Advertisements
Similar presentations
Computer Architecture CS 215
Advertisements

CPEN Digital System Design
KU College of Engineering Elec 204: Digital Systems Design
Registers and Counters
Registers and Counters
Chapter 7 Henry Hexmoor Registers and RTL
1 Register Transfer &  -operations Computer Organization Computer Architectures Lab REGISTER TRANSFER AND MICROOPERATIONS Register Transfer Language Register.
8085 processor. Bus system in microprocessor.
Chapter 9 Computer Design Basics. 9-2 Datapaths Reminding A digital system (or a simple computer) contains datapath unit and control unit. Datapath: A.
Charles Kime & Thomas Kaminski © 2004 Pearson Education, Inc. Terms of Use (Hyperlinks are active in View Show mode) Terms of Use Chapter 7 – Registers.
Digital Logic Chapter 5 Presented by Prof Tim Johnson
LOGIC GATES ADDERS FLIP-FLOPS REGISTERS Digital Electronics Mark Neil - Microprocessor Course 1.
Ch 8. Sequential logic design practices 1. Documentation standards ▶ general requirements : signal name, logic symbol, schematic logic - state machine.
Chapter 7 Henry Hexmoor Registers and RTL
Chapter 7. Register Transfer and Computer Operations
Logic and Computer Design Fundamentals Registers and Counters
CPEN Digital System Design Chapter 9 – Computer Design
Chapter 7 - Part 2 1 CPEN Digital System Design Chapter 7 – Registers and Register Transfers Part 2 – Counters, Register Cells, Buses, & Serial Operations.
ENGIN112 L26: Shift Registers November 3, 2003 ENGIN 112 Intro to Electrical and Computer Engineering Lecture 26 Shift Registers.
KU College of Engineering Elec 204: Digital Systems Design
Sequential Circuit  It is a type of logic circuit whose output depends not only on the present value of its input signals but on the past history of its.
Chapter 1_4 Part II Counters
Registers & Register Transfers Digital Logic Design Instructor: Kasım Sinan YILDIRIM.
Sequential Circuits Chapter 4 S. Dandamudi To be used with S. Dandamudi, “Fundamentals of Computer Organization and Design,” Springer,  S.
Rabie A. Ramadan Lecture 3
EKT 221/4 DIGITAL ELECTRONICS II  Registers, Micro-operations and Implementations - Part3.
SEQUENTIAL CIRCUITS Component Design and Use. Register with Parallel Load  Register: Group of Flip-Flops  Ex: D Flip-Flops  Holds a Word of Data 
Charles Kime & Thomas Kaminski © 2004 Pearson Education, Inc. Terms of Use (Hyperlinks are active in View Show mode) Terms of Use ECE/CS 352: Digital Systems.
Charles Kime & Thomas Kaminski © 2008 Pearson Education, Inc. (Hyperlinks are active in View Show mode) Chapter 7 – Registers and Register Transfers Part.
Chap 7. Register Transfers and Datapaths. 7.1 Datapaths and Operations Two types of modules of digital systems –Datapath perform data-processing operations.
7-6 단일 레지스터에서 Microoperation Multiplexer-Based Transfer  Register 가 서로 다른 시간에 둘 이상의 source 에서 data 를 받을 경우 If (K1=1) then (R0 ←R1) else if (K2=1) then.
 Counters are sequential circuits which "count" through a specific state sequence. They can count up, count down, or count through other fixed sequences.
Register and Register Transfers
Chapter 1_4 Part III more on … Counters Chapter 1_4 Part III more on … Counters.
Chapter 1 Counters. Counters Counters are sequential circuits which "count” through a specific state sequence. They can count up, count down, or count.
Computer Organization & Programming Chapter 5 Synchronous Components.
Charles Kime & Thomas Kaminski © 2008 Pearson Education, Inc. (Hyperlinks are active in View Show mode) Chapter 7 – Registers and Register Transfers Part.
Abdullah Said Alkalbani University of Buraimi
Charles Kime & Thomas Kaminski © 2004 Pearson Education, Inc. Terms of Use (Hyperlinks are active in View Show mode) Terms of Use ECE/CS 352: Digital Systems.
DIGITAL 2 : EKT 221 RTL : Microoperations on a Single Register
EKT 221 : Chapter 4 Computer Design Basics
Counters.
Chap 5. Registers and Counters
Chapter 1_0 Registers & Register Transfer. Chapter 1- Registers & Register Transfer  Chapter 7 in textbook.
Charles Kime & Thomas Kaminski © 2008 Pearson Education, Inc. (Hyperlinks are active in View Show mode) Chapter 7 – Registers and Register Transfers Part.
1 Registers A register is a group of n flip-flops each of them capable of storing one bit of information There are two types of registers: parallel and.
REGISTER TRANSFER AND MICROOPERATIONS
Registers and Counters
6.
REGISTER TRANSFER AND MICROOPERATIONS
Chap 7. Register Transfers and Datapaths
EKT 221 : Digital 2 COUNTERS.
SLIDES FOR CHAPTER 12 REGISTERS AND COUNTERS
KU College of Engineering Elec 204: Digital Systems Design
Chapter 7 – Registers and Register Transfers
DIGITAL 2 : EKT 221 RTL : Microoperations on a Single Register
Basics of digital systems
Register Transfer and Microoperations
Dr. Clincy Professor of CS
COE 202: Digital Logic Design Sequential Circuits Part 4
触发器 Flip-Flops 刘鹏 浙江大学信息与电子工程学院 March 27, 2018
29-Nov-18 Counters Chapter 5 (Sections ).
REGISTER TRANSFER LANGUAGE
ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN
Dr. Clincy Professor of CS
Chapter 1_5 register Cell Design
Overview Part 1 - Registers, Microoperations and Implementations
Overview Part 1 - Registers, Microoperations and Implementations
CHAPTER-3 REGISTER TRANSFER LANGUAGE AND MICROOPERATIONS
Instruction execution and ALU
Presentation transcript:

Propagation Delay: capacitances introduce delay All physical devices have delays due to the charging and discharging of (parasitic capacitors) and interconnection resistance. flow Resistive tube Crossing lines level t Propagation delay tpd

Where to these capacitors come from? Most are parasitic caps 2um passivation M9 M8 M7 M6 M5 M4 M3 M2 M1 (Source: TSMC) Cross section of Altera Stratix EP1S25 (TSMC process) Crossing lines Crossing interconnections (Source: IBM) 9 level of interconnections

Review: 6-3 Flip-Flop Timing Parameters and metastability Edge triggered flip-flop If one violates the set-up time and hold time, the flip-flop can go in a metastable state. C D Q In Out C tS th In (D) set-up time hold time

Metastable behavior Example of metastable behavior: After a while the flip-flop will go into a stable state (randomly). If this happens before the next clock edge, the actual circuits will see a defined input. The longer the clock period is the less chance of synchronization failure. Or use two synchronization flip-flops in series metastable Eventually, the flip-flop will settle (Oscilloscope trace)

Practical Considerations Debouncing Practical Considerations

Practical considerations In many cases the input signals come from push buttons and sensors: Switches exhibit bouncing Are not synchronous Give multiple input (sampled many times) This can give catastrophic failures of timing problems Solutions: Debounce the switch Synchronizer One-pulse circuit (and synchronizer)

Bouncing of switches What is bouncing? When closing a switch, the switch contact bounces back and forth, giving multiple pulses Measured signal A B chip Push button switch 5V Causes spurious glitches on input B

Debouncing circuit The two resistors will keep S=R=0: Inputs are never floating Output does not bounce Push switch R 5V 1 2 Q R S S Q contact to 5V Bouncing No bouncing SR latch Is set S=R=0 No change

Issues with asynchronous inputs Likely violation of set up times Issues with asynchronous inputs

Asynchronous inputs Asynchronous inputs (e.g. from sensors) can cause timing problems if set up time is violated: Use a synchronizer Signal from sensor CLK tS setup time This setup time violation can give problems, such as metastability and erroneous operation: stable metastable

Metastability and Synchronization A flip-flop can get into a metastable state: When the set-up or hold times are violated This can happen for asynchronous inputs (e.g. push button; sensor input, etc) Input CLK Q0 Q1 D Q D0i Q0 Sensor asynchronous input D1 Q1 CLK Both flip flops behave differently! kick Q0 kick Q1

Metastability (continued) Asynchronous inputs: Use a synchronizing flip-flop Now, only the synchronizer may get into the metastable state; however, there is a good chance that by the end of the clock period it went into one of the stable states. D Q D0 Q0 D1i Q1 Di Ai Synchronizer Asynchronous input

Synchronizer Di Ai Sensor,async Synchronized output CLK CLK Q Di Ai CLK Sensor,async Synchronized output Signal from sensor CLK Synchronized output Note: by having the sensor input enter through a single D flip-flop the problem of timing circuits is reduced greatly (there is still a small chance that the D FF will be unstable). By using two D flip-flops in series one further reduces the risk that the 2nd FF will be metastable.

Registers and Register Transfers Chapter 7 Registers and Register Transfers (Source: reference.findtarget.com)

7-1 Registers Register – a collection of flip-flops, together with some combinational logic, that performs data processing tasks (e.g. storing, moving data, etc). In theory, a register is sequential logic which can be defined by a state table. More often think of a register as storing a vector of binary values.

Simple Storage Register A D flip-flop register loads information on every clock cycle! To “store” or “load” information should be controlled by a signal. inputs Outputs Active low Clear (asynch)

Register with Parallel Load: Clock Gating Use a signal to block the clock to the register Load is a frequent name for the signal that controls register storage and loading Load = 1: Load the values on the data inputs Load = 0: Store the values in the register Gated clock: To C input of Flip-flops Clock gating: 1 Clock Load Gated Clock to FF Timing: Extra edge!

Registers with Load-Controlled Feedback A more reliable way to selectively load a register: Run the clock continuously, and Selectively use a load control to change the register contents. Example: 2-bit register with Load Control: For Load = 0, loads register contents (hold current values) For Load = 1, loads input values (load new values) Hardware more complex than clock gating, but free of timing problems 2-to-1 Multiplexers C D Q Clock In0 In1 A1 A0 Y1 Y0 Load

Registers with Load Control: Example K1=1: R1 stores the result of addition/subtraction

7-2 Register Transfers The data is stored in registers, which compose the datapath. In many cases one wants to perform a variety of arithmetic and logical operations on a set of data bits (e.g. a 16-bit word): Additions, subtraction, shifting, loading, etc. (Source: reference.findtarget.com)

Register Transfers Operations The type of operations on the data will be determined by a controller, often called a control unit. This division between the datapath and control unit makes the design of complex systems easier. Strategy: divide and conquer! Registers play a key role in complex digital systems! Transfers between registers determine the operations. (Source: reference.findtarget.com)

Datapath and Control Unit Control signals Status signals Control Unit Datapath Determines which operation and sequence of operation based on status signals Control signals: activate various operations in the datapath Is a large finite state machine Stores data in registers Performs operations on data, specified by Cntr unit Provide status signals Is defined by registers and its operations: Register Transfer Operations (RTL) An elementary operation: microoperation

7-3 Register Transfer Operations Register Transfer Operations – The movement and processing of data stored in registers Three basic components: set of registers operations control of operations Elementary Operations -- load, count, shift, add, bitwise "OR", etc. Elementary operations called microoperations Register Notation: 15 8 7 0 15 0 PC(H) PC(L) R2 Ex. 8-bit register R: 16-bit registers: R 7 …1 0 LSB MSB

Conditional Transfer R1 R2 K 1 Clock n Clock K1 Clock K1 If (K1 =1) then (R2  R1) is shortened to K1: (R2  R1) where K1 is a control variable specifying a conditional execution of the microoperation.   R1 R2 K 1 Clock Load n Clock K1 Transfer occurs here No Transfers Occur Here Clock K1 Transfer occurs here No Transfers Occur Here

7-5 Microoperations Logical Groupings: Transfer - move data from one set of registers to another Arithmetic - perform arithmetic on data in registers Logic - manipulate data or use bitwise logical operations Shift - shift data in registers Arithmetic operations + Addition – Subtraction * Multiplication / Division Logical operations (bitwise)  Logical OR  Logical AND  Logical Exclusive OR  Not

Example Microoperations Add the content of R1 to the content of R2 and place the result in R1. R1 R1 + R2 Multiply the content of R1 by the content of R6 and place the result in PC. PC  R1 * R6 Exclusive OR the content of R1 with the content of R2 and place the result in R1. R1  R1  R2

Example Microoperations (Continued) On condition K1 OR K2, the content of R1 is Logic bitwise ORed with the content of R3 and the result placed in R1: (K1 + K2): R1  R1  R3 NOTE: "+" (as in K1 + K2) and means “OR.” In R1  R1 + R3, + means “plus.”

Arithmetic Microoperations Note that any register may be specified for source 1, source 2, or destination. These simple microoperations operate on the whole word Symbolic Designation Description R0 ¬ R1 + R2 Addition R1 Ones Complement R1 + 1 Two's Complement R2 + R2 minus R1 (2's Comp) Increment (count up) – 1 Decrement (count down)

Implementation of an Arithmetic Micro operation Conditional microoperation: X K1 : R1  R1 + R2 X K1 : R1  R1 + R2 + 1 Condition

Logical Microoperations Symbolic Description Designation R0 ¬ R1 Bitwise NOT R0 ¬ R1 Ú R2 Bitwise OR (sets bits) R0 ¬ R1 Ù R2 Bitwise AND (clears bits) R0 ¬ R1 Å R2 Bitwise EXOR (complements bits)

Logical Microoperations (continued) Let R1 = 10101010, and R2 = 11110000 Then after the operation, R0 becomes: (sets bits) (clears bits) (complements bits)

Shift Microoperations Let R2 = 11001001 Then after the operation, R1 becomes: Symbolic Designation Description R1 ¬ sl R2 Shift Left sr R2 Shift Right R1 Operation 10010010 ¬ sl R2 01100100 sr R2 Note: These shifts "zero fill". Sometimes a separate flip-flop is used to provide the data shifted in, or to “catch” the data shifted out. Other shifts are possible (rotates, arithmetic).

7-6: Microoperation on a Single Register MUX-based transfers Shift registers (needed for Lab) Ripple Counter Synchronous binary counter Other counters

7-6 Microoperations on a Single Register The focus is on the implementation of microperations with a SINGLE register as the Destination of the results In addition to the register there is some combinational logic needed. This is considered part of the register and is called DEDICATED logic (in contrast to SHARED logic for multiple destination registers). Multiplexer-based transfer: makes use of multiplexers to allow multiple operations on a single destination register (See next)

Multiplexer-Based Transfers Multiplexers connected to register inputs produce flexible transfer structures Consider the following circuit What are the corresponding Register Transfer operations of the following implementation? Load R0 n MUX S K 2 1 R2 R1 Combinational circuit

Register Transfer Operations implemented by the following circuit K1.K2: R0  R1 K1.K2: R0  R2 Load R0 n MUX S K 2 1 R2 R1

Exercise Consider the following circuit (Note: Clocks are omitted for clarity) What are the corresponding Register Transfer operations? Load R0 n MUX S K 2 1 R2 R1 The transfers are: K1: R0  R1 K2.K1’: R0  R2

Shift Registers Shift Registers move data laterally within the register toward its MSB or LSB position In the simplest case, the shift register is simply a set of D flip-flops connected in a row like this: Data input, In, is called a serial input or the shift right input. Data output, Out, is often called the serial output. The vector (A, B, C, Out) is called the parallel output.

Shift Registers (continued) The behavior of the serial shift register is given in the listing on the lower right T0 is the register state just before the first clock pulse occurs T1 is after the first pulse and before the second. Initially unknown states are denoted by “?” Complete the last three rows of the table In A B C Out D Q D Q D Q D Q Clock CP Clock In A B C Out T0 ? T1 1 T2 T3 T4 T5 T6 ROW T4: 10110 Row T5: 11011 Row T6: 11101

Shift Registers (continued) A B C Out D Q D Q D Q D Q Clock CP CP In A B C Out T0 ? T1 1 T2 T3 T4 T5 T6 ROW T4: 10110 Row T5: 11011 Row T6: 11101 1 1 1

Parallel Load Shift Registers By adding a mux between each shift register stage, data can be shifted or loaded If SHIFT is low, A and B are replaced by the data on DA and DB lines, else data shifts right on each clock. By adding more bits, we can make n-bit parallel load shift registers. Register Transfer Operation: D Q A B CP SHIFT IN DA DB MUX SHIFT: Q  sr Q SHIFT’: Q  D

Parallel Load Shift Registers with Load Q 2 1 S1 S0 Shift Load C Q0 Q1 Q2 D0 D1 D2 Serial input Control Use a multiplexer with 3 inputs: 2 1 S1 S0 Shift Load Serial input D0 =

Timing Register Transfer Operation: Shift: Q  sl Q Shift.Load: Q  D Clock Load (Shift = 0) Di Qi Output changes here Register Transfer Operation: Shift: Q  sl Q Shift.Load: Q  D

Bidirectional shift register

Counters Counters are sequential circuits which "count" through a specific state sequence. They can count up, count down, or count through other fixed sequences. Two distinct types are in common usage: Ripple Counters Clock is connected to the flip-flop clock input on the LSB bit flip-flop For all other bits, a flip-flop output is connected to the clock input, thus circuit is not truly synchronous Output change is delayed more for each bit toward the MSB. Resurgent because of low power consumption Synchronous Counters Clock is directly connected to the flip-flop clock inputs Logic is used to implement the desired state sequencing

Ripple Counter How does it work? B When there is a positive edge on the clock input of A, A complements The clock input for flip- flop B is the complemented output of flip-flop A When flip A changes from 1 to 0, there is a positive edge on the clock input of B causing B to complement Reset Clock D CR B A CP A B 1 2 3

Ripple Counter (continued) The arrows show the cause-effect relation- ship from the prior slide => The corresponding sequence of states => (B,A) = (0,0), Each additional bit, C, D, …behaves like bit B, changing half as frequently as the bit before it. For 3 bits: (C,B,A) = (0,0,0), (0,0,1), (0,1,0), (0,1,1), (1,0,0), (1,0,1), (1,1,0), (1,1,1), (0,0,0), … CP B A 1 2 3 (0,1), (1,0), (1,1), (0,0), (0,1), …

Delays in a Ripple Counter Starting with C = B = A = 1, the next clock increments the count to (C,B,A) = 0; thus from (111) to (000) In fine timing detail: The clock to output delay tPHL causes an increasing delay from clock edge for each stage transition. Thus, the count “ripples” from least to most significant bit. For n bits, total worst case delay is n tPHL. CP A B C tPHL tpHL 1 1 1

Ripple Counter (continued) These circuits are called ripple counters because the changes “ripple” through the chain of flip-flops, i. e., each transition occurs after a clock-to-output delay from the stage before. Disadvantages: Slow operation due to the delays Intermediate results with can give rise to unreliable operation in digital circuits Advantages: Simple hardware Low power consumption

Synchronous Counters Clock To eliminate the "ripple" effects, use a common clock for each flip-flop and a combinational circuit to generate the next state. For an up-counter, use an incrementer => Incre-menter A3 A2 A1 A0 S3 S2 S1 S0 Comb. Logic D3 Q3 D2 Q2 D1 Q1 D0 Q0 Clock

Synchronous counter Clock Q0 Q1 1 Q2 1 Q0: changes at every clock When EN=1: XOR inverts and Q0=D’ D Q C EN Q0 Q1: changes when Q0 = 1: D Q C EN Q1 Q0 Q2: changes when Q0 and Q1 = 1 D Q C Q2 Q1

Synchronous counter – parallel gating Incrementer Replace AND carry chain with ANDs => in parallel Advantages Reduces path delays Called parallel gating Like carry lookahead Symbol: Carry Out CO

Synchronous Counter with an Arbitrary Sequence Start with the state diagram or the state table Decide which flip-flops to use Find the combinational logic (inputs to the flip-flops) Draw or build the circuit 000 001 010 100 110 101

Design Exercise: Arbitrary Sequence 000 001 010 100 110 101

Arbitrary Count sequence: next state equation 3 Flip-flops required Find the next state equations: DC, DB, DA. A B C DA 0 0 x 1 Be careful with Table sequence 1 1 x 0 A B C DC 1 0 x 0 A B C DB 0 1 x 0 DA = A’B+AB’ = AB DB = C DC = B’C’

Counter schematic DA = A’B+AB’ = AB DB = C DC = B’C’ What about unused states? Complete the state diagram