FREE — INTERVIEW QUESTIONS

RTL design interview questions, with Verilog answers, solved problems and a real code review

90+ free RTL questions on what interviewers actually ask: blocking vs non-blocking, latches, resets, FSMs, FIFOs, clock dividers, arbiters, timing, CDC and synthesis. Includes 18 worked answers with code, 8 solved problems, a buggy module reviewed line by line, a FIFO depth calculator and a rapid-fire round.

550+ RTL Design Interview Questions ebook cover
RTL DESIGN EBOOK · 550 QUESTIONS · 11 CHAPTERS

Get all 550 RTL questions, including 100 coding problems

A questions-only bank from Verilog basics to debugging and real scenarios, built to make you answer and code, not just read.

INSTANT PDF DOWNLOAD · 8 FREE PREVIEW PAGES
See the ebook

RTL design interviews check one thing above all: when you write Verilog, do you see the hardware it becomes? Every follow-up comes from there. Why did that if make a latch? Which signal is the flop? What happens on the cycle after reset? What does this look like after synthesis, and will it meet timing?

Start with the formula sheet and the table of what synthesis builds, skim the 50 questions by topic, then work through the worked answers and solved problems with a simulator open. Finish with the code review: finding bugs in someone else's RTL is a favourite senior-round exercise.

HOW IT'S ASKED

Three levels of an RTL design interview

LEVEL 1

Language & building blocks

Blocking vs non-blocking, wire vs reg, latches, sync vs async reset, MUXes, encoders, counters, Moore vs Mealy. Short questions, but every one has a "why" behind it.

LEVEL 2

Write it live

An edge detector, a divide-by-3 clock, a sync FIFO, a sequence detector, a round-robin arbiter. They watch how you handle reset, corner cases and the cycle-by-cycle behaviour.

LEVEL 3

Timing, CDC & debug

"Simulation passes but gates fail", "it misses 500 MHz", "data corrupts across clocks", "synthesis reports latches". They want a method: what you'd check, in what order, and why.

HOW TO ANSWER

Six habits of strong RTL answers

01

Draw before you type

Sketch the registers, the logic between them and the clock. Code written from a block diagram is shorter, cleaner and easier to defend.

02

Keep flops and logic apart

Clocked blocks with <= for registers, always @(*) or assign for logic. Mixing them is where most interview bugs start.

03

Say your reset

Sync or async, active high or low, which registers need it and how it's released. Interviewers notice when reset is an afterthought.

04

Walk the corner cases

Full and empty at the same time, counter wrap-around, back-to-back requests, the first cycle after reset. Say them before you're asked.

05

Think like the synthesis tool

What will this infer: flops, a latch, a priority chain, a RAM, a multiplier? How deep is the logic between registers?

06

Say how you'd verify it

