← All articles
RTLVerilogSystemVerilogFSMPipelineInterviewDigital Design

RTL Design Interview Questions: Synchronous Logic, FSMs, Pipelining, and Common Bugs

RTL design interview questions covering synchronous logic style, FSM encoding, pipelining decisions, reset strategy, blocking vs. nonblocking assignments, and the RTL anti-patterns that fail code review.

November 22, 2026·12 min read

RTL design interviews are the technical centerpiece of most hardware engineering hiring loops. If verification interviews are about finding bugs, RTL interviews are about not writing them in the first place. This guide covers the questions that actually appear in RTL interviews — the ones that reveal how a candidate thinks about synchronous design, not just whether they can parse Verilog syntax.

For a preparation-oriented companion, see our RTL Design Interview Guide which covers the strategy and timeline of preparing for an RTL interview. This page focuses on the technical questions themselves.

What RTL interviews are really testing

An interviewer is looking for three signals:

  1. Does the candidate reach for synchronous patterns by default? When asked to debounce a switch or count edges, does their first instinct produce a clean synchronous design, or do they reach for level-sensitive latches and gated clocks?
  2. Do they understand why the canonical patterns exist? Reciting "use non-blocking assignments in always_ff" is table stakes. Explaining what race condition it prevents is the real signal.
  3. Can they reason about timing without a tool? If you draw their design and ask "what is your critical path?", can they answer by walking the logic?

Beginner-level RTL questions

Q1. What is the difference between blocking (=) and nonblocking (<=) assignments?

A blocking assignment executes immediately: the right-hand side is evaluated and the left-hand side is updated before the next statement in the same always block runs.

A nonblocking assignment schedules the update for the end of the current simulation time step: the right-hand side is evaluated immediately, but the left-hand side is not updated until all other statements in all always_ff blocks at this edge have evaluated their right-hand sides. This two-phase semantics prevents race conditions between parallel always_ff blocks.

The practical rule:

  • always_ff: use nonblocking. This models flip-flop behavior correctly across any number of parallel blocks.
  • always_comb: use blocking. This models combinational cascades correctly in a single block.

Mixing them is the fastest way to introduce simulation/synthesis mismatches that pass code review and fail in silicon.

Q2. Draw the hardware produced by this snippet.

always_ff @(posedge clk) begin
  if (rst)
    q <= 0;
  else if (en)
    q <= d;
end

A single D flip-flop with:

  • Synchronous reset (the if (rst) branch is evaluated on the clock edge)
  • An enable input (the else if (en) branch gates the data load)
  • The D input is d
  • The Q output is q

Equivalent to a standard DFF-with-sync-reset-and-enable cell, which most ASIC libraries expose directly.

Follow-up: what changes if rst is moved to the sensitivity list?

always_ff @(posedge clk or posedge rst) ...

Now the reset is asynchronous — the flop resets regardless of the clock. This is the "asynchronous reset" style, which has different implications for reset tree timing and recovery/removal constraints. Both styles are valid; teams pick one and stick with it. See the companion CDC interview questions for the asynchronous assert / synchronous de-assert pattern.

Q3. What is wrong with this latch inference?

always_comb begin
  if (sel)
    y = a;
end

When sel is 0, y is not assigned. In combinational logic, "not assigned" means "hold the previous value." That is not a wire — it is a level-sensitive latch. The synthesis tool infers a latch to implement the behavior.

Latches in a synchronous design are almost always a mistake. They create unpredictable timing paths, defy static timing analysis, and make hold-time closure hard.

Fix: always assign every output in every branch of an always_comb.

always_comb begin
  y = 0;         // default
  if (sel)
    y = a;
end

Or equivalently use an explicit else.

Most synthesis tools warn on inferred latches. Most lint tools block the commit outright.

Medium-difficulty RTL questions

Q4. Compare one-hot vs. binary FSM encoding. When do you use each?

Binary encoding uses ⌈log₂(N)⌉ flip-flops for N states. Pros: minimum flop count. Cons: state transitions can involve multiple simultaneous flip-flop toggles, making next-state logic combinational-heavy and potentially slow.

One-hot encoding uses N flip-flops, one per state. The next-state function for each flip-flop depends on only a small subset of the current state, so the combinational logic per flop is minimal. Trade-off: more flops.

When to use each:

  • One-hot on FPGA, where flops are cheap and LUT delay is the bottleneck. One-hot usually closes timing faster.
  • Binary on area-constrained ASICs where every flop costs millimeters of silicon. Also for very large state spaces (hundreds of states) where one-hot would exhaust the flop budget.
  • Gray encoding for state machines whose output decode is CDC-crossed to another domain, because adjacent states differ in only one bit.

