1 / 14

Computer Science 210 Computer Organization

Computer Science 210 Computer Organization. Sequential Circuits Finite State Machines. State Machine. A type of sequential circuit Combinational logic + storage Remembers state Changes output and state based in inputs and current state. State Machine. Inputs. Outputs. Combinational

ila-reed
Download Presentation

Computer Science 210 Computer Organization

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Computer Science 210Computer Organization Sequential Circuits Finite State Machines

  2. State Machine • A type of sequential circuit • Combinational logic + storage • Remembers state • Changes output and state based in inputs and current state State Machine Inputs Outputs Combinational Logic Circuit Storage Elements

  3. 4 1 8 4 30 25 5 20 10 15 Combinational or Sequential? Combinational Success depends only onthe values, not the order in which they are set. Sequential Success depends onthe sequence of values (e.g, R-13, L-22, R-3).

  4. 30 25 5 20 10 15 States of Sequential Lock Our lock example has four different states,labeled A-D:A: The lock is not open, and no relevant operations have been performed. B: The lock is not open, and the user has completed the R-13 operation. C: The lock is not open, and the user has completed R-13, followed by L-22. D: The lock is open. R-13, L-22, R-3

  5. 30 25 5 20 10 15 State Diagram R-13, L-22, R-3 Shows states and actions that cause transitions between states

  6. Finite State Machine (FSM) • A finite number of states • A finite number of inputs • A finite number of outputs • A finite number of state transitions • Actions that specify output values

  7. The Clock “1” “0” One Cycle time The clock cycle triggers a transition between states

  8. Problem • Memory circuits (latches) maintain the states • Current state must be sent from latch to a combinational circuit, which uses it to compute the next state • Next state is fed back as input to latch • Isn’t this circular?

  9. Solution: Master/Slave Flipflop A pair of gated D-latches, to isolate next state from current state. During 1st phase (clock=1),previously-computed statebecomes current state and issent to the logic circuit. During 2nd phase (clock=0),next state, computed bylogic circuit, is stored inLatch A.

  10. Storage • Each flipflop stores one state bit • Number of flipflops is determined by number of states • Sequential lock had four states, so two bits

  11. Blinking Traffic Sign • A blinking traffic sign • No lights on • 1 & 2 on • 1, 2, 3, & 4 on • 1, 2, 3, 4, & 5 on • (repeat as long as switchis turned on) 3 4 1 5 2 DANGERMOVERIGHT

  12. Traffic Light State Diagram Switch on Switch off State bit S1 State bit S0 Outputs Transition on each clock cycle.

  13. Truth Tables Outputs (depend only on state: S1S0) Next State: S1’S0’(depend on state and input) Switch Lights 1 and 2 Lights 3 and 4 Light 5 Whenever In=0, next state is 00.

  14. Traffic Light Circuit Master-slaveflipflop

More Related