Sequential Circuits: States, FSM, and Synchronous Design

ece 352 n.w
1 / 16
Embed
Share

Explore the concepts of sequential circuits, including states, finite state machines (FSM), and synchronous design. Learn how these elements impact circuit behavior and decision-making processes. Dive into examples to grasp practical applications of these concepts in digital systems.

  • Sequential Circuits
  • FSM
  • Synchronous Design
  • Digital Systems
  • States

Uploaded on | 0 Views


Download Presentation

Please find below an Image/Link to download the presentation.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author. If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.

You are allowed to download the files provided on this website for personal or commercial use, subject to the condition that they are used lawfully. All files are the property of their respective owners.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author.

E N D

Presentation Transcript


  1. ECE 352 Digital System Fundamentals Intro to Sequential Circuits Intro to Sequential Circuits 1 1 1

  2. Definitions Combinational Circuit Outputs are a function of only current circuit inputs Intro to Sequential Circuits Sequential Circuits Outputs are a function of not only the current circuit inputs but also what has happened in the past Example: An automated sign that shows how many parking spots are free in a parking deck by keeping track of when cars enter or leave We don t need to remember anything about specific cars, only how many are still in the garage! Can also think of sequential circuits as blocks of combinational logic separated by flip-flops 2 2 2

  3. State The state of matter: solid, liquid, gas, plasma The state of a circuit: the set of values stored in its flip-flops (which represent its status) A code of 1s and 0s that representing everything important that happened since the circuit was reset A circuit s state affects how that circuit reacts to different sets of input values Intro to Sequential Circuits Examples: The state of a washing machine includes its current cycle (wash, rinse, spin) and the time left in the cycle The state of a vending machine includes the amount of money entered (not necessarily the exact coins!) 3 3 3

  4. Finite State Machine (FSM) A sequential circuit that has a finite number of possible states Limited by the number of flip-flops in the circuit All practical sequential circuits are FSMs Intro to Sequential Circuits We commonly use this term to refer to machines that perform tasks rather than just store data for later retrieval (such as memory in a computer) 4 4 4

  5. Synchronous Sequential Circuits Storage elements hold current state: a code that provides information from the past that the circuit uses in determining how to react to new input values A special signal called a clock marks the passage of time Synchronous: ruled by the clock (synchronized to the clock) The clock goes DIRECTLY to the flip-flops don t gate the clock! The clock alternates between 0 and 1 at a constant rate Cycle: from one rising/falling edge to the next rising/falling edge Period: the length of time of a clock cycle Intro to Sequential Circuits rising edge falling edge cycle time 5 5 5

  6. Synchronous Sequential Circuits Once per clock cycle, the values in the storage elements are updated with the new state information The next state becomes the current state The next state values are produced by a combinational function of the current state values and the circuit inputs The circuit outputs are produced by a combinational function of the current state and possibly the circuit inputs Intro to Sequential Circuits circuit inputs circuit outputs combinational logic next state storage elements clock current state 6 6 6

  7. Anatomy of a Simple Seq. Circuit What the state will become at the next cycle What the state is now in this cycle Next State Current State Intro to Sequential Circuits D Q A D Q Circuit Output CLK Circuit Inputs CLR RST Y B Clock Reset 7 7 7

  8. Current vs. Next State Current state is the set of values that are stored in the FFs at a given time Remember: FFs output their current values Intro to Sequential Circuits Next state is the set of values that will be stored into the FFs when they change state The inputs to the FFs that have not yet been stored into the FFs Understanding the difference between these two is very important! 8 8 8

  9. State Table Lists the next state and circuit output values for all possible current state and circuit input values Essentially a truth table that shows all possible combinations of current state and circuit inputs and the resulting next state and circuit outputs Intro to Sequential Circuits The equations for the next state represent combinational logic that feeds the FF inputs aka input forming logic (IFL) The output equations may be: Based exclusively on the FF outputs (Moore) Based on FF outputs and circuit inputs (Mealy) 9 9 9

  10. State Tables in Circuit Analysis Examine the diagram and write equations for the circuit s flip-flop inputs and circuit outputs Use those equations to fill in the state table Examine the state table (and/or equations) to see what the circuit does Intro to Sequential Circuits D = A Q Current Current Current State State State Current State Q Q Q Next State D 0 1 Next State Next State D Next State D 0 Input Input Input Input Output Output Output Output Q 0 0 0 A A A A 0 0 0 D 0 1 1 0 Y Y 0 0 Y 0 Y 0 0 0 0 0 1 1 1 D Q Y A D Q 0 1 1 1 1 0 0 0 1 1 0 1 1 1 1 1 1 0 1 1 1 1 1 0 0 1 1 1 CLK Y = Q CLR RST Moore: Output depends only on the current state 10 10 10

  11. Waveform Example Current State Next State Input Output D Q Y A Q A D Y D Q 0 0 0 0 Intro to Sequential Circuits CLK 0 1 1 0 CLR 1 1 0 1 1 0 1 1 RST Toggle the output if input A is 1 RST CLK A Q D D D D D D RST RST CLK A Q Q Q Q Q RST CLK CLK CLK RST RST RST CLK A Q D Y Y Y Y Y Y Y CLK A A A A D = A Q Y = Q 11 11 11

  12. State Tables in Circuit Design Fill in the desired circuit behavior in the state table for each current state / input combination Use state table to create minimized logic equations for flip-flop inputs and circuit outputs Equation inputs: flip-flop outputs and circuit inputs Equation outputs: flip-flop inputs and circuit outputs Intro to Sequential Circuits The logic that determines the next state (FF inputs) and the circuit outputs is some combinational function of the current state (FF outputs) and the circuit inputs 12 12 12

  13. State Tables in Circuit Design D = A Current State Next State Input Output Y A A D D D Q Q Q Q A D Y D D D Q Q Q 0 0 0 0 Intro to Sequential Circuits CLK CLK CLK 0 1 1 1 Y = A Q CLR CLR CLR 1 1 0 1 0 1 1 0 RST RST RST Y D A A 0 1 1 0 0 1 1 1 Q Q 0 0 0 0 0 1 1 1 Y = QA + QA = A Q D = A 13 13 13

  14. State Tables in Circuit Design D = A Current State Next State Input Output Y A D Q Q A D Y D Q 0 0 0 0 Intro to Sequential Circuits CLK 0 1 1 1 Y = A Q CLR 1 1 0 1 0 1 1 0 RST Detect if input s current value is different than it was at the end of the previous cycle RST RST RST RST CLK A Q D D D D D D RST CLK A Q Q Q Q Q RST CLK A A A A RST CLK CLK CLK CLK A Q D Y Y Y Y Y Y Y D = A Y = A Q 14 14 14

  15. Another FSM Example Current State Next State Input Output Q1 Q0 A D1 D0 Y D1 Q1 A D Q Intro to Sequential Circuits 0 0 0 1 1 1 0 0 1 0 1 1 0 0 1 1 1 0 0 1 0 0 1 0 0 0 1 0 0 0 CLR 1 1 1 0 1 1 1 0 1 1 1 0 1 0 0 0 0 0 Q0 D0 Y D Q D1 = Q1 Q0 A D0 = Q0 Y = Q1 + Q0 CLK CLR RST 15 15 15

  16. ECE 352 Digital System Fundamentals Intro to Sequential Circuits Intro to Sequential Circuits 16 16 16

Related


More Related Content