Register-Transfer Level Design Explained (With Verilog)

By Arron R.11 min read
Register-transfer level design describes a digital circuit as registers that update on a clock edge plus the combinational logic between them. You write it in V

Register-transfer level design is the way almost every modern digital chip is written: you describe a circuit as a set of registers that update on a clock edge, plus the logic that computes what goes into them next. If you have ever wondered how a CPU, a GPU or a homebrew FPGA game console goes from an idea to working silicon, this is the layer where the real design work happens. This guide explains the concept in plain terms, walks through a working Verilog example built around a game, and shows where the abstraction fits, where beginners trip up, and how to prototype a hardware game before you write a line of RTL.

What is register-transfer level design?

A synchronous digital circuit is made of two kinds of parts. Registers are storage elements, usually D flip-flops, that capture a value on each clock edge and hold it until the next one. Combinational logic is everything else: gates, adders, comparators and multiplexers whose outputs depend only on their current inputs, with no memory. As the Wikipedia article on register-transfer level puts it, RTL models a circuit as the flow of data between hardware registers and the logical operations performed on that data.

So register-transfer level design means writing down, for every register in your circuit, what value it should load on the next clock edge. You do not draw transistors or individual gates. You write code in a hardware description language (HDL), a language for describing circuits rather than programs, such as Verilog or VHDL. A synthesis tool then works out which gates implement your description.

The name is literal. Data is “transferred” from register to register each clock cycle, transformed by logic on the way. If your design says “on every rising clock edge, the score register gets the score plus one when the ball crosses the goal line”, you have written a register transfer.

Why designers work at this level

Lower levels are too detailed to manage. A modern chip has billions of transistors, and nobody places them by hand. Higher levels, like pure algorithm descriptions, do not say enough about timing for a tool to build reliable hardware. RTL is the sweet spot: abstract enough for a person to reason about, precise enough that tools can turn it into a physical circuit. That is why it remains the normal input that chip designers work on, rather than an intermediate step hidden inside a compiler.

Registers, combinational logic and the clock

The core mental model of register-transfer level design fits in one loop. Registers output the current state. Combinational logic reads that state (and any inputs) and computes the next state. On the clock edge, the registers capture that next state. Repeat forever.

Registers hold state

Think of a register as a variable that can only change at one instant: the clock edge. Between edges it is frozen. This is what makes synchronous design predictable. As long as the logic finishes computing before the next edge arrives, the circuit behaves the same way every time.

Combinational logic computes

Every if, case, comparison and addition you write becomes physical logic. An if/else turns into a multiplexer, a component that picks one of two inputs. An addition becomes an adder circuit. All of it exists at once and computes continuously, which is the biggest difference from software.

Feedback and pipelines

Two circuit shapes appear constantly. When a register’s output feeds back into its own input through logic, you have a finite-state machine (FSM), a circuit that steps through defined states such as IDLE, SERVE, PLAY and GAME_OVER. When data flows forward through a chain of registers with no feedback, you have a pipeline, which splits a long computation into stages so each one fits inside a clock cycle.

If you make games, this loop will feel familiar. A game loop reads the current state, computes the next frame, and commits it. RTL does the same thing, except the “frame” might be a few nanoseconds long and every piece of logic runs in parallel.

Diagram of a register, its clock and the combinational logic feedback loop in RTL
Every RTL circuit is built from this loop: registers hold state, combinational logic computes the next state, and the clock edge commits it.

A register-transfer level design example in Verilog

The classic first project for hardware hobbyists is Pong on an FPGA, popularised by books such as Pong P. Chu’s FPGA prototyping series. Here is a small, complete Verilog module that moves a Pong ball horizontally and bounces it off two walls. It uses one register for position and one for direction.

