Module

Module 3: Sequential Circuit Design

32 lessons
Start

Combinational logic circuits compute outputs based strictly on present input values. A combinational circuit cannot store past events or retain operational history. When an application requires memory—such as counting button presses, executing multi-step protocols, or tracking processor program counters—the system requires sequential logic. Module 3 examines digital circuits that store and update internal state across time.

State and the Memory Hierarchy

A computer differs fundamentally from a simple calculator. A computer executes sequential programs where each computational step depends on preceding operations. Hardware maintains this continuity through state:

  • Registers: Hold active datapath operands and intermediate variables.
  • Program Counter (PC): Points to the address of the current executing instruction.
  • Stack Pointer (SP): Preserves execution contexts during subroutine calls.

The fundamental physical unit of digital state is the flip-flop. A flip-flop stores one bit of binary data until updated by an active clock edge. Cascading flip-flops creates register files, pipeline stages, First-In First-Out (FIFO) buffers, and high-speed cache memories.

Architecture of a Sequential Circuit

A sequential circuit consists of two complementary subsystems (Figure 1):

Sequential circuit structure
Figure 1: Combinational logic and state registers in a feedback loop

  1. Combinational Next-State and Output Logic: Evaluates external inputs and the current state vector to calculate output signals and the next state vector.
  2. State Storage Registers: Parallel flip-flops capture the next state vector synchronously on active clock edges.
  3. Feedback Interconnect: Routes the registered current state back to the combinational logic inputs, allowing the circuit to maintain continuity across clock cycles.

Core Projects in Module 3

Module 3 guides the complete specification, synthesis, and simulation of three industrial sequential circuits:

  1. Traffic Light Controller: A multi-interval Finite State Machine (FSM) with timing countdown counters.
  2. Serial Pattern Detector: A sequence detector that asserts a flag upon detecting target pattern 1011 in a continuous serial bit stream.
  3. Vending Machine Controller: An interactive FSM that accepts coin inputs, tracks cumulative balances, dispenses products, and returns change.

Each project progresses from state transition diagrams to excitation tables and synthesizable Verilog code.

Section Breakdown

Table 1 details the technical sections of Module 3:

Section Title Primary Technical Topics
3.1 Latches and Flip-Flops Bistability, SR latches, D latches, edge-triggered D flip-flops, JK/T types, setup and hold timing.
3.2 Synchronous Design & Clocks Clock distribution networks, clock skew and jitter, hazards of asynchronous design, metastability.
3.3 Finite State Machines (FSM) Moore versus Mealy models, state transition diagrams, state assignment encoding, Verilog FSM templates.
3.4 Registers & Shift Registers Parallel-load registers, serial-in serial-out (SISO), universal shift registers, linear-feedback shift registers (LFSR).
3.5 Binary Counters Asynchronous ripple counters, synchronous binary counters, modulo-$N$ counters, up/down counters, Gray code counters.
3.6 Memory Arrays Register file design, Static RAM (SRAM) cell topologies, Dynamic RAM (DRAM), ROM arrays, and memory hierarchies.

Critical Timing Requirements: Setup, Hold, and Metastability

In combinational logic, propagation delay affects operational frequency, but not functional logic states. In sequential logic, timing directly determines logical correctness:

  • Setup Time ($t_{\text{setup}}$): The data input ($D$) must remain stable for a minimum duration before the active clock edge. Violating setup time causes internal transistor nodes to enter an undefined, non-binary state called metastability.
  • Hold Time ($t_{\text{hold}}$): The data input ($D$) must remain stable for a minimum duration after the active clock edge. Violating hold time causes the flip-flop to sample the new incoming value prematurely, corrupting the pipeline register. Hold time violations cannot be fixed by reducing the clock frequency.

Module 3 defines timing parameters rigorously and derives mathematical constraints to guarantee race-free synchronous operation.

Getting Started

Section 3.1 analyzes the physics of bistable feedback and single-bit memory storage.

Start with section 3.1: Latches and Flip-Flops

In this module

01 How Silicon Remembers 6 min 02 The SR Latch 6 min 03 The D Latch 5 min 04 The D Flip-Flop 5 min 05 JK and T Flip-Flops 5 min 06 Setup, Hold and Clock-to-Q 6 min 07 Synchronous and Asynchronous Design 5 min 08 Clock Signals and How They Are Distributed 6 min 09 The Synchronous Design Discipline 7 min 10 How Asynchronous Designs Fail 5 min 11 Metastability 7 min 12 What a State Machine Is 4 min 13 Moore and Mealy Machines 5 min 14 State Diagrams and State Tables 5 min 15 State Encoding 5 min 16 The FSM Design Flow 6 min 17 Worked Example: A Traffic Light Controller 5 min 18 Worked Example: A Serial Pattern Detector 5 min 19 Worked Example: A Vending Machine Controller 5 min 20 Registers 4 min 21 Shift Registers 4 min 22 Shift Register Applications 5 min 23 The Universal Shift Register 4 min 24 The Ripple Counter 4 min 25 Synchronous Counters 4 min 26 Modulo-N Counters 5 min 27 Up/Down, Gray, Johnson and Ring Counters 5 min 28 Counters at Work 4 min 29 Register Files 5 min 30 SRAM 5 min 31 DRAM and the Memory Hierarchy 6 min 32 ROM and Lookup Tables 6 min