FSM Flashcards
what does an FSM need to have
- set of states
- sets of inputs and outputs
- sets of transition states
- initial state
- Set of actions/outputs
key quaility about state transitions
need to be deterministic
2 key rules for conditions for transitions
only one conditions should be true, one condition must be true
how can u verify transition properties with boolean algebra
- Only one condition true (AND of each pair is always 0)* One condition true (OR of all transitions is always 1
How to implement FSM as sequential circuit?
use controller architecture
state register to store the current state
combinational logic to compute outputs, next state
go over the laser time example
whats the 5 step controller design
1.capture FSM
2.Create the standard architechture by using state register and combinational logic
3. Encode the states, assign a unique binary number to a state,
4. truth table
5. implement
what is an encoding
each binary number that represents a state
What is the importance of the initial state in an FSM?
The initial state ensures predictable behavior as the FSM starts its operation from a known state.
How can an initial state be achieved in an FSM?
By using flip-flops with reset/set inputs to initialize them to a specific state (e.g., 00). Flip-Flops are basic building blocks of digital circuits that can store one bit of data. They are used in FSMs to hold the current state. Each flip-flop can represent a binary state (0 or 1).
based on flip flop what does it do for the fsm
D Flip-Flop: Captures input (D) on clock edge.
T Flip-Flop: Toggles state on each clock pulse.
JK Flip-Flop: More complex behavior based on J and K inputs.
why do we use Synchronous Reset, and what does it do
it sets output Q to 0 on the next clock edge. Use: Initialize state during power-up (turned on)
Asynchronous Reset:
Action: Sets output (Q) to 0 immediately, independent of the clock. Use: Immediate initialization; critical for timing-sensitive circuits.
What are the main components of FSM implementation architecture?
State register, next state logic, and output logic.
What is a Moore FSM?
An FSM where outputs depend only on the current state.
What is a Mealy FSM?
An FSM where outputs depend on both the current state and inputs.
Q: What is a key advantage of a Mealy FSM over a Moore FSM?
A: Mealy FSMs can have fewer states because outputs can change based on inputs without waiting for a state transition.
Q: What is a potential drawback of a Mealy FSM?
A: Outputs can change mid-cycle, which may lead to less predictable timing.
key difference from moore to mealy