EE 365 Sequentialcircuit analysis 1 Clocked synchronous seq

  • Slides: 15
Download presentation
EE 365 Sequential-circuit analysis 1

EE 365 Sequential-circuit analysis 1

Clocked synchronous seq. circuits • A. k. a. “state machines” • Use edge-triggered flip-flops

Clocked synchronous seq. circuits • A. k. a. “state machines” • Use edge-triggered flip-flops • All flip-flops are triggered from the same master clock signal, and therefore all change state together • Feedback sequential circuits – No explicit flip-flops; state stored in feedback loops – Example: edge-triggered D flip-flop itself (4 states) – Sections 7. 9, 7. 10 (advanced courses) 2

State-machine structure (Mealy) output depends on state and input typically edge-triggered D flip-flops 3

State-machine structure (Mealy) output depends on state and input typically edge-triggered D flip-flops 3

State-machine structure (Moore) output depends on state only typically edge-triggered D flip-flops 4

State-machine structure (Moore) output depends on state only typically edge-triggered D flip-flops 4

State-machine structure (pipelined) • Often used in PLD-based state machines. – Outputs taken directly

State-machine structure (pipelined) • Often used in PLD-based state machines. – Outputs taken directly from flip-flops, valid sooner after clock edge. – But the “output logic” must determine output value one clock tick sooner (“pipelined”). 5

Notation, characteristic equations • Q means “the next value of Q. ” • “Excitation”

Notation, characteristic equations • Q means “the next value of Q. ” • “Excitation” is the input applied to a device that determines the next state. • “Characteristic equation” specifies the next state of a device as a function of its excitation. • S-R latch: Q = S + R´ · Q • Edge-triggered D flip-flop: Q = D 6

State-machine analysis steps • Assumption: Starting point is a logic diagram. 1. Determine next-state

State-machine analysis steps • Assumption: Starting point is a logic diagram. 1. Determine next-state function F and output function G. 2 a. Construct state table – For each state/input combination, determine the excitation value. – Using the characteristic equation, determine the corresponding next-state values (trivial with D f-f’s). 2 b. Construct output table – For each state/input combination, determine the output value. (Can be combined with state table. ) 3. (Optional) Draw state diagram 7

Example state machine 8

Example state machine 8

Excitation equations 9

Excitation equations 9

Transition equations • Excitation equations • Characteristic equations • Substitute excitation equations into characteristic

Transition equations • Excitation equations • Characteristic equations • Substitute excitation equations into characteristic equations 10

Transition and state tables (transition equations) (output equation) transition table state/output table 11

Transition and state tables (transition equations) (output equation) transition table state/output table 11

State diagram • Circles for states • Arrows for transitions (note output info) 12

State diagram • Circles for states • Arrows for transitions (note output info) 12

Modified state machine MAXS = Q 0 Q 1 • Moore machine 13

Modified state machine MAXS = Q 0 Q 1 • Moore machine 13

Updated state/output table, state diagram 14

Updated state/output table, state diagram 14

Timing diagram for state machine • Not a complete description of machine behavior 15

Timing diagram for state machine • Not a complete description of machine behavior 15