Most modern synthesis tools auto-select based on state count and timing pressure — explicit control via a pragma (e.g., (* fsm_encoding = "one_hot" *)) overrides the tool.

Q5. Why would a designer choose a Mealy FSM over a Moore FSM?

Mealy outputs are a combinational function of state and input — they can respond to input changes within the same clock cycle. Moore outputs depend only on state — they lag an input change by one cycle.

Use Mealy when:

  • Latency matters more than output cleanness — a 1-cycle response advantage can be structural (e.g., responding to a read request in the same cycle the request arrives, not the next)
  • The handshake protocol specification requires it (AXI's RLAST on some implementations)

Use Moore when:

  • The output drives a downstream critical path, so you want it registered and clock-aligned
  • The input is glitchy (asynchronous or combinationally derived) — a Moore output filters glitches
  • You are crossing clock domains with the output — Moore outputs are always safe to register for CDC

The common pattern is a hybrid: most outputs Moore (registered, glitch-free), with one or two latency-critical paths Mealy (combinational, used only within the same clock domain).

Q6. Pipeline the following combinational block for 2x throughput. What are the latency and throughput trade-offs?

assign result = ((a * b) + c) ^ d;

Three natural pipeline stages: multiply, add, XOR.

reg [15:0] mul_r;
reg [15:0] mul_add_r;
reg [15:0] result_r;
 
always_ff @(posedge clk) begin
  mul_r      <= a * b;
  mul_add_r  <= mul_r + c;   // uses prev mul_r
  result_r   <= mul_add_r ^ d;
end
 
assign result = result_r;

Trade-off (important — "2x throughput" from pipelining comes entirely from Fmax improvement, not from more results per clock cycle):

  • Cycle-level throughput: still one result per cycle after warm-up — unchanged from the unpipelined version.
  • Fmax: the longest single pipeline stage now sets the clock period. In the unpipelined version it was T_mul + T_add + T_xor. Pipelined, it is max(T_mul, T_add, T_xor). If the multiply originally dominated at ~2× the sum of the other two, Fmax roughly doubles, and wall-clock throughput (results per second) doubles with it. That is where the "2x throughput" claim comes from.
  • Latency: 3 cycles from inputs to output (up from 0). Each result is produced 3 clock periods after its inputs arrive — but 3 results are in-flight simultaneously.
  • Area: three stages of registers; typically a small percentage of the total gate count of the arithmetic itself.

Follow-up: what if c and d arrive together but a and b arrive one cycle earlier? Then c must be held through an extra register to align with a*b, and d through two extra registers to align with the XOR stage. Pipeline balancing requires explicit skid registers on non-critical inputs.

Q7. A junior engineer wrote this. Code-review it.

always @(posedge clk) begin
  counter = counter + 1;      // bug 1
  if (counter == max)
    done = 1;                 // bug 2
end

Three issues:

  1. Blocking assignment in a sequential block (counter = counter + 1). Should be nonblocking. With blocking, if another always_ff block also reads counter at the same edge, which value does it see? The result is simulator-dependent and may not match post-synthesis hardware.
  2. done is set to 1 but never cleared. This is a latch-like behavior on a signal declared in a sequential block — it will hold done=1 forever after the first match. Is that the intent? If yes, OK; if done should pulse, the block is missing a clear path.
  3. No reset. The counter has no defined initial value. Simulation will show x; post-synthesis the flop will come up at whatever its power-on state is, which is tool-dependent.

Corrected:

always_ff @(posedge clk) begin
  if (rst) begin
    counter <= 0;
    done    <= 0;
  end else begin
    counter <= counter + 1;
    done    <= (counter == max);
  end
end

Advanced RTL questions

Q8. What is retiming and when does synthesis apply it?

Retiming moves flip-flops across combinational logic to balance pipeline stage delays, without changing the circuit's input-output behavior. If one stage has 2.5 ns of logic and the next has 0.8 ns, retiming moves a flip-flop backward through the fast stage into the slow one, equalizing both at ~1.65 ns and raising Fmax.

Synthesis tools apply retiming when:

  • The user explicitly enables it (e.g., retiming option in Vivado, set_optimize_registers in Design Compiler)
  • There are no retiming-barrier constraints — reset must apply to specific flops, or the design includes explicit "do not touch" pragmas on flop groups
  • The pipeline is long enough that the Fmax gain exceeds the increased route complexity

Retiming is powerful but can confuse downstream tools (formal equivalence checks, CDC analysis) because the netlist no longer corresponds 1:1 to the RTL. Most teams enable it cautiously, within specific hierarchies, and require formal equivalence to the RTL as a gate.

Q9. What is a one-write / one-read dual-port register file, and how do you implement it to avoid simulation/synthesis mismatch?

A classic processor register file: one write port, one or two read ports, all accessed in the same cycle.

module rf #(parameter N=32, W=32) (
  input  logic              clk,
  input  logic [4:0]        wr_addr, rd_addr,
  input  logic              wr_en,
  input  logic [W-1:0]      wr_data,
  output logic [W-1:0]      rd_data
);
  logic [W-1:0] mem [0:N-1];
 
  always_ff @(posedge clk) begin
    if (wr_en) mem[wr_addr] <= wr_data;
  end
 
  // Read: synchronous or asynchronous?
  assign rd_data = mem[rd_addr];  // asynchronous read
