1 / 6

Counter state machine

Counter state machine. A counter counts Number of elements in counter determines how many different states we need For example, an eight-state counter can count eight steps. X= Y= Z=. Another counter. Counter need not have always number of states that is equal to a power of 2

Anita
Télécharger la présentation

Counter state machine

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. Counter state machine • A counter counts • Number of elements in counter determines how many different states we need • For example, an eight-state counter can count eight steps X= Y= Z=

  2. Another counter • Counter need not have always number of states that is equal to a power of 2 • Here is a five state counter • Is it simpler? X= Y= Z=

  3. And what about output • Output in a state may depend on state or state and input • Mealy machine: Output depends on both current state and current input • Moore machine: Output depends on current state • Thus we have two different circuits to implement • 1. Decides what is the next state • 2. Decides what is the output • Both circuits are combinational • States are remembered by memory elements • Latches and Flips-flops are used to remember states

  4. O U T P U T S I N P U T S Next State Logic Output Logic Overall structure of a State machine • The two sets of circuits are shown • Next state logic determines next step based on current state and next input • Output logic determines the output based on current state • Mealy machine will have slight different structure

  5. Example • Design a state machine that will repeatedly display in binary values 1, 3, 5, and 7 • Solutions: • How many states we need? • What is the state transition diagram? • What is the output in each state? • What is the next state logic? • Construct the truth table with state variables • Derive the output logic • Draw the circuit

  6. S0 S1 S2 S3 Example (contd.) • We need four states, S0, S1, S2, S3 • State transitions diagram is • State transition table, implementation level state transition table, output table, and implementation level output tables are • And the logic equations are L2 = XY’+XY = X X := X’Y+XY’ L1 = X’Y+XY = Y Y := X’Y’+XY’ = Y’ L0 = X’Y’+X’Y+XY’+XY = X’+X = 1

More Related