
Introduction to Complex Finite State Machines: Design and Operations
Explore the design and operations of complex finite state machines (FSMs), including datapath control, register transfer operations, circuit behavior description, and controller FSM design methods, with examples and state diagrams.
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
ECE 352 Digital System Fundamentals Introduction to Complex FSMs Introduction to Complex FSMs 1 1
Complex FSM Design We use the term complex FSM to describe a state machine containing a control unit and a datapath Datapath: the registers and logic that process the data Introduction to Complex FSMs The design of the machine s state diagram is done at a higher level of abstraction The diagram only shows the states required for the control unit; it does not show the state of the datapath registers State diagram outputs can include register operations e.g. reset count , A A B , etc. State diagram inputs can include the results of register ops e.g. A < B , count == 0 , etc. Low-level designs of the control unit and the datapath are done independently after the high-level design is complete 2 2
Designing a Complex Circuit Describe the circuit s behavior with a state diagram that may include register operations and comparisons Determine the required registers and functionality, including any status outputs needed by the FSM Define the register control signal inputs Introduction to Complex FSMs These next two steps can be done in either order Design the registers (datapath) based on the needed functionality and the defined control signals Design the controller FSM Redraw the FSM to describe only the controller behavior, replacing all register operations and comparisons with the corresponding control and status signals Create the controller FSM using normal FSM design methods 3 3
Register Transfer Operations Examples: Load one register from the contents of another Add two register contents and store the result Decrement the contents of a register Introduction to Complex FSMs The control unit generates signals that tell the datapath which register transfer operations to perform and when to perform them The controller may need information from the datapath in order to determine this 4 4
A Simple Complex FSM Example Suppose we want a machine that will count how many times a button B is pressed. When the 3-bit count A reaches 5, do not count any higher. Introduction to Complex FSMs Describe the circuit s behavior with a state diagram that may include register operations and comparisons. 1,(A 5) 1,(A<5)/A A+1 pressed 1,(A 5) not reset reset reset reset reset 1,(A<5)/A A+1 1,(A<5)/A A+1 pressed S0 S0 S0 S0 S0 S1 S1 S1 1,X 0,X 0,X 0,X 0,X 0,X 5 5
A Simple Complex FSM Example Determine the required registers and functionality, including any status outputs needed by the FSM. 3-bit register A with increment and hold capability Assume asynchronous clear to 0 Single status output MAXfor value 5 Define the register control signal inputs. Introduction to Complex FSMs Single control input INC to increment Design the registers based on the needed functionality and the defined control signals. INC MAX A 3 CLK CLR 6 6
A Simple Complex FSM Example Redraw FSM to describe only the controller behavior, replacing register operations/comparisons with corresponding control and status signals. reset B,MAX/INC 1,1/0 Introduction to Complex FSMs 1,0/1 not pressed pressed 0 1 1,X/0 0,X/0 0,X/0 Create the controller FSM using normal FSM design methods. MAX INC D Q B CLK CLR RESET 7 7
A Simple Complex FSM Example Finally, connect the control unit to the datapath to implement the complete machine Introduction to Complex FSMs MAX INC D Q B INC MAX A COUNT CLK 3 CLR CONTROL CLK CLR DATAPATH RESET 8 8
ECE 352 Digital System Fundamentals Introduction to Complex FSMs Introduction to Complex FSMs 9 9