35 Verilog Interview Questions and Answers for Freshers
The Verilog questions VLSI interviewers ask freshers most often, with short answers in simple words. Try answering each one yourself before you open the answer.
Updated 05 November 2026 · Written by Semicon Weekly in our own words · 35 questions
Practise these 35 questions free: type, speak or pick from 4 options and get an instant AI score.
4.Explain blocking (=) vs non-blocking (<=) assignments.
Show answer
Blocking: RHS evaluated and LHS updated immediately, next statement waits; Non-blocking: all RHS evaluated first, LHS updated together at the end of the time step (NBA region); use <= for sequential logic (clocked always), = for combinational logic; mixing them in one block causes confusion/races
Common mistake: Only saying 'blocking is sequential, non-blocking is parallel' without the evaluate/update explanation
Interviewer may ask next: Write a 3-stage shift register with both styles and tell me what each one synthesizes to.
5.always @(posedge clk) begin b = a; c = b; end -- what hardware is inferred? What if you use <= instead?
Show answer
With = : c reads the NEW b, so b and c both get a on the same edge: two parallel flops fed by a (synthesis can merge them into one); With <= : c gets the OLD b, so you get two flops in series (a 2-stage shift register)
Common mistake: Saying both give the same hardware
Interviewer may ask next: Which version would you use for a synchronizer and why?
6.Swap the contents of two registers a and b, (1) using a temporary register and (2) without one.
Show answer
With temp: tmp = a; a = b; b = tmp; Without temp in a clocked block: a <= b; b <= a; works because both RHS are sampled before update; arithmetic/XOR trick: a = a ^ b; b = a ^ b; a = a ^ b
Common mistake: Using a = b; b = a; with blocking (both end up equal)
Interviewer may ask next: Why does the non-blocking swap work but the blocking one fails?
8.What are force/release and assign/deassign used for?
Show answer
Both override a signal's normal value until released; force/release works on nets and variables; assign/deassign only on variables; mostly used in testbenches to inject faults or bypass logic; not synthesizable; avoid in RTL
Common mistake: Saying they are synthesizable
Interviewer may ask next: How would you force an internal DUT signal from the testbench using a hierarchical path?
9.Difference between inter-assignment delay (#5 a = b;) and intra-assignment delay (a = #5 b;)?
Show answer
#5 a = b: wait 5 units, THEN read b and assign; a = #5 b: read b NOW, assign that old value after 5 units; intra-assignment with <= models transport delay and does not block the next statement
Common mistake: Saying they behave the same
Interviewer may ask next: What is the value of a at t=5 if b changes at t=2 in each case?
12.What is a sensitivity list? For pure combinational logic, must every input be in it?
Show answer
It lists the events that wake up an always block; for combinational logic every signal read must be in the list, otherwise simulation behaves like a latch while synthesis ignores the list, giving a simulation-synthesis mismatch; use always @(*) (or always_comb in SV)
Common mistake: Saying a missing signal only causes a warning and has no effect
Interviewer may ask next: Give an example where a missing signal in the list makes RTL sim differ from gate sim.
22.What does `timescale 1ns/1ps mean? How is #0.4567 handled?
Show answer
First number is the time unit for delays (#1 = 1 ns); second is precision (smallest step = 1 ps); delays are rounded to the precision, so #0.4567 becomes 0.457 ns; precision must be <= unit
Common mistake: Swapping unit and precision
Interviewer may ask next: With `timescale 10ns/1ns, what is #0.45 rounded to?
24.What are the different modeling styles in Verilog?
Show answer
Gate-level (primitives like and/or), dataflow (assign with operators), behavioral (always/initial), switch-level (nmos/pmos); RTL in practice mixes dataflow and behavioral; structural = connecting module instances
Common mistake: Leaving out structural/hierarchical instantiation
Interviewer may ask next: Write a 2:1 mux in all three main styles.
26.Write testbench code to generate two clocks: 100 MHz and 25 MHz.
Show answer
`timescale 1ns/1ps; 100 MHz period 10 ns: always #5 clk1 = ~clk1; 25 MHz period 40 ns: always #20 clk2 = ~clk2; initialise both to 0 in an initial block, otherwise ~x stays x
Common mistake: Forgetting to initialise the clock, so it stays x
Interviewer may ask next: How would you add a phase offset of 2 ns to clk2?
27.Write RTL to generate a 60% duty-cycle clock from an input clock (divide by 5).
Show answer
Use a mod-5 counter (0..4) on posedge; output high for counts 0,1,2 and low for 3,4 gives 3/5 = 60%; output must come from a flop to avoid glitches; frequency becomes clk/5
Common mistake: Trying to use # delays in RTL
Interviewer may ask next: How would you make a 50% duty divide-by-3 clock?
28.Which Verilog constructs are not synthesizable?
Show answer
Initial blocks (mostly), # delays (ignored), $display and other system tasks, forever without clock, fork/join, force/release, === and !==, real types, events used for testbench sync, file I/O
Loops are OK only if bounds are constant
Common mistake: Saying for loops are not synthesizable
Interviewer may ask next: Is a while loop synthesizable?
35.What is a race condition in Verilog? Give an example and the fix.
Show answer
Two processes read/write the same variable in the same time step and the result depends on execution order; example: two always @(posedge clk) blocks with blocking assigns where one reads what the other writes; fix: use non-blocking for sequential logic, one writer per variable, clocking blocks in testbench
Common mistake: Not giving a concrete example
Interviewer may ask next: How does a program block help avoid testbench-DUT races?