Académique Documents
Professionnel Documents
Culture Documents
Prof. Bo Yuan
Electrical Engineering, CCNY
Slides adapted from Mingjie Lin, Arvind, Krste Asanovic, Emil Petriu,
Wikipedia, Hakim Weatherspoon
Review on Comb. Logic
Until now is combinatorial logic
-- output is computed when inputs are present
-- no internal state for systems
-- nothing computed in the present depends
on what happened in the past
Need of Stateful Components
& Circuits
Need a way to record data
-- Data storage component
Inputs:
-- keycodes from keypad
-- clock
Outputs:
-- “unlock” signal
-- display how many keys pressed so far
Door Lock: Inputs
Assumptions:
-- signals are synchronized to clock
-- Password is B A B
Door Lock: Outputs
Assumptions:
-- High pulse on U unlocks door
State Diagram
Simplified State Diagram
State Table
Stable Table Encoding
Big Picture
Summary
FSM design strategy:
(1) Draw a state diagram (Moore or Mealy)
(2) Write output and next state tables
(3) Encode states, inputs, and outputs as bits
(4) Determine logic equations for next state
and outputs
Pros and Cons:
-- Universal for any design
-- Not practical for large-scale design
-- HDL is a more practical choice