SystemVerilog Interview Questions and Answers

SystemVerilog interview questions split between RTL additions (new types, procedural blocks) and verification (OOP, randomisation, assertions). These are the ones that separate candidates who have read a book from those who have built a testbench.

What is the difference between <code>logic</code> and <code>reg</code>/<code>wire</code>?
logic is a 4-state type that can be driven procedurally or by a single continuous assignment, unifying the roles of reg and wire for single-driver nets. It cannot be used for a multi-driver net — that still needs wire. Using logic everywhere you have one driver removes the old reg/wire confusion.
What is the difference between <code>bit</code> and <code>logic</code>?
bit is 2-state (0/1); logic is 4-state (0/1/x/z). 2-state types simulate faster and use less memory but cannot represent unknown/high-impedance, so uninitialised 2-state variables read as 0 and can hide bugs that a 4-state x would expose. Use 4-state for DUT-facing signals, 2-state for scoreboard/model counters.
Explain <code>always_comb</code>, <code>always_ff</code> and <code>always_latch</code>.
They declare design intent and let the tool check it. always_comb is combinational with an automatic complete sensitivity list and errors on inferred state; always_ff is a clocked register; always_latch is an intentional latch. They catch the classic accidental-latch and missing-signal bugs at compile time.
What is the difference between a <code>struct</code> and a <code>union</code>, and packed vs unpacked?
A struct groups fields that all exist; a union overlays fields in the same storage (one at a time). packed lays the members out as a contiguous bit vector you can treat as one number and put on a wire; unpacked is a collection of separate elements. Packed structs are synthesizable as buses; unpacked are usually for testbench data.
What is the difference between a dynamic array, an associative array and a queue?
A dynamic array is a contiguous array sized at runtime (new[n]). A queue is an ordered, growable list with push/pop at both ends ([$]) — ideal for scoreboards. An associative array is a sparse map keyed by any type ([string], [int]) — ideal for large, sparse, or name-indexed data like a register model.
Why must base-class methods be <code>virtual</code> for polymorphism?
Because frameworks hold derived objects through base-class handles. A virtual method dispatches to the actual object’s override at run time; a non-virtual method resolves by the handle type and would call the base version. UVM marks its hooks (do_copy, do_compare, phase methods) virtual for exactly this reason.
What is the difference between <code>rand</code> and <code>randc</code>?
rand picks a value each randomize() independently (values can repeat). randc is random-cyclic: it visits every value in the range once before any repeats, useful for sweeping all opcodes or addresses without duplication across a cycle.
What is a mailbox vs a semaphore?
A mailbox is a thread-safe FIFO for passing transactions between processes (e.g. generator to driver) with blocking put/get. A semaphore is a counting lock for arbitrating access to a shared resource with get/put of keys. One moves data; the other grants permission.
What is the difference between <code>$display</code>, <code>$strobe</code> and <code>$monitor</code>?
$display prints immediately when executed (Active region — may show pre-NBA values). $strobe prints at the end of the time step (Postponed region) after all non-blocking updates settle. $monitor prints automatically whenever any of its arguments change. Use $strobe/clocking to sample stable end-of-cycle values.
What does an immediate assertion vs a concurrent assertion check?
An immediate assertion (assert(expr)) checks a condition at the instant it executes, procedurally. A concurrent assertion (assert property(...)) is clocked and checks temporal behaviour over cycles using sequences, the |-> implication and ##n delays — the basis of protocol checking and formal.
Have questions about this topic?
Share your question in comments or talk to our mentor team for batch guidance.
▶ Try it in the ChipXpert Lab

Compile and simulate this in the browser — no install. Edit the code and re-run instantly.

Open in Verification Lab

Learn Verilog with mentors, labs and placement support

This free series is maintained by the ChipXpert training team in Hyderabad & Bengaluru. Go deeper with instructor-led courses on real EDA tools.

Explore VLSI Courses
Next batch starts 18th November 2026
Start your VLSI career with ChipXpert

Live online and classroom batches in Hyderabad & Bengaluru. Fill in your details and a counsellor will call you back.

  • Real EDA tools in your browser: industry-standard EDAReal EDA tools in your browser
  • Recorded sessions on the elearn portalRecorded sessions
  • Placement assistance: resume, mock interviewsPlacement assistance
  • Merit scholarship up to 60% · EMI optionsScholarship up to 60%
Hi! Ask me about courses, fees, batches or discounts. ×
BENGALURU
HYDERABAD