endmodule

The pitfall: when wr_addr == rd_addr and wr_en, what does rd_data return — the old value or the new value?

  • With asynchronous read (shown above): in simulation, the read reflects whichever value the memory array holds at that delta cycle. With nonblocking writes, that is the old value until the write resolves at the end of the time step.
  • With synchronous read (an extra flop on the read path): the read reflects the pre-edge value cleanly.
  • On FPGA BRAM: the behavior is explicit as a BRAM primitive attribute — "write-first," "read-first," or "no-change." Each produces a different post-synthesis behavior.

If the RTL assumes one semantic and the FPGA BRAM default is another, simulation and silicon disagree. Always declare the intended semantic (via comment or explicit mux) and verify both pre- and post-synthesis.

Q10. Describe the trade-off between a shift-register-based FIFO and a pointer-based FIFO.

Shift-register FIFO: depth-N SR with a counter that tracks occupancy. Every cycle, if write-enabled, the new data enters the head and all existing data shifts down one position. Reads always come from the same output position.

  • Pro: trivial control logic, no empty/full-with-wrap-bit corner case
  • Pro: constant read latency (always 1 cycle)
  • Con: every flop in the FIFO toggles every cycle a write happens — high dynamic power
  • Con: data path is N × register-copy per cycle — physical layout problems for deep FIFOs

Pointer-based FIFO: single memory array indexed by read and write pointers. Only one memory cell is touched per write; read latency is the memory read latency (often 1 cycle for BRAM).

  • Pro: scales to large depths with linear area, not quadratic
  • Pro: power efficient — only one cell toggles per transaction
  • Con: pointer management, especially the wrap-bit for full/empty disambiguation
  • Con: for CDC FIFOs, Gray-coded pointers add complexity (see CDC interview questions)

Use shift-register FIFOs for depths ≤ 8 or where you need absolutely minimal control logic. Use pointer-based FIFOs for anything larger.

Q11. A design has (* dont_touch = "true" *) on a flip-flop. What does that mean, and when should you use it?

The attribute tells synthesis to leave the flip-flop alone — don't absorb it into neighboring logic, don't retime it, don't duplicate it to reduce fanout, don't remove it even if its output is unused.

Legitimate uses:

  • A synchronizer flop at a CDC boundary. The tool must not absorb it into logic optimization because the whole point is the metastability resolution time budget that two-flop sync provides.
  • A debug observation point that you want present in the netlist even if it's not strictly needed functionally
  • DFT scan chains where specific flops must remain in known positions

Illegitimate uses:

  • "Don't optimize my design because I don't understand what the tool is doing." This hides bugs and misleads implementation.

Overuse of dont_touch is one of the most common ways to accidentally pessimize an FPGA or ASIC synthesis result. Use it only when the correctness or compliance requires it, and leave a comment explaining why.

Common interview mistakes

  • Writing always @(posedge clk or ...) with asynchronous data inputs in the sensitivity list. Only include clocks and asynchronous resets. Data inputs are implicit.

  • Mixing blocking and non-blocking assignments in the same always_ff block. This is almost always a simulation/synthesis mismatch waiting to happen. Pick one — nonblocking for always_ff — and never mix.

  • Using reg for a wire or wire for a register. The names reflect historical Verilog quirks. In modern SystemVerilog, use logic everywhere and let the context (continuous assignment vs. always_ff) determine the type.

  • Relying on #delay statements for anything synthesizable. Simulation-only constructs. In synthesizable RTL, timing is defined by clock edges, not simulated delays.

  • Using initial blocks to initialize registers in synthesizable code. Works on FPGAs (in some vendors and configurations). Does not work on ASIC. Use a dedicated reset signal.

Practice these topics

Drill RTL design on real problems

ChipPrep has graded RTL design problems: pipelining, FSM encoding, counter design, memory architectures — all with synthesizable reference solutions.

Related reading