The document discusses Finite State Machines (FSMs), distinguishing between combinational circuits and sequential circuits, with FSMs being a type of sequential circuit that has memory and depends on both current and past inputs. It outlines the two main types of FSMs: Mealy machines, where outputs depend on both state and input, and Moore machines, where outputs depend only on the current state. Additionally, it covers the roles of data paths and controllers in digital systems, emphasizing their functions in processing and managing data operations.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
13 views44 pages
Module 4 FSM
The document discusses Finite State Machines (FSMs), distinguishing between combinational circuits and sequential circuits, with FSMs being a type of sequential circuit that has memory and depends on both current and past inputs. It outlines the two main types of FSMs: Mealy machines, where outputs depend on both state and input, and Moore machines, where outputs depend only on the current state. Additionally, it covers the roles of data paths and controllers in digital systems, emphasizing their functions in processing and managing data operations.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 44
Finite State Machines
A combinational circuit is a logic circuit whose
output depends only on the current input values — there's no memory. Key Characteristics: ◦ No clock ◦ No memory/storage Output is updated immediately when input changes Examples: ◦ Adders ◦ Multiplexers ◦ Encoders/Decoders ◦ Logic gates (AND, OR, NOT...) A sequential circuit is a logic circuit whose output depends on current input AND past inputs (i.e., it has memory). Key Characteristics: ◦ Has memory elements (flip-flops/latches) ◦ Depends on a clock ◦ Stores state Examples: ◦ Counters ◦ Registers ◦ Shift registers ◦ FSMs FSM is a type of sequential circuit because: ◦ It stores state (memory of past input history) ◦ It updates the state based on: The current input The current state ◦ It usually transitions on a clock edge Quick Analogy FSM can be represented using: ◦ State Diagram ◦ Transition Table (also called State Table) A Circuit to detect 3 or more 1’s There are two main types of Finite State Machines (FSMs) used in digital design: ◦ Mealy Machine ◦ Moore Machine A Moore machine is a type of Finite State Machine (FSM) where the outputs depend only on the current state, not on the input. It’s a special case of FSM where the output remains stable until the system moves to a new state A Moore machine is defined by a 6-tuple: ◦ M=(Q,Σ,Δ,δ,λ,q0) Q: Finite set of states Σ: Input alphabet (set of input symbols) Δ: Output alphabet (set of output symbols) δ: State transition function δ: Q × Σ → Q λ: Output function λ: Q → Δ (depends on state only) q₀: Initial state (start state) There are three lamps RED, GREEN and YELLOW. That should go cyclically with a fixed time interval. Some observations The FSM will have three states, corresponding to the glowing states of the lamp The input set is null, state transition will occur whenever clock signal comes This is a Moore machine, since the lamp that will glow only depends on the state and not on the input Design of a serial parity detector ◦ A Continuous stream of bits is fed to a circuit in synchronism with a clock. The circuit will be generating a bit stream as output, where a 0 will indicate “even number of 1’s seen so far” and a 1 will indicate “odd number of 1’s seen so far” ◦ Also a Moore machine Design of a sequence detector A circuit accepts a serial bit stream “x” as the input and produces a serial bit stream “z” as output Whenever the bit pattern “0110” appears in the input stream, it outputs z=1; at all other times, z=0. Overlapping occurrences of the patterns are also detected. ◦ This is a mealy machine Mealy Machine (Output depends on state + input) MOORE Machine – Output depends only on state We will create states to remember the progress of pattern detection: Introduction to Data path and Controller Design ◦ Data path and Controller are the two essential components in a digital system that works together to perform operations, particularly in processors. ◦ Data path refers to the hardware components that are used to store, process, and move data. ◦ Controller directs the operation of the data path by generating control signals. The Role of Data path ◦ The data path is responsible for the execution of data operations (arithmetic, logic, memory access). ◦ The components of the data path include: Registers: Store data temporarily. Arithmetic Logic Unit (ALU): Performs operations like addition, subtraction, and comparison. Multiplexers (MUX): Choose between different inputs based on control signals. Buses: Carry data between registers, ALU, and other components. Memory: Stores data and instructions. Shifters: Perform shift operations (left or right shifts). The Role of Controller ◦ The controller manages the operation of the data path by sending control signals. ◦ Control Signals direct the data path to perform specific operations at each clock cycle. These signals control: Which registers are selected for reading or writing. The operation the ALU should perform. When data should be written back into registers or memory. In a memory read operation, data is fetched from a specific memory address and transferred to a register or processing unit. This operation involves two main components: Data Path (What physically carries the data) Control Path (What controls the flow of operation)