Module

Module 7: Advanced RTL Design Techniques

25 lessons
Start

Module 5 introduced behavioral modeling constructs and Module 6 introduced self-checking testbenches. Writing functional RTL code is the first step in digital engineering. Module 7 teaches the techniques required to prepare designs for physical implementation.

Hard-coded bit widths prevent code reuse across projects. Long combinational datapaths fail timing closure at high clock frequencies. Single-clock FIFOs corrupt data when connected across asynchronous clock boundaries. Circuits that toggle flip-flops unnecessarily fail power consumption budgets. This module covers standard industry patterns that solve these implementation challenges.

Module 7 at a glance
Figure 1: Module 7 at a glance

Sections 7.1 and 7.2 teach scalable RTL through parameters, generate blocks, signed arithmetic, and saturation logic. Section 7.3 covers datapath pipelining to achieve target clock periods. Section 7.4 implements synchronous and asynchronous First-In, First-Out (FIFO) memories using Gray code pointers. Section 7.5 establishes formal Clock Domain Crossing (CDC) synchronization protocols. Section 7.6 details low-power architectural techniques for battery-powered systems.

Hardware Designs Implemented in This Module

Design Component Section Core Technical Concepts
Parameterized memory model 7.1 Width-configurable RTL using parameter and generate
Saturating signed adder 7.2 Signed arithmetic rules and overflow saturation logic
Two-stage pipelined multiplier 7.2 / 7.3 Segmenting long combinational paths with registers
Multiply-accumulate (MAC) unit 7.3 Multi-stage datapath pipelining and valid-flag propagation
Synchronous FIFO memory 7.4 Full and empty flag generation using circular pointers
Gray-code pointer synchronizer 7.4 / 7.5 Multi-bit CDC signal transmission without race conditions
Asynchronous FIFO memory 7.4 Safe cross-clock domain data buffering
Two-flop synchronizer 7.5 Single-bit CDC metastability resolution
Multi-bit handshake synchronizer 7.5 Request and acknowledge cross-domain handshaking
RTL-inferred clock gating 7.6 Integrated clock gating cell inference

Every design includes an accompanying self-checking testbench.

Section Objectives

Section Learning Objectives
7.1 Parameterized Modules Write width-scalable RTL with parameter and instantiate conditional hardware with generate.
7.2 Arithmetic in RTL Apply the signed keyword correctly, implement saturation logic, and isolate long paths.
7.3 Pipeline Design Insert pipeline register stages, propagate valid signals, and handle stalls.
7.4 FIFOs Build synchronous FIFOs, implement Gray code conversion, and build asynchronous FIFOs.
7.5 Clock Domain Crossing Implement two-flop synchronizers, design multi-bit handshakes, and fix CDC lint violations.
7.6 Low-Power Design Infer clock gates, apply power gating architectures, and implement operand isolation.

Estimated Study Time

Section Articles Total Estimated Time
7.1 Parameterized Modules 4 ~48 minutes
7.2 Arithmetic Circuits in RTL 4 ~52 minutes
7.3 Pipeline Design 4 ~56 minutes
7.4 FIFOs 5 ~72 minutes
7.5 Clock Domain Crossing 4 ~56 minutes
7.6 Low-Power Design Techniques 4 ~44 minutes
Total 25 ~328 minutes

Section 7.1 begins with parameterized module design. Start with 7.1 Parameterized and Scalable Modules.

In this module

01 Why Parameterize Everything 4 min 02 generate if and generate case 4 min 03 A Parameterized Memory Model 4 min 04 A Width-Configurable ALU 3 min 05 Signed Arithmetic Pitfalls 4 min 06 Saturating Arithmetic 3 min 07 Pipelining a Wide Adder 4 min 08 Pipelining a Multiplier 4 min 09 Balancing an N-Stage Pipeline 3 min 10 Inserting a Pipeline Stage into Existing Logic 3 min 11 Stalls and Bubbles 3 min 12 A Pipelined Multiply-Accumulate Unit 5 min 13 Why Every Design Has a FIFO in It 3 min 14 The Synchronous FIFO and the Full/Empty Problem 4 min 15 Gray Code Pointers 3 min 16 The Asynchronous FIFO 4 min 17 Verifying an Asynchronous FIFO 4 min 18 Metastability and MTBF 3 min 19 The Two-Flop Synchronizer as a Module 3 min 20 The Request/Acknowledge Handshake 4 min 21 CDC Lint and the Mistakes It Catches 3 min 22 Clock Gating and the ICG Cell 3 min 23 Power Gating 3 min 24 Operand Isolation 3 min 25 Activity-Aware Design 3 min