3.5.6 · D1HDL & Digital Design Flow

Foundations — RTL (register transfer level) design

1,960 words9 min readBack to topic

This page assumes you have seen nothing. We build every word the parent RTL note leaned on, one brick at a time, each brick resting on the last.


0. Bit, wire, and value — the atoms

Why does the topic need this? Every register and every logic output is ultimately a bundle of these on/off wires. When the parent writes [7:0] acc it means "a bundle of 8 bits, numbered 7 down to 0."

Figure — RTL (register transfer level) design

Look at the figure: each switch has a weight printed below it (). Add up the weights of the switches that are ON — that sum is the number the bus holds. This is why 8 bits can count from to .


1. Combinational logic — a machine with no memory

Why does the topic need this? The parent's (next-state logic) and (output logic) are built entirely from combinational logic. When you write sum = a + b, an adder made of these gates is what actually appears in silicon. See Combinational logic design for the full gate zoo.

This delay is the whole reason the clock cannot go infinitely fast, which we reach in §4.


2. A register — a box that remembers

Figure — RTL (register transfer level) design

In the figure the blue staircase is Q. Notice it only steps at the tall clock ticks, and it steps to whatever D was at that instant — ignoring everything D did in between. That "sample and hold" behaviour is the entire definition of memory in RTL. Deep dive: Sequential logic and flip-flops.


3. The clock — the shared drumbeat

Why the topic needs it: the parent's whole timing law () is a statement about fitting the work between two drumbeats. See Clock domains and metastability for what happens when signals cross between different drumbeats.


4. The three timing symbols — earned before they are used

The parent hits you with , , . Here is each, from zero, tied to the whistle-and-camera picture.

Figure — RTL (register transfer level) design

Read the figure left to right: the shaded "keep-out" zone straddles the edge — before it and after it. Data is only allowed to change outside that zone. This one picture is why both of the parent's timing inequalities exist.


5. State, next-state, and the tuple

This tuple is the formal skeleton of a finite state machine, and the whole synthesis flow (Logic synthesis) is about turning and into real gates.


6. How the foundations feed the topic

Bit and bus

Combinational logic

Register D flip flop

Clock and edge

Next state delta and output lambda

Timing tcq tsetup thold

RTL design

Verilog code posedge clk

Read top to bottom: bits build both logic and registers; the clock drives registers and sets timing; logic plus registers form the machine; that machine plus timing is RTL, which you finally write as Verilog. Later chapters — Static Timing Analysis and Pipelining — grow directly out of the §4 timing box.


Equipment checklist

Self-test: cover the right side and answer before revealing.

What is a bit, physically?
A single wire held at one of two voltages, read as 0 (low) or 1 (high).
What does [7:0] mean in Verilog?
A bundle of 8 wires, bit 7 the most significant (weight 128) down to bit 0 (weight 1).
Define combinational logic in one sentence.
Gates whose output depends only on the present inputs, with no memory of the past.
What is propagation delay ?
The small time a gate/logic path takes to settle to its correct output after an input changes.
State the single rule of a D flip-flop.
On the clock edge, copy D into Q; between edges, hold Q frozen.
What is a rising (posedge) clock edge?
The moment the clock wire flips from 0 to 1, when all registers sample their D inputs.
How are period and frequency related?
They are reciprocals: ; e.g. gives .
What does measure?
The delay after the edge before Q shows the newly captured value.
What must be true during the setup window ?
D must be stable and unchanging for that long before the edge, or capture is unreliable.
What must be true during the hold window ?
D must stay stable for that long after the edge, or the box latches garbage.
Write the setup timing inequality with every term named.
— leave, travel, arrive-early, all inside one period.
What are and ?
= all stored register values at step ; = external inputs at step .
What do and compute?
= next state ; = outputs .