One sentence on the test (the corner cases, an assertion, a waveform you'd check) turns a correct answer into a convincing one.

FORMULA SHEET

The RTL numbers interviewers expect you to work out

Design questions often hide a small calculation: a width, a depth, a frequency or a failure rate.

MAX FREQUENCYTmin = tcq + tlogic + tsu − skew · fmax = 1 / TminSkew here is capture minus launch clock arrival; positive skew helps setup and hurts hold.
HOLD CHECKtcq + tlogic,min ≥ th + skew · the clock period doesn't appear
COUNTER WIDTHbits = ⌈log2(N)⌉ for a mod-N counter (0 to N−1)
CLOCK DIVIDERdivide by even N: toggle every N/2 cycles · odd N with 50% duty: OR a posedge and a negedge version
GRAY CODEg = b ^ (b >> 1) · bi = gi ^ bi+1, starting from the MSB
FIFO DEPTHdepth ≥ burst − words read during the burst · burst time = burst × write gap / fwr
FIFO POINTERSpointer width = log2(depth) + 1 · the extra MSB tells full from empty
FSM FLOPSbinary or Gray: ⌈log2(S)⌉ · one-hot: S · Johnson: ⌈S/2⌉
MTBFMTBF = etr/τ / (T0 · fclk · fdata)Each extra synchroniser stage adds roughly one clock period to the resolution time tr.
PIPELININGT = tlogic/k + tcq + tsu · throughput = 1 result per cycle · latency = k cycles
POWERPdyn = α·C·V2·f · clock gating cuts α on idle registers
TRY IT

FIFO depth estimator

Worst-case burst from the writer, steady draining by the reader. Works for sync or async FIFOs.

BURST TIME–
READ DURING BURST–
MINIMUM DEPTH–
POWER-OF-2 DEPTH–

 

WHAT SYNTHESIS BUILDS

Your code, and the hardware it turns into

"What does this infer?" is behind half of all RTL questions. Know the pattern, the result, and the trap.

YOU WRITESYNTHESIS INFERSWATCH OUT FOR
always @(posedge clk) with <=Flip-flops (one per bit assigned)Blocking = here can merge or reorder registers
always @(*), every output assigned on every pathCombinational logicReading a signal it also drives: a combinational loop
always @(*) with a missing else or defaultA latchTiming that's hard to analyse, glitches, lint warnings
A long if / else if chainA priority encoder feeding a MUXDepth grows with each branch; use case if branches are exclusive
case on a select signalA parallel MUXOverlapping items still create priority
A reg array with a clocked readBlock RAM (on FPGA) or a memory macroA reset on the array or an async read prevents RAM inference
a * b, a + bMultiplier (or DSP block), adderResult width: let a sum grow one bit, a product to the sum of widths
A for loopReplicated hardware, fully unrolledIt's not a loop in time; a 64-iteration loop is 64 copies
initial, #5 delaysNothing (ASIC); init values only on some FPGAsSimulation that only works because of delays
BROWSE BY TOPIC

50 RTL design interview questions across 10 topics

A sample of what RTL interviewers ask most. The 550-question ebook covers every topic in much more depth, with 100 coding problems.

RTL & the Design Flow

Where RTL sits, and what it hands on.

  • What does "register transfer" describe, in hardware terms?
  • Where does RTL sit between specification and gate-level netlist?
  • Which parts of a Verilog file never become hardware?
  • How does RTL written for an FPGA differ from RTL for an ASIC?
  • What does an RTL designer hand to synthesis besides the code?

Verilog Language

The constructs that turn into circuits.

  • When must a signal be declared reg, and does that make it a register?
  • What's the difference between parameter, localparam and `define?
  • How do signed and unsigned operands change the result of an addition?
  • What is a generate block, and when would you use one?
  • Which is synthesisable: a task, a function, or both?

Assignments & Always Blocks

The source of most simulation surprises.

  • Why does using = in a clocked block risk a race?
  • What does an incomplete sensitivity list do in simulation vs synthesis?
  • Can one signal be assigned from two always blocks?
  • What is the difference between assign and a procedural assignment?
  • Why is always @(*) preferred over a hand-written list?

Sequential Logic & Reset

Flops, enables, counters and reset strategy.

  • How do you code a flop with an enable, and what does it synthesise to?
  • What are the pros and cons of synchronous and asynchronous reset?
  • Why is reset assertion asynchronous but deassertion synchronised?
  • Which registers in a datapath don't need a reset at all?
  • How does a ring counter differ from a Johnson counter?

Combinational Logic

MUXes, encoders and arithmetic.

  • How do you build a 4:1 MUX from 2:1 MUXes, and in Verilog?
  • What's the difference between an encoder and a priority encoder?
  • How do you code an N-bit comparator without writing every bit?
  • How many bits does the sum of two 8-bit numbers need?
  • What decides whether you get a ripple-carry or a faster adder?

FSM Design

States, encodings and coding styles.

  • When would you pick a Mealy machine over a Moore machine?
  • Why register FSM outputs, and what does it cost?
  • How do you choose between binary, Gray and one-hot encoding?
  • What happens if an FSM lands in an unused state?
  • Design a detector for the sequence 1011, overlapping allowed.

Coding Classics

The blocks you'll be asked to write.

  • Write a synchronous FIFO with full and empty flags.
  • Write a divide-by-3 clock with a 50% duty cycle.
  • Write a rising-edge detector that outputs a one-cycle pulse.
  • Write a round-robin arbiter for four requesters.
  • Write a parameterised single-port RAM with a synchronous read.

Timing

What your RTL does to the critical path.

  • How does your RTL decide the maximum clock frequency?
  • How would you change RTL to fix a setup violation?
  • Why doesn't lowering the frequency fix a hold violation?
  • What is a multicycle path, and how do you tell the tools?
  • Why should you never generate a clock from a counter output directly?

Clock Domain Crossing

Data that moves between clocks.

  • What is metastability, and why can't it be eliminated?
  • How does a two-flop synchroniser help, and when isn't it enough?
  • How do you pass a one-cycle pulse from a fast to a slow clock?
  • Why are async FIFO pointers passed in Gray code?
  • What is reset domain crossing, and how can it fail?

Synthesis & Debug

From RTL to netlist, and back when it breaks.

  • What does resource sharing do, and when does it hurt timing?
  • Why might a memory not be inferred as a RAM block?
  • What causes simulation and synthesis to disagree?
  • A signal is X for the whole simulation. Where do you look first?
  • What do lint and CDC tools catch that simulation misses?

These are samples. The full bank has 550 questions.

11 chapters from Verilog basics to scenarios, including 100 write-the-RTL problems and 50 debugging and scenario questions. Questions only, so you practise producing answers.

See the full question bank
N1 · MAX FREQUENCYBEGINNERtcq = 0.4 ns, logic = 3.2 ns, tsu = 0.3 ns, and the capture clock arrives 0.1 ns after the launch clock. What is fmax?Show solution ↓
T_min = 0.4 + 3.2 + 0.3 − 0.1 = 3.8 ns
f_max = 1 / 3.8 ns ≈ 263 MHz

Note: the positive skew helped setup by 0.1 ns, but it also makes the hold check 0.1 ns harder.

N2 · FIFO DEPTHINTERMEDIATEA writer at 200 MHz sends a 120-word burst, one word per cycle. The reader runs at 100 MHz and reads one word every 2 cycles. What depth is needed?Show solution ↓
Burst time      = 120 / 200 MHz = 600 ns
Read rate       = 100 MHz / 2 = 50 M words/s
Read in 600 ns  = 600 ns × 50 M/s = 30 words
Minimum depth   = 120 − 30 = 90 words
Async FIFO      → round up to 128, pointers 8 bits

Note: add a few words for the synchroniser delay on the flags. The calculator above shows the same numbers.

N3 · COUNTER WIDTHBEGINNERYou need a mod-60 counter for seconds. How many flops, and what is the terminal count?Show solution ↓
2^5 = 32 < 60 ≤ 64 = 2^6  →  6 bits
Counts 0 … 59; wrap to 0 when count == 59

Note: compare against 59, not 60. Comparing against 60 gives a mod-61 counter.

N4 · GRAY CODEBEGINNERConvert binary 1011 to Gray, and Gray 0110 back to binary.Show solution ↓
Binary → Gray:  1011 ^ 0101 = 1110
Gray → binary:  b3 = 0
                b2 = 1 ^ 0 = 1
                b1 = 1 ^ 1 = 0
                b0 = 0 ^ 0 = 0   → 0100 (4)

Note: check by going forward again: 0100 ^ 0010 = 0110.

N5 · MTBFADVANCEDfclk = 500 MHz, fdata = 50 MHz, τ = 20 ps, T0 = 100 ps. A single flop leaves 0.4 ns to resolve. What is the MTBF, and what does a second flop add (1.8 ns more)?Show solution ↓
Denominator = 100 ps × 500 MHz × 50 MHz = 2.5 × 10^6 /s
One flop:   t_r/τ = 0.4 / 0.02 = 20
            MTBF  = e^20 / 2.5e6 ≈ 4.85e8 / 2.5e6 ≈ 194 s
Two flops:  t_r/τ = 2.2 / 0.02 = 110
            MTBF  = e^110 / 2.5e6 ≈ 2.4 × 10^41 s

Note: a failure every three minutes becomes effectively never. That exponential is why the second flop is standard.

N6 · PIPELININGINTERMEDIATEA path has 8 ns of logic; flop overhead (tcq + tsu) is 0.5 ns. You split it into 4 equal stages. Compare frequency, throughput and latency.Show solution ↓
Before:  T = 8 + 0.5 = 8.5 ns  → 117.6 MHz, latency 8.5 ns
After:   T = 2 + 0.5 = 2.5 ns  → 400 MHz
         throughput 400 M results/s (3.4×)
         latency = 4 × 2.5 = 10 ns

Note: throughput goes up 3.4×, not 4×, because each stage pays the flop overhead; latency gets slightly worse.

N7 · FSM ENCODINGBEGINNERAn FSM has 12 states. How many flops for binary, Gray, one-hot and Johnson encoding?Show solution ↓
Binary:  ⌈log2 12⌉ = 4
Gray:    4
One-hot: 12
Johnson: 12 / 2 = 6

Note: one-hot uses 3× the flops but each next-state equation looks at only a few bits, which is why FPGAs often default to it.

N8 · CLOCK DIVIDERINTERMEDIATEGenerate a 1 Hz square wave from a 50 MHz clock. What terminal count, and how many counter bits?Show solution ↓
Half period = 0.5 s × 50 MHz = 25,000,000 cycles
Count 0 … 24,999,999, then toggle and restart
2^24 = 16.8 M < 25 M ≤ 33.6 M = 2^25  →  25 bits

Note: for logic inside the chip, a one-cycle enable every 50,000,000 cycles is safer than using the toggled signal as a clock.

// pkt_bytes.v — accumulate len per beat, report on last beat
module pkt_bytes (
  input             clk, rst_n, valid, last,
  input      [7:0]  len,
  output reg [15:0] bytes,
  output reg        done);

  reg [15:0] acc;

  always @(posedge clk or negedge rst_n)
    if (!rst_n) acc = 0;                         (1)
    else if (valid) begin
      acc = acc + len;                          (1)
      if (last) bytes = acc;                     (2)
    end                                     // acc never cleared  (3)

  always @(*)
    if (valid && last) done = 1'b1;           (4)

  always @(posedge clk)
    if (last) bytes <= 0;                       (5)
endmodule
  1. Blocking assignments in a clocked block. The result depends on statement order, and any other block reading acc on the same edge races with this one.
  2. bytes is written here, with a blocking assignment that sees the already-updated acc. Whether the last beat is included depends on statement order, not on intent.
  3. acc is never cleared at the end of a packet, so the second packet's total includes the first.
  4. done has no else in a combinational block: a latch that goes to 1 and never comes back.
  5. bytes is also driven from a second always block: multiple drivers. Synthesis will error out; simulation will pick a winner by chance.
Which bug would you mention first?

The multiple drivers on bytes (5): it's a hard synthesis error and a sign the author doesn't think of each register as one flop with one source. Then the latch (4), which is a functional bug every cycle after the first packet, then the blocking assignments.

What does the fixed version look like?

One clocked block owns every register, using <=, and the total includes the last beat explicitly:

Is a 16-bit accumulator enough?

Only if packets are at most 65,535 bytes: 258 beats of 255 bytes already overflow it. Ask for the maximum packet length, size acc from it with a parameter, or add an overflow flag.

How would you prove the fix?

A testbench with back-to-back packets, a one-beat packet (valid and last together), gaps in valid, and reset in the middle of a packet; plus an assertion that done is high for exactly one cycle per last beat. The ebook has full chapters of coding, debugging and scenario questions like this.

Which assignment goes in a clocked block?

Non-blocking (<=).

Sensitivity list for combinational logic?

always @(*), or always_comb in SystemVerilog.

A combinational if with no else infers?

A latch.

Flops for a one-hot 8-state FSM?

8.

Flops for a binary 8-state FSM?

3.

Gray code of binary 0111?

0100.

Bits for a mod-100 counter?

7.

Is an initial block synthesisable for ASIC?

No. Some FPGAs use it for power-up values.

What does synthesis do with #10?

Ignores it.

A Moore output depends on?

The current state only.

A Mealy output depends on?

The current state and the inputs.

Which reset works without a clock?

Asynchronous.

Safe way to release an async reset?

Synchronise the deassertion with a reset synchroniser.

Standard fix for a single-bit CDC?

A two-flop synchroniser.

Why Gray pointers in an async FIFO?

Only one bit changes per increment.

Does a slower clock fix hold?

No. Hold doesn't depend on the period.

What does === compare?

Values including X and Z. Simulation only.

A for loop in RTL becomes?

Replicated hardware, fully unrolled.

What type does assign drive?

A net, such as a wire.

Why the extra FIFO pointer bit?

To tell full from empty.

COMMON MISTAKES

What costs candidates the most in RTL rounds

×

Writing software, not hardware

Loops that "run", variables reused for different things, sequential thinking inside one cycle. Every line should map to something you could draw.

×

Mixing blocking and non-blocking

Blocking in a clocked block, or both styles on one signal. It may simulate, but it won't behave or synthesise the way you think.

×

No defaults in combinational blocks

One missing branch is a latch. Assign every output at the top of the block, every time.

×

Reset as an afterthought

Code that only works after a lucky first cycle. Say which registers reset, to what, and how reset is released.

×

Skipping the corner cases

Read and write together when full, a counter at its last value, two requests on the same cycle. Interviewers wait for you to bring them up.

×

Making clocks out of logic

A counter output or an AND gate used as a clock creates skew, glitches and timing nobody constrained. Use clock enables.

QUICK FAQ

Before you start preparing

What do RTL design interviews focus on?

Whether you can write correct, synthesisable Verilog and explain the hardware it becomes: assignments and latches, resets, FSMs, FIFOs and other building blocks, then timing, clock domain crossing, synthesis and debugging for experienced candidates.

Verilog or SystemVerilog?

Most RTL rounds accept either. Verilog is the baseline; knowing the SystemVerilog design features (logic, always_ff, always_comb, enums, interfaces) is a plus. Verification features like classes and randomisation belong to DV rounds.

How much live coding should I expect?

Almost always some. Expect one or two small blocks (a counter, an edge detector, an FSM, a FIFO) on a whiteboard or shared editor, usually followed by questions about corner cases and what synthesis builds.

Do I need an FPGA board to prepare?

No. A free simulator such as Icarus Verilog or Verilator with a waveform viewer is enough to write, test and debug every block on this page. A board helps if you're targeting FPGA roles.

What should a fresher prepare first?

Blocking vs non-blocking, latches, flip-flops and resets, MUXes and encoders, counters and shift registers, Moore and Mealy FSMs, then a sync FIFO and setup and hold. After that: CDC basics and synthesis.

How is RTL design different from verification as a role?

RTL designers write the hardware description and own its correctness, timing and area. Verification engineers build testbenches to prove it works. Each interview touches the other's basics, but design rounds go deeper on synthesisable coding and microarchitecture.

Want to be tested on these live?

Book a 1:1 mock interview with a mentor working in this exact domain.

Book a mock interview