1. Trang chủ
  2. » Kỹ Thuật - Công Nghệ

Lecture Digital logic design - Lecture 21: Sequential circuits: Flip flops

53 84 0

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 53
Dung lượng 1,58 MB

Nội dung

The following will be discussed in this chapter: Flip flops are powerful storage elements, D flip flop is simplest and most widely used, asynchronous inputs allow for clearing and presetting the flip flop output, multiple flops allow for data storage, combine storage and logic to make a computation circuit.

Lecture 21 Sequential Circuits: Flip flops Combinational vs Sequential A combinational circuit: • At any time, outputs depends only on inputs • Changing inputs changes outputs • No regard for previous inputs • No memory (history) • Time is ignored ! Combinational vs Sequential A sequential circuit: • A combinational circuit with feedback through memory • The stored information at any time defines a state • Outputs depends on inputs and previous inputs • Previous inputs are stored as binary information into memory • Next state depends on inputs and present state Examples of sequential systems Traffic light ATM Vending machine What is common between these systems? There are two main types of sequential circuits, and their classification is a function of the timing of their signals Combinational Adder • 4-bit adder (ripple-carry) • Notice how carry-out propagates • One adder is active at a time • full adders are needed Sequential Adder  1-bit memory and 4-bit memory  Only one full-adder!  clocks to get the output  The 1-bit memory defines the circuit state (0 or 1) Problem with Latches • What happens if Clock=1? What will be the value of Q when Clock goes to 0? • Problem: A latch is transparent; state keep changing as long as the clock remains active Example • Due to this uncertainty, latches can not be reliably used as storage elements Overvie w ° Latches respond to trigger levels on control inputs • Example: If G = 1, input reflected at output ° Difficult to precisely time when to store data with latches ° Flip flips store data on a rising or falling trigger edge • Example: control input transitions from -> 1, data input appears at output • Data remains stable in the flip flop until until next rising edge ° Different types of flip flops serve different functions ° Flip flops can be defined with characteristic functions Overview ° The most fundamental sequential components are the latch and flip-flop ° They store one bit of data and make it available to other components ° The main difference between a latch and a flip-flop is that the first are level triggered and the latter are edge triggered ° Flip-flops and latches have a clock input Latc hes •Latch is a type of temporary storage device that has two stable states (bistable) •Latch is normally placed in a category separate from that flip – flops •The main difference between latch and FF is in the method used for changing their state •The output of a latch depends on its current inputs and on its previous output and its change of state can happen at any time when its inputs change 10 T Flip-flop Implementation by JK Flip-flop 39 T Flip-flop Implementation T Flip-Flop T J K Q D T Q Q D = JQ’ + K’Q D = TQ’ + T’Q = T   Q Q T Q Q 40 Implement JK Flip-flop by T Flip-flop 41 Flip Flo p D Cha ract eris tic Tabl es J Q Q Q K Q T Q Q D Q(t+1) Reset Set K Q(t+1) No change Q(t) Reset 0 Set Q’(t) Toggle J 0 1 T Q(t+1) Q(t) Q’(t) No change Toggle 42 Asynchronous ° Asynchronous design is often unavoidable: • User interfaces • Different speed devices • Clocks are difficult to distribute over long distances ° More difficult to design, design tools generally have been synchronous only, but asynchronous design tools are being developed ° Most current devices us synchronous logic inside local blocks, and asynchronous communication between blocks ° What constitutes a “block” is shrinking as logic speeds increase • Currently making jump to chips with multiple independent blocks, or fully asynchronous logic 43 Types of Sequential Circuits • Two types of sequential circuits: • Synchronous: The behavior of the circuit depends on the input signal at discrete instances of time (also called clocked) • Asynchronous: The behavior of the circuit depends on the input signals at any instance of time and the order of the inputs change • A combinational circuit with feedback 44 Asynchronous Inputs Asynchronous inputs (Preset & Clear) are used to override the clock/data inputs and force the outputs to a predefined state The Preset (PR) input forces the output to: Q 1& Q PR D Q CLK Q CLR The Clear (CLR) inpt forces the output to: Q & Q PR CLR CLK D PRESET CLEAR CLOCK DATA Q Q 1 0 1 1 0 X X Asynchronous Preset X X Asynchronous Clear 0 X X 1 ILLEGAL CONDITION 45 D Flip-Flop: PR & CLR Timing Q=D=1 Q=D=0 Q=D=0 Q=D=1 Q=D=1 Q=D=0 Clocked Clocked Clocked Clocked Clocked Clocked Q PR Q=1 Q=1 Preset Preset Q=0 Clear CLR D CLK 46 Asynchronous Inputs •  J, K are synchronous inputs  o Effects on the output are synchronized with the CLK input •  Asynchronous inputs operate independently of the synchronous inputs   and clock  o Set the FF to 1/0 states at any time 47 Asynchronous Inputs 48 Asynchronous Inputs •  Note reset signal (R) for  D flip flop • If R = 0, the output Q is  cleared •This event can occur at  any time, regardless of the  value of the CLK D Flip Flop with asynchronous reset 49 Parallel Data Transfer ° Flip flops store outputs from combinational logic ° Multiple flops can store a collection of data 50 Characteristic Tables • A characteristic table defines the operation of a flip flop in a tabular form • Next state is defined in terms of the current state and the inputs • Q(t) refers to current state (before the clock arrives) • Q(t+1) refers to next state (after the clock arrives) • Similar to the truth table in combinational circuits 51 Characteristic Equations • A characteristic equation defines the operation of a flip flop in an algebraic form • For D-FF • Q(t+1) = D • For JK-FF • Q(t+1) = J Q’ + K’ Q • For T-FF • Q(t+1) = T Q 52 Summary ° Flip flops are powerful storage elements • They can be constructed from gates and latches! ° D flip flop is simplest and most widely used ° Asynchronous inputs allow for clearing and presetting the flip flop output ° Multiple flops allow for data storage • The basis of computer memory! ° Combine storage and logic to make a computation circuit 53 ... ° The J-K flip- flop is versatile and is widely used type of flipflop The difference is that he J-K flip- flop has no invalid 30 state as does the S-R flip- flop J­K  Flip ­flop o J-K flip- flop:... Different types of flip flops serve different functions ° Flip flops can be defined with characteristic functions Overview ° The most fundamental sequential components are the latch and flip- flop ° They... Adder • 4-bit adder (ripple-carry) • Notice how carry-out propagates • One adder is active at a time • full adders are needed Sequential Adder  1-bit memory and 4-bit memory  Only one full-adder!

Ngày đăng: 12/02/2020, 23:39

TỪ KHÓA LIÊN QUAN