module ball_x (
    input  wire       clk,   // system clock
    input  wire       rst,   // synchronous reset
    input  wire       tick,  // one-cycle pulse, once per video frame
    output reg  [9:0] x      // ball x position in pixels
);
    reg dir;                         // 0 = moving right, 1 = moving left
    localparam LEFT_WALL  = 10'd8;
    localparam RIGHT_WALL = 10'd624;
    localparam SPEED      = 10'd2;

    always @(posedge clk) begin
        if (rst) begin
            x   <= 10'd320;
            dir <= 1'b0;
        end else if (tick) begin
            if (dir == 1'b0) begin
                if (x >= RIGHT_WALL) dir <= 1'b1;
                else                 x   <= x + SPEED;
            end else begin
                if (x <= LEFT_WALL)  dir <= 1'b0;
                else                 x   <= x - SPEED;
            end
        end
    end
endmodule

Read it as register transfers. On each rising edge of clk, if a frame tick is active, x loads either x + 2 or x - 2, and dir flips when the ball reaches a wall. The <= operator is a non-blocking assignment: every register samples its new value at the same instant, which is exactly how real flip-flops behave.

Notice what a synthesis tool will build from this: a 10-bit register for x, a 1-bit register for dir, an adder, a subtractor, two comparators and some multiplexers to choose between them. You never drew any of those. That is the whole value of register-transfer level design.

The same logic as a software reference model

Hardware engineers usually write a software model of the expected behaviour first, then check the RTL against it in simulation. Here is the equivalent in JavaScript, one call per frame:

const LEFT_WALL = 8;
const RIGHT_WALL = 624;
const SPEED = 2;

let ball = { x: 320, dir: 0 }; // 0 = right, 1 = left

function onFrameTick(b) {
  // Compute the next state from the current state, like the RTL does
  const next = { ...b };
  if (b.dir === 0) {
    if (b.x >= RIGHT_WALL) next.dir = 1;
    else next.x = b.x + SPEED;
  } else {
    if (b.x <= LEFT_WALL) next.dir = 0;
    else next.x = b.x - SPEED;
  }
  return next; // "clock edge": commit the whole next state at once
}

for (let frame = 0; frame < 5; frame++) {
  ball = onFrameTick(ball);
  console.log(frame, ball.x, ball.dir);
}

Building the next state as a fresh object, then committing it, mirrors non-blocking assignment. If your simulator’s waveform for x matches this model frame by frame, your RTL is very likely correct.

Where RTL sits in the chip design flow

Register-transfer level design is one stage in a longer pipeline. Above it is system-level work: architecture, specifications and models that describe what the chip does without committing to clock-by-clock detail. Electronic system-level design covers that higher layer, including transaction-level modelling. Below RTL, tools take over and turn your code into gates, then into physical layout.

LevelWhat you describeWho or what produces it
System / transaction levelFunctions, data transfers between blocks, rough timingArchitects, often in C++ or SystemC
Register-transfer levelRegisters, clock-by-clock behaviour, logic between registersRTL designers, in Verilog, SystemVerilog or VHDL
Gate level (netlist)Specific logic cells and flip-flops and their connectionsLogic synthesis tool
Physical layoutPlacement and wiring on the chip or FPGA fabricPlace-and-route tools

Simulation tools run your RTL directly to verify it, which is far faster than simulating gates. Synthesis converts it into a netlist and performs logic optimisation along the way. Placement and routing then produce the layout for an ASIC (a custom chip) or a configuration file for an FPGA. Designers also estimate power and area at RTL, because changes made early, at the architecture and RTL stage, tend to matter far more than tweaks made late at the gate level.

RTL vs register transfer language vs FPGA

Three terms get mixed up constantly, so it is worth separating them.

  • Register-transfer level (RTL) is an abstraction level for describing hardware. When people say “RTL design” or “RTL code”, they mean synthesizable Verilog, SystemVerilog or VHDL written at this level.
  • Register transfer language is a notation for describing data moving between registers, such as R1 ← R2 + R3. Textbooks use it to explain how instructions execute inside a CPU, and some compilers use an internal representation by that name. The Wikipedia page on register transfer language covers both uses. It shares the idea of register-to-register flow but is not something you synthesize into a chip.
  • FPGA (field-programmable gate array) is a physical chip with reconfigurable logic blocks and routing. It is one target for your RTL, not a design method. The same RTL can go to an FPGA for prototyping and later to an ASIC for production.

A useful analogy for software people: RTL is source code, synthesis is the compiler, and the FPGA is one machine that can run the result. The analogy breaks down quickly (hardware is parallel, software is sequential), but it gets the roles right.

Pipeline from specification to RTL code, simulation, synthesis and FPGA or ASIC layout
RTL sits in the middle of the hardware flow: below the specification and above the gate-level netlist.

Common mistakes in register-transfer level design

Most beginner bugs come from writing RTL as if it were software. These are the ones that bite first.

  1. Accidental latches. In a combinational block (always @(*)), if some path through an if or case does not assign a signal, the tool infers a latch to remember the old value. Latches cause timing headaches. Give every output a default value at the top of the block.
  2. Mixing blocking and non-blocking assignments. Use <= in clocked blocks and = in combinational blocks. Mixing them inside one clocked block produces simulation results that may not match the synthesized hardware.
  3. Thinking sequentially. Two lines in a clocked block do not run “one after the other”. Every register updates at the same edge using the old values of every other register.
  4. Multiple clocks without care. Passing a signal between clock domains without a synchronizer leads to metastability, a state where a flip-flop briefly settles to neither 0 nor 1. Start with a single clock and add others only when you know how to cross them safely.
  5. Writing unsynthesizable code. Delays like #10, file reads and most loops with variable bounds work in a testbench but not in hardware. Keep testbench code and design code separate.
  6. Skipping the testbench. A design that “looks right” on an FPGA board can still fail on edge cases. Simulate against a reference model before you ever load a board.

Prototyping an FPGA game before writing RTL with WizardGenie

If your interest in register-transfer level design comes from wanting to build a game in hardware, such as Pong, Breakout or a tiny sprite engine, the hardest part is rarely the Verilog syntax. It is knowing exactly what the game should do, frame by frame, before you commit it to registers. Changing rules in RTL means re-simulating and re-synthesizing; changing them in software takes seconds.

That is where WizardGenie fits. It is the AI-native game engine inside Sorceress: you describe the game you want, and WizardGenie writes, runs and iterates on the code with you. A game engine normally handles the loop, rendering and input for you, which is exactly the scaffolding you want when the goal is to pin down game rules quickly.

A practical workflow

  1. Describe the hardware-friendly version of your game. Ask WizardGenie for Pong at a fixed resolution such as 640×480, integer positions, fixed ball speed and a simple state machine (serve, play, point scored). Avoid floating point and physics libraries, because your RTL will not have them.
  2. Iterate on the rules in the browser. Tweak paddle size, ball speed and scoring until it feels right. WizardGenie runs on the web with nothing to install, and as a Windows desktop app with native file access and longer agent sessions, which helps when you want the reference model saved straight into your project folder.
  3. Extract the state update as a pure function. Ask for the per-frame update to be written like the onFrameTick example above: current state in, next state out, integers only. That function is your golden reference model.
  4. Translate state into registers. Each field in the state object becomes a register. Each branch in the update function becomes combinational logic. The game states become your FSM.
  5. Verify the RTL against the model. Log the software model’s state for a few hundred frames and compare it to your simulator output.

WizardGenie works with the leading AI coding models, and you can switch models with your own API key, so you can use whichever model you find best at writing clean, integer-only game logic.

Graphics for a hardware game

FPGA games usually store sprites as small pixel-art bitmaps in on-chip memory. True Pixel (Pro) converts any image or video into pixel-art sprites and sprite sheets, with chroma keying, clean outlines and edge cleanup. If you need a character from scratch, Auto-Sprite v2 (Pro) generates game-ready 2D sprites in any art style. From there, a short script can convert the PNG into the memory initialisation format your FPGA toolchain expects. Keep the palette tiny, because every bit per pixel costs memory, and see how to scale pixel art without blurring if you need to upscale for a display. The full list of tools is in the Sorceress tools guide.

How to get into register-transfer level design

RTL design is a learnable skill, and you can get far with free simulators and a cheap development board. A sensible path looks like this:

  • Learn digital logic fundamentals. Boolean algebra, flip-flops, counters and finite-state machines. You cannot write good RTL without picturing the hardware it implies.
  • Pick one HDL. Verilog is shorter and closer to C; VHDL is more verbose and strongly typed. SystemVerilog extends Verilog and dominates verification work. Any of them teaches the same concepts.
  • Write small modules with testbenches. A counter, a button debouncer, a UART transmitter, a VGA timing generator. Every module gets a testbench and a waveform check.
  • Move to an FPGA board. Blink LEDs, then drive a VGA or HDMI display. Seeing your registers paint pixels is the moment RTL clicks for most people.
  • Build a complete project. A game is ideal because it combines an FSM, counters, video timing, input handling and memory in one design you can show off.
  • Read other people’s RTL. Open-source CPU cores and retro console recreations are excellent for learning style, naming and structure.

For a career, RTL design engineer roles usually expect solid knowledge of synthesis, timing analysis, clock domain crossing and verification, on top of HDL fluency. Portfolio projects on real hardware carry real weight.

The workflow at a glance

Register-transfer level design describes hardware as registers updated on a clock edge and the combinational logic between them. It sits below system-level modelling and above the gate-level netlist, and it is where most digital design work happens. The practical loop for a hobby project looks like this:

  1. Pin down the behaviour in software first, ideally as an integer-only, per-frame state update. WizardGenie is a fast way to do this for a game.
  2. Map each piece of state to a register and each decision to combinational logic, with an FSM for the game states.
  3. Write the RTL in Verilog or VHDL, using non-blocking assignments in clocked blocks and default values in combinational ones.
  4. Simulate against your reference model until the outputs match frame by frame.
  5. Synthesize, place and route, then load it onto an FPGA and play.

Get the behaviour right in software, then let register-transfer level design do what it does best: turn a clear, clock-by-clock description into real hardware.

Frequently Asked Questions

What is an RTL design?

An RTL design is a description of a synchronous digital circuit written in terms of registers, which store values and update on a clock edge, and the combinational logic that computes their next values. Engineers write it in a hardware description language such as Verilog or VHDL. It is detailed enough for a synthesis tool to turn into gates, but abstract enough that you never place individual transistors or wires by hand.

What is a register transfer language?

A register transfer language is a notation for describing data moving between registers, written in forms like R2 ← R1 + R3. Textbooks use it to explain how a processor executes instructions, and some compilers, notably GCC, use an internal representation called RTL. It is related to register-transfer level design in spirit, but it is a description notation, not the synthesizable hardware code you write in Verilog or VHDL.

Are RTL and FPGA the same?

No. RTL is a level of abstraction for describing hardware, while an FPGA is a physical chip full of reconfigurable logic blocks. You write RTL code, a synthesis tool converts it into a netlist, and place-and-route tools map that netlist onto the FPGA’s resources. The same RTL can also target an ASIC, a custom chip. Think of RTL as the source code and the FPGA as one possible machine it runs on.

How do I get into RTL design?

Start with digital logic basics: Boolean algebra, flip-flops and finite-state machines. Then learn Verilog or VHDL with a free simulator and write small modules such as counters, debouncers and UART transmitters, each with a testbench. Buy an inexpensive FPGA board and drive LEDs, then a VGA display. Building a small game like Pong is a classic project because it forces you to handle timing, state machines and video output together.

Is RTL design the same as programming?

It looks similar but behaves differently. Software runs statements one after another on a processor, while RTL describes hardware where every block operates in parallel on every clock cycle. An if statement in RTL becomes a multiplexer, and a register assignment becomes a flip-flop. Programmers who learn RTL usually struggle most with this parallel, clock-driven mental model, not with the syntax.

Sources

  1. Register-transfer level — Wikipedia
  2. Register transfer language — Wikipedia
  3. Electronic system-level design and verification — Wikipedia
  4. Game engine — Wikipedia
Written by Arron R.·2,645 words·11 min read

Related posts