← All articles
SystemVerilogRTLVerificationInterview

SystemVerilog Interview Questions: RTL, Scheduling and Verification

Review SystemVerilog interview questions with examples of nonblocking assignments, combinational defaults, arrays and assertions.

May 15, 2025·4 min read

SystemVerilog interview questions often ask you to explain what code does at a clock edge and how a verification environment observes it. The examples below state their assumptions and distinguish synthesizable RTL from verification constructs.

Q1. What happens to a two-register pipeline at a clock edge?

module pipeline(input logic clk, rst, d, output logic q1, q2);
  always_ff @(posedge clk) begin
    if (rst) begin
      q1 <= 1'b0;
      q2 <= 1'b0;
    end else begin
      q1 <= d;
      q2 <= q1;
    end
  end
endmodule

On a rising edge with reset low, right-hand sides use values sampled before updates in the nonblocking assignment region. After the updates, q1 equals sampled d and q2 equals the previous q1. Reset is synchronous and active high. This is synthesizable RTL; a testbench must sample after updates if it wants post-edge values.

Follow-up: If d is 1 at the first edge after reset while old q1 is 0, post-edge q1=1, q2=0. At the next edge, q2=1 regardless of the new d.

Q2. Why use defaults in combinational logic?

always_comb begin
  y = 1'b0;
  if (enable) y = a & b;
end

Every path assigns y, so the intended function is combinational. Missing assignments can imply storage; tools may warn or reject constructs depending on their checks. always_comb communicates intent; it does not eliminate the need to inspect the logic.

Q3. What is the difference between a variable and a net?

logic declares a four-state variable in common declarations. A wire is a net whose value is resolved from drivers; wire logic is also a valid net declaration. Respect the language and tool restrictions on multiple drivers rather than assuming logic prevents every conflict.

Q4. What are packed and unpacked arrays?

In logic [7:0] word, the packed dimension is part of a vector. In logic [7:0] mem [0:3], the unpacked dimension represents four 8-bit elements. Unpacked arrays can support whole-array assignments where types and dimensions are compatible; synthesis support depends on the construct and tool.

Q5. How do immediate and concurrent assertions differ?

An immediate assertion evaluates a procedural expression when executed. A concurrent assertion samples a temporal property at specified clock events; it is primarily a verification construct and simulator support varies. For example, a handshake stability property must specify reset, sampling and whether payload remains stable while stalled.

Q6. What belongs in a basic verification environment?

Stimulus drives the design, a monitor observes transactions, and a scoreboard compares observations with a reference model. Coverage measures selected scenarios; it does not prove correctness. See the ASIC verification guide for methodology and the RTL questions for design style.

Q7. How do blocking and nonblocking assignments differ?

Within a procedural block, blocking assignment (=) updates the variable before the following statement; a nonblocking assignment (<=) evaluates its right-hand side when executed and schedules the update for the nonblocking assignment region. In the following clocked example, b receives the old a:

always_ff @(posedge clk) begin
  a <= in_bit;
  b <= a;
end

If both statements were blocking assignments in an ordinary clocked always block, b would receive the new a in that block. Separately clocked blocks using blocking assignments can race. Use nonblocking assignments for registers and blocking assignments for ordinary combinational calculations, following the project's coding rules.

Q8. What are interfaces and modports?

An interface bundles related signals and can reduce repetitive port wiring. A modport specifies a view of signal directions for a module or other consumer. Clocking blocks can define testbench sampling and driving conventions; interface and modport synthesis support varies by tool.

Q9. Write a handshake stability assertion

property hold_payload_while_stalled;
  @(posedge clk) disable iff (reset)
    (valid && !ready) |=> (valid && $stable(data));
endproperty
assert property (hold_payload_while_stalled);

At each sampled rising edge where valid is high and ready is low, the next sampled edge must have valid high and the same payload, including when ready becomes high at that next edge. disable iff disables attempts while active-high reset is asserted. This checks a stated protocol requirement; it does not by itself require the receiver ever to assert ready.

Q10. What are the main UVM components?

A test configures an environment containing agents, monitors and often a scoreboard. An active agent commonly includes a sequencer and driver; a monitor observes transactions. Sequences generate items for the sequencer, and a scoreboard compares observations against expected behavior. UVM classes and concurrent assertions are verification constructs; simulator and UVM-library support must be checked separately from RTL synthesis.

Practice hardware interview questions

Work through technical questions and explain your reasoning.