VLSI (Very Large Scale Integration) is the process of building integrated circuits that contain millions to billions of transistors on a single silicon chip. VLSI design covers everything from describing the chip’s behaviour in a hardware description language to producing the final layout that a foundry manufactures.
Read full answerHide full answer
Applies toVLSI design (general overview)
Integration Levels
Level
Approximate transistors per chip
Example
SSI (small scale)
up to ~100
basic logic gates
MSI (medium scale)
~100 to 1,000
counters, multiplexers
LSI (large scale)
~1,000 to 100,000
early microprocessors
VLSI (very large scale)
above ~100,000
modern CPUs, GPUs, SoCs
Today’s chips hold tens of billions of transistors, but the industry still uses the term VLSI for all of them.
What VLSI Design Involves
Specification and architecture: defining what the chip must do, its performance, power and area (PPA) targets.
Front-end design: writing RTL in Verilog, SystemVerilog or VHDL, then verifying it with simulation, UVM testbenches and formal tools.
Synthesis: converting RTL into a gate-level netlist using a standard cell library and timing constraints.
Back-end (physical) design: floorplanning, placement, clock tree synthesis, routing, and sign-off checks such as static timing analysis, DRC and LVS.
DFT and testing: inserting scan chains and BIST so manufactured chips can be tested.
Fabrication: the final GDSII/OASIS layout is “taped out” and sent to a foundry such as TSMC, Samsung or Intel.
Why VLSI Matters
Smaller and cheaper: putting a whole system on one chip (an SoC) reduces board size, cost and power.
Faster: shorter on-chip wires mean lower delay than connecting separate chips.
Everywhere: smartphones, cars, data centres, medical devices and IoT sensors all depend on VLSI chips.
Typical Job Roles
RTL design engineer: writes and owns the synthesisable logic.
Design verification engineer: builds testbenches and proves the RTL is correct.
Physical design engineer: turns the netlist into a manufacturable layout that meets timing.
STA, DFT and analog/mixed-signal engineers: specialised roles around timing, test and analog blocks.
In interviews, show that you understand the complete flow and where your chosen role fits in it.
2
What is the ASIC design flow from specification to tape-out?
KnownRevise
The ASIC design flow is the sequence of steps that turns a written specification into a verified layout (GDSII) that a foundry can manufacture. It is split into a front end (logic design and verification) and a back end (physical implementation and sign-off).
Read full answerHide full answer
Applies toVLSI design (ASIC flow)
Front-End Steps
Specification: functional requirements, interfaces, performance, power and area targets.
Architecture and micro-architecture: block diagram, pipelines, memories, clocking and reset strategy.
RTL design: synthesisable Verilog/SystemVerilog or VHDL for every block.
Functional verification: simulation with directed and constrained-random tests, UVM, assertions, coverage closure and formal checks. Lint and CDC checks also run here.
Logic synthesis: RTL plus SDC constraints and a standard cell library produce a gate-level netlist.
DFT insertion: scan chains, compression and memory BIST are added so the chip can be tested after manufacture.
Logic equivalence check (LEC): proves the netlist matches the RTL.
Back-End Steps
Floorplanning: die size, macro placement, I/O pads and the power grid.
Placement: standard cells are placed and optimised for timing and congestion.
Clock tree synthesis (CTS): a balanced clock network is built to control skew.
Routing: global and detailed routing connect all nets on the metal layers.
Sign-off: static timing analysis at all PVT corners, IR drop and electromigration analysis, signal integrity, and physical verification (DRC, LVS, antenna checks).
Tape-out: the final GDSII/OASIS database is sent to the foundry for mask making.
After Tape-Out
Fabrication: wafers are processed, diced and packaged.
Post-silicon validation: ATE testing with the ATPG patterns, then bring-up on boards.
Fixes: bugs found late may be handled with spare cells and a metal-only ECO in the next revision.
Tools Commonly Used
Step
Synopsys
Cadence
Simulation
VCS
Xcelium
Synthesis
Design Compiler / Fusion Compiler
Genus
Place and route
IC Compiler II / Fusion Compiler
Innovus
STA
PrimeTime
Tempus
Physical verification
IC Validator
Pegasus
Siemens EDA Calibre is also widely used for DRC/LVS sign-off.
Interview Tip
Explain the flow as a loop, not a straight line: timing or congestion problems found in the back end often send the team back to synthesis constraints or even the RTL.
3
What is the difference between an ASIC and an FPGA?
KnownRevise
An ASIC (Application-Specific Integrated Circuit) is a chip manufactured for one fixed function, while an FPGA (Field-Programmable Gate Array) is a pre-built chip whose logic can be reconfigured after manufacture by loading a bitstream. ASICs win on performance, power and unit cost at high volume; FPGAs win on flexibility and time to market.
Read full answerHide full answer
Applies toVLSI design (ASIC and FPGA implementation)
Side-by-Side Comparison
Aspect
ASIC
FPGA
Logic
Fixed at fabrication
Reprogrammable LUTs, flip-flops, routing
Performance
Highest clock speeds
Lower; programmable routing adds delay
Power
Lowest for the function
Higher, because of unused and configurable resources
Area / density
Smallest
Larger silicon for the same logic
Up-front cost (NRE)
Very high: masks, EDA tools, long team effort
Low: buy the device and vendor tools
Unit cost
Very low at high volume
Higher per unit
Time to market
Many months to years
Weeks to months
Bug fixing
Requires a re-spin (new masks)
Load a new bitstream
Design flow
Synthesis, full physical design, sign-off, tape-out
Synthesis, vendor place-and-route, bitstream
When to Choose Each
ASIC: high-volume products (smartphone SoCs, networking chips, AI accelerators) where low power and per-unit cost justify the large NRE.
FPGA: prototyping, low-to-medium volume products, algorithms that change often (telecom, defence, test equipment), and hardware acceleration in data centres.
How the Flows Differ
Both start from the same RTL in Verilog, SystemVerilog or VHDL.
In an ASIC flow the engineer controls floorplanning, clock tree synthesis, routing and sign-off, and must also add DFT for manufacturing test.
In an FPGA flow the vendor tool (AMD Vivado, Intel Quartus) maps logic onto fixed resources such as LUTs, DSP slices and block RAM, and the clock networks already exist.
FPGA designers mainly fight timing closure and resource utilisation; ASIC designers also deal with power grids, signal integrity and manufacturing rules.
Related Option
Structured ASICs and FPGA-to-ASIC conversion sit between the two: a design proven on an FPGA is moved to a cheaper fixed device for volume production.
Interview Tip
A common follow-up is “why prototype an ASIC on an FPGA?” Answer: to run real software and long tests at near real-time speed before tape-out, catching bugs that simulation is too slow to find.
4
What is CMOS, and why is it the dominant technology?
KnownRevise
CMOS (Complementary Metal-Oxide-Semiconductor) is a logic technology that builds every gate from a complementary pair of networks: PMOS transistors pull the output up to VDD and NMOS transistors pull it down to ground. Because only one network conducts in a steady state, CMOS draws almost no static current, which is the main reason it dominates digital design.
Read full answerHide full answer
Applies toVLSI design (CMOS fundamentals)
How CMOS Gates Work
Pull-up network (PUN): PMOS transistors between VDD and the output; they turn on when their gate input is low.
Pull-down network (PDN): NMOS transistors between the output and ground; they turn on when their gate input is high.
Complementary structure: series transistors in one network appear in parallel in the other. A NAND gate has NMOS in series and PMOS in parallel; a NOR gate is the reverse.
Full swing: the output reaches VDD or 0 V, giving strong noise margins.
Why CMOS Dominates
Very low static power: ideally no direct path from VDD to ground except during switching. Power is mainly dynamic, P = α·C·V²·f.
High noise immunity: rail-to-rail outputs and a sharp transfer curve.
Scalability: the same structure has scaled from micrometre nodes down to FinFET and gate-all-around nodes.
High density: simple, regular layouts allow billions of transistors per chip.
Robust design: ratioless logic, so correct operation does not depend on precise transistor sizing (sizing affects speed, not function).
Comparison With Older Technologies
Technology
Static power
Density
Notes
TTL (bipolar)
High
Low
Fast in its era, but power-hungry
NMOS-only
High (resistive pull-up conducts when output is low)
Medium
Used in early microprocessors
CMOS
Very low
Very high
Standard for digital ICs today
Limitations
Leakage: at small nodes, subthreshold and gate leakage make static power significant.
Latch-up: parasitic PNPN structures can short VDD to ground; guard rings and well taps prevent it.
Speed: PMOS is slower than NMOS (lower hole mobility), so PMOS devices are usually sized wider.
Interview Tip
Be ready to draw a CMOS inverter, NAND and NOR, and explain why a NAND is generally preferred over a NOR (series PMOS in a NOR gate are slow).
5
How does a CMOS inverter work?
KnownRevise
A CMOS inverter uses one PMOS transistor connected from VDD to the output and one NMOS transistor from the output to ground, with both gates tied to the input. When the input is low the PMOS conducts and the output goes high; when the input is high the NMOS conducts and the output goes low.
In each steady state one transistor is off, so there is no direct VDD-to-ground path and static current is only leakage.
During a transition both transistors are briefly on, causing a short-circuit current.
Switching charges or discharges the load capacitance CL through the PMOS or NMOS, which sets the delay.
Key Parameters
Switching threshold (VM): the input voltage where Vin = Vout. With matched devices VM ≈ VDD/2.
Sizing: holes are roughly 2 to 3 times less mobile than electrons in planar technology, so the PMOS is made wider (often W_p ≈ 2–3 × W_n) to give equal rise and fall times.
Propagation delay: tp ≈ 0.69 · R_eq · CL, where R_eq is the effective on-resistance of the driving transistor.
Dynamic power: P = α · CL · VDD² · f.
Worked Example
For CL = 10 fF, VDD = 1.0 V, f = 1 GHz and activity factor α = 0.1:
P = 0.1 × 10 × 10⁻¹⁵ F × (1.0 V)² × 10⁹ Hz = 1 µW per inverter.
If R_eq = 5 kΩ, tp ≈ 0.69 × 5,000 Ω × 10 × 10⁻¹⁵ F ≈ 34.5 ps.
Common Interview Follow-Ups
Why is the inverter the basic cell for delay characterisation? It is the simplest gate, and other gates are expressed as equivalent inverters.
What happens if you swap NMOS and PMOS? Each passes its “bad” logic level (NMOS passes a weak 1, PMOS a weak 0), so the output degrades.
How does increasing VDD affect speed and power? Delay falls but dynamic power rises quadratically.
6
What is the voltage transfer characteristic of a CMOS inverter?
KnownRevise
The voltage transfer characteristic (VTC) of a CMOS inverter is the plot of output voltage (Vout) against input voltage (Vin). It shows a flat high output, a steep transition around the switching threshold, and a flat low output, and it defines the inverter’s noise margins and switching point.
Read full answerHide full answer
Applies toVLSI design (CMOS fundamentals)
Five Regions of the VTC
Region
Input range
NMOS
PMOS
Output
A
0 ≤ Vin < VTn
Cut-off
Linear
Vout = VDD
B
VTn < Vin < VM
Saturation
Linear
Slightly below VDD, falling
C
Vin ≈ VM
Saturation
Saturation
Steep drop (high gain)
D
VM < Vin < VDD − abs(VTp)
Linear
Saturation
Low, falling
E
Vin > VDD − abs(VTp)
Linear
Cut-off
Vout = 0
VTn is the NMOS threshold voltage and VTp the PMOS threshold voltage.
Key Points on the Curve
Switching threshold VM: where Vin = Vout. Both transistors are in saturation; for matched transistors (equal βn and βp) VM = VDD/2.
VIL and VIH: the input voltages where the slope dVout/dVin = −1. Inputs below VIL are read as logic 0; above VIH as logic 1.
VOH and VOL: output high and low levels. For CMOS these are VDD and 0 V, which is why CMOS has full swing.
Noise Margins
NM_L = VIL − VOL
NM_H = VOH − VIH
Example: with VDD = 1.0 V, VIL = 0.42 V, VIH = 0.58 V, VOL = 0 V and VOH = 1.0 V: NM_L = 0.42 V and NM_H = 0.42 V, a symmetric inverter that tolerates about 0.42 V of noise on either level.
Effect of Transistor Sizing
Making the PMOS stronger (larger W/L) shifts VM toward VDD.
Making the NMOS stronger shifts VM toward 0 V.
Designers size the devices so VM ≈ VDD/2 for balanced noise margins and equal rise and fall delays.
Why It Matters
A steep transition (high gain) restores degraded logic levels, so signals regenerate through chains of gates.
The VTC also shows the short-circuit current region: around VM both devices conduct, which is why slow input slews waste power.
7
What is the difference between static and dynamic power in CMOS?
KnownRevise
Dynamic power is consumed when CMOS circuits switch, charging and discharging capacitances, while static power is consumed even when nothing switches, mainly through leakage currents. Total power = dynamic power + static power, and at advanced nodes both matter.
Read full answerHide full answer
Applies toVLSI design (low-power CMOS)
Dynamic Power
Dynamic power has two parts:
Switching power: P_sw = α · C · VDD² · f
α = activity factor (fraction of clock cycles in which the node toggles)
C = switched capacitance (F), VDD = supply voltage (V), f = clock frequency (Hz)
Short-circuit power: during an input transition both PMOS and NMOS conduct briefly, creating a current path from VDD to ground. It grows with slow input slews.
Worked example: α = 0.15, C = 2 nF (total chip switched capacitance), VDD = 0.8 V, f = 1 GHz: P_sw = 0.15 × 2 × 10⁻⁹ × 0.64 × 10⁹ = 0.192 W.
Static Power
P_static = VDD · I_leak, where I_leak includes:
Subthreshold leakage: current through a transistor that is “off”; it rises exponentially as the threshold voltage falls and with temperature.
Gate leakage: tunnelling through very thin gate oxide (reduced by high-k dielectrics).
Junction (reverse-bias) leakage and GIDL (gate-induced drain leakage).
Comparison
Aspect
Dynamic power
Static power
Cause
Switching activity
Leakage when idle or active
Depends on
α, C, VDD², f
VDD, Vt, temperature, process
Reduced by
Clock gating, lower VDD/f (DVFS), less capacitance
Power gating, high-Vt cells, body biasing
Trend with scaling
Falls per gate, but more gates
Became significant below ~90 nm
Reduction Techniques
Clock gating stops the clock to idle registers, reducing α.
DVFS lowers voltage and frequency together; since power depends on VDD², this gives large savings.
Power gating cuts the supply to idle blocks with header/footer switches, removing most leakage.
Multi-Vt cells use high-Vt (low-leakage) cells on non-critical paths and low-Vt cells only on critical paths.
Interview Tip
Mention that leakage is strongly temperature-dependent, so static power is usually checked at the hot, fast-process corner.
8
What causes leakage current in CMOS transistors?
KnownRevise
Leakage current is the current that flows through a CMOS transistor when it is supposed to be off. It comes mainly from subthreshold conduction, gate-oxide tunnelling and reverse-biased junctions, and it is the source of static power in modern chips.
Read full answerHide full answer
Applies toVLSI design (CMOS device physics and low power)
Main Leakage Mechanisms
Subthreshold leakage: when VGS is below the threshold voltage Vt, the channel is weakly inverted and a diffusion current still flows. It rises exponentially as Vt decreases: I_sub ∝ exp((VGS − Vt) / (n·kT/q)). It is usually the largest component.
Gate oxide leakage: electrons tunnel through a very thin gate oxide. High-k metal gate (HKMG) stacks, introduced around 45 nm, reduced it by allowing a physically thicker dielectric.
Junction leakage: reverse-biased source/drain-to-body PN junctions conduct a small current, including band-to-band tunnelling.
GIDL (gate-induced drain leakage): a high field in the gate-drain overlap region causes tunnelling current, especially when the gate is strongly off.
DIBL (drain-induced barrier lowering): a high drain voltage lowers the source barrier in short-channel devices, effectively reducing Vt and increasing subthreshold leakage.
Factors That Increase Leakage
Lower threshold voltage: needed for speed at lower supply voltages, but each ~60–100 mV drop in Vt can raise subthreshold leakage about tenfold at room temperature.
Higher temperature: leakage increases sharply with temperature (thermal voltage kT/q rises and Vt falls).
Process variation: fast-process (FF) corners have lower Vt and more leakage.
Shorter channels: short-channel effects such as DIBL.
How Designers Reduce Leakage
Multi-Vt libraries: high-Vt cells off the critical path.
Power gating: switch off idle blocks with sleep transistors.
Stacking: two off transistors in series leak much less than one (the stack effect).
Body biasing: reverse body bias raises Vt in standby.
Device technology: FinFETs and gate-all-around transistors give better gate control and lower subthreshold leakage.
Interview Tip
If asked which leakage is dominant, say subthreshold leakage, and explain its exponential dependence on Vt and temperature; that is why leakage power is analysed at the hottest corner.
9
What is latch-up in CMOS?
KnownRevise
Latch-up is a failure in which parasitic bipolar transistors in a CMOS structure form a PNPN thyristor (SCR) that turns on and creates a low-resistance path from VDD to ground. Once triggered it can draw very large current and destroy the chip unless power is removed.
Read full answerHide full answer
Applies toVLSI design (CMOS layout and reliability)
How Latch-Up Forms
In a bulk CMOS process with an N-well on a P-substrate:
A vertical PNP transistor is formed by the PMOS source (P+), the N-well and the P-substrate.
A lateral NPN transistor is formed by the NMOS source (N+), the P-substrate and the N-well.
These two transistors are cross-coupled through the well resistance (R_well) and substrate resistance (R_sub), forming a PNPN SCR between VDD and ground.
How It Is Triggered
A current injected into the substrate or well (for example from an I/O pin pulled above VDD or below ground, ESD, radiation, or power-supply glitches) creates a voltage drop across R_well or R_sub.
If that drop forward-biases a base-emitter junction (~0.7 V), one transistor turns on, which feeds the base of the other.
When the loop gain β_npn × β_pnp ≥ 1, the structure latches and stays on even after the trigger is removed.
Prevention Techniques
Substrate and well taps (well ties): placed frequently so R_well and R_sub stay low; standard cell rows include tap cells for this.
Guard rings: P+ rings tied to ground around NMOS and N+ rings tied to VDD around PMOS collect injected carriers, especially near I/O pads.
Spacing: increasing the distance between NMOS and PMOS lowers the gain of the lateral transistor.
Process options: epitaxial layers, retrograde wells, trench isolation, and SOI (silicon-on-insulator), which removes the parasitic SCR entirely.
I/O design: clamp diodes and ESD structures that keep pin voltages within the supply rails.
Testing
Latch-up immunity is qualified using the JEDEC JESD78 standard, which injects current into pins and over-voltage onto supplies.
Interview Tip
Draw the cross-section with the two parasitic transistors and point out why tap cells appear in every standard cell row: that is the practical link between device physics and physical design.
10
What are technology nodes and scaling in VLSI?
KnownRevise
A technology node (such as 7 nm, 5 nm or 3 nm) is the name a foundry gives to a generation of its manufacturing process, and scaling is the move from one node to the next to pack more, faster and lower-power transistors into the same area. Modern node names are marketing labels; they no longer match any physical gate length.
Read full answerHide full answer
Applies toVLSI design (semiconductor process technology)
What a Node Name Means
Historically (down to roughly 0.35 µm) the node matched the transistor’s gate length or half-pitch.
Since the move to FinFETs, a “7 nm” or “5 nm” node has no feature that is 7 or 5 nm long; the label signals a generation with higher density than the previous one.
Better comparisons use transistor density (millions of transistors per mm²), contacted gate pitch and metal pitch.
Classic (Dennard) Scaling
Under constant-field scaling by a factor S (about 1.4 per generation):
Parameter
Change
Dimensions, voltage
1/S
Gate delay
1/S
Power per gate
1/S²
Density
S²
Power density
constant
Area per transistor halves each generation (consistent with Moore’s law).
Why Dennard Scaling Ended
Around the mid-2000s, supply voltage could no longer fall much because threshold voltage could not be lowered without exploding leakage. Power density began to rise, clock frequencies plateaued, and the industry turned to multicore designs, power management and new transistor structures.
Benefits and Costs of a New Node
Benefits: higher density, lower power at the same speed or higher speed at the same power.
Costs: much higher mask and design costs, multiple patterning or EUV lithography, more variation and more complex design rules.
New issues: wire resistance grows as interconnects shrink, so interconnect delay, IR drop and electromigration become major concerns.
Device Evolution
Planar MOSFET → FinFET (Intel 22 nm, TSMC 16 nm) → gate-all-around nanosheets (Samsung 3 nm, TSMC N2, Intel 18A), each improving gate control over the channel.
Interview Tip
If asked “is 7 nm really 7 nm?”, answer no and explain that density and pitch are the meaningful metrics.
11
What is a FinFET, and why did it replace planar transistors?
KnownRevise
A FinFET is a 3D transistor in which the channel is a thin vertical silicon “fin” and the gate wraps around it on three sides. This gives the gate much stronger control over the channel than a flat (planar) MOSFET, which cuts leakage and short-channel effects and allowed scaling to continue below about 22 nm.
In a planar MOSFET the gate controls the channel only from the top.
As gate length shrank, the drain’s electric field began to influence the channel (short-channel effects such as DIBL), so the transistor could not be turned fully off.
Subthreshold leakage and variation rose sharply, and lowering voltage further became impossible.
How a FinFET Works
The fin stands up from the substrate; the gate drapes over its top and two sides.
The thin fin is fully depleted, so the gate controls the whole channel.
Effective width W_eff ≈ 2 × fin height + fin width per fin. Drive current is increased by adding more fins, so width is quantised (you choose 1, 2, 3… fins, not an arbitrary width).
Benefits
Lower leakage and a steeper subthreshold slope (closer to the ideal ~60 mV/decade at room temperature).
Higher drive current per footprint, so faster switching at a lower supply voltage.
Reduced DIBL and variation, since the undoped fin is less sensitive to random dopant fluctuation.
Planar vs FinFET vs GAA
Feature
Planar MOSFET
FinFET
Gate-all-around (nanosheet)
Gate control
One side
Three sides
Four sides
Width
Continuous
Quantised by fin count
Tunable by sheet width
Used at
28 nm and above
~22/16 nm to 3 nm
3 nm / 2 nm and below
Design Implications
Standard cells are designed in fin-count “tracks”; sizing is discrete.
FinFETs have higher parasitic capacitance and self-heating, which affects reliability and electromigration analysis.
Layout rules are stricter (fixed fin pitch, gate pitch), so EDA tools use stricter placement grids.
Timeline
Intel introduced FinFETs (Tri-Gate) at 22 nm in 2011; TSMC and Samsung followed at 16/14 nm. Gate-all-around nanosheets are now replacing FinFETs at the most advanced nodes.
12
What is Verilog?
KnownRevise
Verilog is a hardware description language (HDL) used to model, simulate and synthesise digital circuits. Instead of describing steps for a processor to execute, Verilog describes hardware: modules, signals and logic that run concurrently, and synthesis tools turn that description into gates.
Read full answerHide full answer
Applies toVLSI design (Verilog IEEE 1364-2005; now part of SystemVerilog IEEE 1800)
Key Concepts
Module: the basic building block, with input and output ports, like a chip or block in a diagram.
Nets and variables: wire models connections driven continuously; reg (or logic in SystemVerilog) holds a value assigned in procedural blocks.
Continuous assignment: assign y = a & b; models combinational logic.
Procedural blocks: always @(*) for combinational logic and always @(posedge clk) for sequential logic; initial blocks are for simulation.
Concurrency: every assign and always block runs in parallel, just like real hardware.
Levels of abstraction: behavioural (algorithmic), RTL (registers and the logic between them) and gate-level (netlists).
Code Example
// A 2-input AND gate and a registered output
module and_reg (
input wire clk,
input wire a, b,
output reg q
);
wire y;
assign y = a & b; // combinational logic
always @(posedge clk) // sequential logic: flip-flop
q <= y; // non-blocking assignment for registers
endmodule
Where Verilog Is Used
RTL design: describing synthesisable logic for ASICs and FPGAs.
Verification: writing testbenches (now mostly done in SystemVerilog with UVM).
Using non-synthesisable constructs (delays like #10, initial blocks for logic) in RTL.
13
What is the difference between Verilog and VHDL?
KnownRevise
Verilog and VHDL are both hardware description languages for modelling and synthesising digital circuits, but Verilog has a concise, C-like syntax and weak typing, while VHDL has an Ada-like, verbose syntax with strong typing. Both produce the same hardware; the choice usually depends on company, region and industry.
// Verilog: 2-input AND
module and2 (input wire a, b, output wire y);
assign y = a & b;
endmodule
-- VHDL: 2-input AND
library ieee;
use ieee.std_logic_1164.all;
entity and2 is
port (a, b : in std_logic; y : out std_logic);
end entity;
architecture rtl of and2 is
begin
y <= a and b;
end architecture;
Practical Differences
Strong typing in VHDL catches width and type mismatches at compile time; Verilog silently truncates or extends, which can hide bugs (lint tools help).
Verilog’s brevity makes RTL faster to write and read.
Verification: the industry standard for ASIC verification is SystemVerilog with UVM, which gives the Verilog family a strong advantage there.
Tool support: all major simulators and synthesis tools support both, and mixed-language projects are common.
Interview Tip
Don’t argue that one is “better”. Say both are equivalent for synthesis, explain typing and verification differences, and state which one you have used and why.
14
What is the difference between blocking and non-blocking assignments in Verilog?
KnownRevise
A blocking assignment (=) updates the variable immediately, so the next statement in the same block sees the new value. A non-blocking assignment (<=) schedules the update for the end of the time step, so all right-hand sides are evaluated first using old values. Use non-blocking for sequential logic and blocking for combinational logic.
Blocking (=): executes in order, like software. a = b; c = a; makes c equal to the new a.
Non-blocking (<=): evaluation and update are split. All <= right-hand sides in the time step are evaluated, then all left-hand sides update together (in the NBA region of the scheduler).
Code Example
module shift_demo (input wire clk, input wire d,
output reg q1, q2);
// Correct: non-blocking builds a 2-stage shift register
always @(posedge clk) begin
q1 <= d; // q1 gets d
q2 <= q1; // q2 gets the OLD q1, so two flip-flops
end
endmodule
// If written with blocking assignments:
// q1 = d;
// q2 = q1; // q2 gets the NEW q1 (= d), so both copy d
// Synthesis infers only one effective stage: a bug.
Combinational Logic
always @(*) begin
tmp = a & b; // blocking: tmp is used immediately below
y = tmp | c;
end
Using <= here would make y use the previous value of tmp in simulation, causing a simulation/synthesis mismatch.
Guidelines (Cummings’ Rules)
Use non-blocking (<=) in always @(posedge clk) blocks that model flip-flops.
Use blocking (=) in always @(*) blocks that model combinational logic.
Do not mix = and <= in the same always block.
Do not assign the same variable from more than one always block.
Use non-blocking for latches as well.
Why It Matters
Race conditions: blocking assignments in multiple clocked blocks can make results depend on simulator execution order.
Sim/synth mismatch: the synthesised hardware may differ from what simulation showed, the worst kind of bug because it escapes verification.
Interview Tip
Write the swap example: a <= b; b <= a; swaps two registers on a clock edge, while the blocking version leaves both equal to b.
15
What is the difference between wire and reg in Verilog?
KnownRevise
In Verilog, a wire is a net that represents a physical connection and must be continuously driven (by an assign or a module output), while a reg is a variable that holds its value between assignments and is written inside procedural blocks (always, initial). Despite the name, a reg does not always become a hardware register.
Flip-flop, latch or combinational logic, depending on the block
Code Example
module wire_vs_reg (input wire clk, a, b,
output wire y_comb,
output reg y_ff,
output reg y_mux);
assign y_comb = a ^ b; // wire: continuous assignment
always @(posedge clk)
y_ff <= a & b; // reg -> flip-flop (clocked block)
always @(*)
y_mux = clk ? a : b; // reg -> combinational logic, NOT a flip-flop
endmodule
Key Point: reg Is Not Always a Register
In a clocked always @(posedge clk) block, a reg becomes a flip-flop.
In a complete always @(*) block, it becomes combinational logic.
In an incomplete combinational block (missing else or default), it becomes a latch.
SystemVerilog: logic
SystemVerilog adds the logic type, which can be driven by either a continuous assignment or a procedural block (but by only one driver). It removes most wire/reg confusion, and logic is the recommended type for new RTL. Use wire only where multiple drivers are needed, such as tri-state buses.
Common Pitfalls
Assigning a wire inside an always block (compile error).
Driving a reg with assign (compile error in Verilog).
Assuming every reg is a flip-flop, then being surprised by latches in synthesis reports.
16
What is the difference between always @(*) and always @(posedge clk)?
KnownRevise
always @(*) describes combinational logic: the block re-evaluates whenever any signal it reads changes. always @(posedge clk) describes sequential logic: the block runs only on the rising clock edge, so the variables it assigns become flip-flops.
The * builds the sensitivity list automatically from every signal read in the block, avoiding missing-signal bugs.
Outputs follow inputs (after gate delay), with no memory.
Use blocking assignments (=).
Every output must be assigned in every path, or synthesis infers a latch.
SystemVerilog’s always_comb is the preferred form: it also runs once at time zero and lets tools flag latches.
always @(posedge clk)
Executes only on the rising edge of clk (or negedge for falling).
Assigned variables hold their values between edges, so they become flip-flops.
Use non-blocking assignments (<=).
Asynchronous reset is added to the sensitivity list: always @(posedge clk or negedge rst_n).
SystemVerilog’s always_ff is the preferred form.
Code Example
module comb_vs_seq (input wire clk, rst_n,
input wire [3:0] a, b,
output reg [3:0] sum_c, // combinational
output reg [3:0] sum_q); // registered
// Combinational adder: updates whenever a or b changes
always @(*)
sum_c = a + b;
// Register: captures sum_c on each rising clock edge
always @(posedge clk or negedge rst_n)
if (!rst_n) sum_q <= 4'd0;
else sum_q <= sum_c;
endmodule
Comparison
Aspect
always @(*)
always @(posedge clk)
Hardware
Combinational gates (or latch if incomplete)
Flip-flops
Trigger
Any input change
Clock edge (plus async reset)
Assignment
Blocking =
Non-blocking <=
SystemVerilog form
always_comb
always_ff
Timing
Contributes to path delay
Starts and ends timing paths
Common Pitfalls
Writing an explicit sensitivity list like always @(a) and forgetting b: simulation misbehaves but synthesis ignores the list, causing a mismatch.
Using <= in combinational blocks or = in clocked blocks.
Forgetting a default assignment, which creates an unintended latch.
17
What causes an unintended latch in Verilog, and how do you avoid it?
KnownRevise
An unintended latch is inferred when a combinational always block does not assign a value to an output in every possible path, so the hardware must “remember” the old value. Synthesis then builds a level-sensitive latch instead of pure combinational logic. Avoid it by assigning every output in every branch, usually with default assignments at the top of the block.
A case statement that does not cover all values and has no default.
Assigning an output in some branches but not others.
Reading a variable before it is assigned in the same combinational block.
Code Example
// BAD: latch inferred for y when sel == 0
always @(*) begin
if (sel)
y = a;
end
// GOOD: default assignment first, no latch
always @(*) begin
y = 1'b0; // default value for every path
if (sel)
y = a;
end
// GOOD: case with default
always @(*) begin
case (op)
2'b00: y = a & b;
2'b01: y = a | b;
2'b10: y = a ^ b;
default: y = 1'b0; // covers 2'b11 (and x/z in simulation)
endcase
end
Why Latches Are a Problem
Timing: latches are transparent while the enable is active, which complicates static timing analysis (time borrowing) and can create timing loops.
Glitches: a glitchy enable can corrupt the stored value.
Testability: latches are harder to scan and test.
Intent mismatch: the designer wanted combinational logic, so the latch is a bug.
How to Avoid and Detect
Put default assignments for all outputs at the top of every combinational block.
Always include else and default branches.
Use SystemVerilog always_comb: tools warn if it infers a latch. Use always_latch when a latch is really intended.
Run lint (for example Spyglass or Verilator lint) and check synthesis reports for inferred latches.
When Latches Are Intended
Latches are used deliberately in clock-gating cells and some high-performance designs (time borrowing). Use explicit always_latch code or library integrated clock-gating (ICG) cells for those cases.
18
What is the difference between a task and a function in Verilog?
KnownRevise
A function in Verilog computes and returns a single value in zero simulation time and cannot contain timing controls, while a task can have multiple outputs, may contain delays and event controls (#, @, wait), and does not return a value directly. Functions are typically used for combinational calculations; tasks for procedures, especially in testbenches.
Read full answerHide full answer
Applies toVLSI design (Verilog IEEE 1364-2005 and SystemVerilog)
Comparison
Aspect
Function
Task
Return value
Returns exactly one value
No return value; uses output/inout arguments
Timing controls (#, @, wait)
Not allowed
Allowed
Simulation time
Executes in zero time
Can consume time
Arguments
At least one input (Verilog-2005)
Zero or more inputs, outputs, inouts
Can call
Other functions only
Functions and other tasks
Synthesisable
Yes, when it describes combinational logic
Yes only if it has no timing controls
Typical use
Parity, encoders, CRC, math in RTL
Bus transactions and stimulus in testbenches
Code Example
module task_func_demo;
// Function: combinational, returns a value
function [3:0] add4(input [3:0] a, input [3:0] b);
add4 = a + b;
endfunction
reg clk = 0, wr_en = 0;
reg [7:0] wr_data;
always #5 clk = ~clk;
// Task: consumes time, drives signals over clock cycles
task write_byte(input [7:0] data);
begin
@(posedge clk);
wr_en = 1'b1;
wr_data = data;
@(posedge clk);
wr_en = 1'b0;
end
endtask
initial begin
$display("3 + 4 = %0d", add4(4'd3, 4'd4));
write_byte(8'hA5);
$finish;
end
endmodule
SystemVerilog Additions
void functions, which return nothing.
return statements in both tasks and functions.
automatic storage (each call gets its own variables), needed for recursion and for tasks called concurrently from several threads.
Common Pitfalls
Putting @(posedge clk) inside a function (compile error).
Using static (default) tasks called in parallel from forked threads: they share variables and corrupt each other. Declare them automatic.
Expecting a task with delays to synthesise.
19
What are synthesisable and non-synthesisable constructs in Verilog?
KnownRevise
Synthesisable constructs are HDL statements that a synthesis tool can convert into real gates and flip-flops, while non-synthesisable constructs only have meaning in simulation, such as delays, file I/O and initial blocks used for stimulus. RTL must use only synthesisable code; testbenches may use anything.
Read full answerHide full answer
Applies toVLSI design (Verilog / SystemVerilog RTL and testbenches)
Run lint and check synthesis warnings: ignored delays and incomplete sensitivity lists cause simulation/synthesis mismatches.
Never rely on # delays in RTL to fix timing; real timing is fixed by constraints and design changes.
20
What are parameters and generate blocks in Verilog?
KnownRevise
A parameter is a named constant that makes a Verilog module configurable (for example a data width), and it can be overridden when the module is instantiated. A generate block uses parameters and loops or conditions at elaboration time to replicate or conditionally create hardware. Together they let one module serve many configurations.
parameter values can be overridden per instance: fifo #(.WIDTH(32), .DEPTH(16)) u_fifo (...);
localparam is a constant that cannot be overridden; use it for values derived from parameters, such as localparam AW = $clog2(DEPTH);.
Parameters are resolved at elaboration, before simulation or synthesis, so they create no hardware themselves.
Avoid defparam; it is deprecated in practice and confusing to read.
Generate Blocks
generate for: replicates instances or logic using a genvar loop variable.
generate if / case: chooses between implementations based on a parameter.
Each generated block should be named so its hierarchy is readable (for example g_bit[3].u_ff).
Code Example
// N-bit ripple-carry adder built from full adders
module full_adder (input wire a, b, cin, output wire s, cout);
assign s = a ^ b ^ cin;
assign cout = (a & b) | (cin & (a ^ b));
endmodule
module ripple_adder #(parameter int N = 8) (
input wire [N-1:0] a, b,
input wire cin,
output wire [N-1:0] sum,
output wire cout
);
wire [N:0] c;
assign c[0] = cin;
genvar i;
generate
for (i = 0; i < N; i = i + 1) begin : g_fa // named block
full_adder u_fa (.a(a[i]), .b(b[i]), .cin(c[i]),
.s(sum[i]), .cout(c[i+1]));
end
endgenerate
assign cout = c[N];
endmodule
// Instantiate a 16-bit version:
// ripple_adder #(.N(16)) u_add16 (.a(x), .b(y), .cin(1'b0), .sum(z), .cout(co));
Conditional Generate Example
generate
if (USE_PIPELINE) begin : g_pipe
always @(posedge clk) y_q <= y_d;
end else begin : g_comb
always @(*) y_q = y_d;
end
endgenerate
Best Practices
Give parameters sensible defaults and document their legal range.
Use $clog2 for address widths instead of hard-coding.
Add assertions or elaboration checks for illegal parameter values.
Remember the difference from a procedural for loop: a generate loop creates separate instances, while an always-block loop describes logic inside one block.
21
How do you write a D flip-flop with synchronous reset in Verilog?
KnownRevise
A D flip-flop with synchronous reset copies its input d to output q on the rising clock edge, and clears q only when reset is asserted at that clock edge. Because reset is checked inside the clocked block, it is not in the sensitivity list.
On every posedge clk, the flip-flop samples its inputs.
If rst is high at that edge, q becomes 0; otherwise q takes the value of d.
Between clock edges, changes on rst or d have no effect.
Synthesis typically builds a plain D flip-flop with an AND gate (or mux) in front of its D input to force 0 during reset.
Code Example
module dff_sync_rst (
input wire clk,
input wire rst, // active-high synchronous reset
input wire d,
output reg q
);
always @(posedge clk) begin // only clk in the sensitivity list
if (rst)
q <= 1'b0; // reset takes effect at the clock edge
else
q <= d; // normal capture
end
endmodule
For comparison, an asynchronous active-low reset is written as:
always @(posedge clk or negedge rst_n)
if (!rst_n) q <= 1'b0; // clears immediately, without waiting for clk
else q <= d;
Synchronous vs Asynchronous Reset
Aspect
Synchronous reset
Asynchronous reset
Takes effect
At the next clock edge
Immediately
Needs a running clock
Yes
No
Glitch filtering
Glitches between edges are ignored
A glitch can reset the flop
Timing
Reset is a normal data path, checked by STA
Needs recovery/removal checks on de-assertion
Area
Extra logic in the data path
Uses flops with a reset pin
Best Practices
Use non-blocking assignments (<=) in clocked blocks.
Keep the reset polarity consistent across the design (rst vs rst_n naming).
For asynchronous reset, use “asynchronous assert, synchronous de-assert” with a reset synchroniser so all flops leave reset on the same clock edge.
Only reset flops that need a known start value (control logic); datapath flops often need no reset, which saves area.
22
How do you write a 4-bit up counter in Verilog?
KnownRevise
A 4-bit up counter is a register that adds 1 to its value on every rising clock edge, counting from 0 to 15 and then wrapping back to 0. It is written as a clocked always block with a reset and, usually, an enable.
Mod-N counter: reset to 0 when count == N-1, e.g. a mod-10 (BCD) counter.
Up/down counter: add an up input and choose count + 1 or count - 1.
Loadable counter: add load and din inputs.
Ripple vs synchronous: this design is synchronous (all flops share one clock). A ripple counter clocks each stage from the previous output; it is smaller but slower and hard to time, so it is avoided in ASIC design.
Common Pitfalls
Using blocking = in the clocked block.
Forgetting the reset, leaving count as x in simulation.
Declaring count with too few bits for the intended range.
23
How do you write a 4-to-1 multiplexer in Verilog?
KnownRevise
A 4-to-1 multiplexer selects one of four inputs and passes it to the output, based on a 2-bit select signal. In Verilog it can be written with a conditional operator, a case statement or an indexed vector; all synthesise to the same combinational logic.
No latch: every sel value is covered, and default makes the block complete.
Structure: the conditional-operator version shows that a 4:1 mux can be built from three 2:1 muxes in two levels.
case vs if-else: a case on one select signal builds a parallel mux; a long if-else chain can imply priority logic and a longer path.
Gate-level view: a 2:1 mux can also be built with transmission gates in CMOS, which is common in standard cell libraries.
Testbench Idea
Loop sel from 0 to 3 with known values on d0 to d3 and check that y matches the selected input, for example with an assertion: assert (y == expected).
24
What is a finite state machine, and how do Mealy and Moore machines differ?
KnownRevise
A finite state machine (FSM) is sequential logic that moves between a finite set of states on clock edges, based on its current state and inputs. In a Moore machine the outputs depend only on the current state; in a Mealy machine the outputs depend on the current state and the current inputs.
Read full answerHide full answer
Applies toVLSI design (digital design, RTL)
FSM Building Blocks
State register: flip-flops holding the current state.
Next-state logic: combinational logic computing the next state from the current state and inputs.
Output logic: combinational logic computing the outputs.
Reset: forces the FSM into a known initial state.
Moore vs Mealy
Aspect
Moore
Mealy
Outputs depend on
Current state only
Current state and inputs
Output timing
Changes after a clock edge (one cycle later)
Can change as soon as inputs change
Number of states
Often more
Often fewer
Glitches on outputs
Less likely; outputs are stable for the cycle
Input glitches can pass to outputs
Timing paths
Input-to-output path is broken by the register
Combinational path from input to output
Example: a 1011 sequence detector needs 5 states as a Moore machine (the output asserts in a dedicated “detected” state) and 4 states as a Mealy machine (the output asserts on the transition).
Code Structure (Moore, Two-Process Style)
module moore_example (input wire clk, rst_n, x, output wire y);
localparam [1:0] S0 = 2'd0, S1 = 2'd1, S2 = 2'd2;
reg [1:0] state, next;
always @(posedge clk or negedge rst_n) // state register
if (!rst_n) state <= S0;
else state <= next;
always @(*) begin // next-state logic
next = state;
case (state)
S0: if (x) next = S1;
S1: next = x ? S2 : S0;
S2: if (!x) next = S0;
default: next = S0;
endcase
end
assign y = (state == S2); // Moore output: state only
endmodule
Design Guidelines
Use a separate clocked block for the state register and combinational blocks for next-state and output logic.
Always include a default branch and a reset state, so illegal states recover.
Register Mealy outputs if they cross a module or chip boundary, to avoid long combinational paths and glitches.
Choose state encoding (binary, Gray, one-hot) based on speed, area and power.
25
How do you write a Verilog FSM to detect the sequence 1011?
KnownRevise
A 1011 sequence detector is a finite state machine that watches a serial input bit by bit and asserts its output when the last four bits received were 1, 0, 1, 1. The version below is a Moore machine that allows overlapping sequences, so in 1011011 it detects twice.
Overlap logic: from S4 (“1011”), the last bit “1” is a valid start, so input 0 gives “10” (S2) and input 1 gives “1” (S1). From S3 (“101”), input 0 gives “10” (S2).
Code Example
module seq1011_moore (
input wire clk,
input wire rst_n, // active-low asynchronous reset
input wire x, // serial input bit
output wire y // high for one cycle after 1011 is seen
);
localparam [2:0] S0 = 3'd0, S1 = 3'd1, S2 = 3'd2,
S3 = 3'd3, S4 = 3'd4;
reg [2:0] state, next;
// State register
always @(posedge clk or negedge rst_n)
if (!rst_n) state <= S0;
else state <= next;
// Next-state logic
always @(*) begin
case (state)
S0: next = x ? S1 : S0;
S1: next = x ? S1 : S2;
S2: next = x ? S3 : S0;
S3: next = x ? S4 : S2;
S4: next = x ? S1 : S2;
default: next = S0;
endcase
end
// Moore output depends on state only
assign y = (state == S4);
endmodule
Mealy Alternative
A Mealy version needs only four states (S0 to S3). The output is y = (state == S3) && x, so it asserts in the same cycle the final 1 arrives, one cycle earlier than the Moore version.
Verifying It
Drive the stream 1 0 1 1 0 1 1 and check that y pulses after the 4th bit and again after the 7th bit (overlap).
Drive 1 1 0 1 1 to check recovery from a false start.
Add an assertion or a reference model in the testbench that shifts bits into a 4-bit register and compares it with 4’b1011.
Common Mistakes
Wrong overlap transitions (for example going back to S0 from S3 on a 0 instead of to S2).
Missing default, leaving the FSM stuck in an illegal state.
26
What is one-hot encoding versus binary encoding for FSM states?
KnownRevise
Binary encoding stores N FSM states in ⌈log₂N⌉ flip-flops, while one-hot encoding uses N flip-flops with exactly one of them set to 1 at a time. One-hot uses more flip-flops but simpler, faster next-state logic; binary uses fewer flip-flops but more decoding logic.
Any value with zero or several 1s is illegal and easy to detect
Best for
ASICs with many states, area-limited designs
FPGAs (flip-flops are plentiful), high-speed designs
Gray Encoding
Adjacent states differ by one bit. It reduces switching power and glitches for FSMs that move through states in sequence, such as counters and FIFO pointers.
Code Example: One-Hot FSM
module onehot_fsm (input wire clk, rst_n, go, done, output wire busy);
// Index-based one-hot: each state is one bit position
localparam IDLE = 0, RUN = 1, FINISH = 2;
reg [2:0] state, next;
always @(posedge clk or negedge rst_n)
if (!rst_n) state <= 3'b001; // IDLE bit set
else state <= next;
always @(*) begin
next = 3'b000;
case (1'b1) // "reverse case" for one-hot
state[IDLE]: next[go ? RUN : IDLE] = 1'b1;
state[RUN]: next[done ? FINISH : RUN ] = 1'b1;
state[FINISH]: next[IDLE] = 1'b1;
default: next[IDLE] = 1'b1; // recover from illegal state
endcase
end
assign busy = state[RUN]; // one bit, no decoding needed
endmodule
Practical Notes
Synthesis tools can re-encode FSMs automatically (FSM extraction), so the RTL encoding may change in the netlist.
For safety-critical designs, add illegal-state recovery or use “safe” FSM synthesis options.
27
What are setup time and hold time?
KnownRevise
Setup time is the minimum time the data input of a flip-flop must be stable before the active clock edge, and hold time is the minimum time it must stay stable after that edge. If either is violated, the flip-flop may capture a wrong value or go metastable.
Read full answerHide full answer
Applies toVLSI design (static timing analysis)
Why They Exist
Inside a flip-flop, the input passes through internal gates (a master latch) before the clock edge closes it. Setup time covers the time data needs to propagate into the latch before it closes; hold time covers the time the old data must remain while the latch is closing, so new data does not race in.
Timing Picture
|<- Tsetup ->|<- Thold ->|
DATA ====X============stable=======X====
CLK ______________|‾‾‾‾‾‾‾‾‾‾
^ active edge
Emphasise that a setup violation can be fixed after manufacture by slowing the clock, but a hold violation cannot, so a chip with a hold violation is broken at any frequency.
28
What is the setup time equation for a flip-flop-to-flip-flop path?
KnownRevise
For a path from a launch flip-flop to a capture flip-flop, the setup condition requires the data launched at one clock edge to arrive at the capture flop at least Tsetup before the next clock edge: Tclk_to_q + Tcomb_max + Tsetup ≤ Tclk + Tskew − Tjitter. Setup slack is the right side minus the left side and must be zero or positive.
Read full answerHide full answer
Applies toVLSI design (static timing analysis)
Terms
Tclk_to_q: clock-to-output delay of the launch flip-flop (use the maximum value).
Tcomb_max: maximum delay of the combinational logic and wires between the flops.
Maximum frequency for this path: Tclk_min = Tclk_to_q + Tcomb_max + Tsetup + uncertainty − skew = 0.10 + 0.65 + 0.06 + 0.05 − 0.05 = 0.81 ns, so f_max ≈ 1.23 GHz.
What Affects Setup
Longer logic depth or heavy fan-out increases Tcomb_max.
Setup is checked at the slow corner (slow process, low voltage, high temperature for most nodes).
Positive skew helps setup but hurts hold on the same path.
On-chip variation (OCV/AOCV/POCV derates) makes the launch path slower and the capture path faster in analysis, reducing slack.
Interview Tip
Write the equation, then immediately state that setup depends on the clock period, unlike hold. Interviewers often follow up with “how would you fix a negative setup slack?”
29
What is the hold time equation, and why is it independent of clock frequency?
KnownRevise
The hold condition requires that new data launched at a clock edge does not reach the capture flip-flop before that same edge’s hold window ends: Tclk_to_q_min + Tcomb_min ≥ Thold + Tskew. Both sides refer to the same clock edge, so the clock period never appears in the equation and changing the frequency cannot fix a hold violation.
Read full answerHide full answer
Applies toVLSI design (static timing analysis)
Terms
Tclk_to_q_min: minimum clock-to-output delay of the launch flop.
Tcomb_min: minimum (shortest) delay through the logic between the flops.
Thold: hold time of the capture flop.
Tskew: capture clock arrival − launch clock arrival. Positive skew makes hold harder.
Setup compares data launched at edge N with capture edge N+1, so the period is part of the check.
Hold compares data launched at edge N with the capture flop still holding the data from edge N. The race happens around a single edge, so the period cancels out.
Consequence: a chip with a hold violation fails at every clock speed, while a setup violation can be worked around by lowering the frequency.
Fix: insert delay cells or buffers of at least 0.07 ns on the data path (and check that setup still has margin).
Where Hold Problems Appear
Short paths such as shift registers and scan chains (one flop directly feeding another).
Paths with large positive clock skew after clock tree synthesis.
The fast corner (fast process, high voltage, and the temperature that gives the fastest delay).
Interview Tip
Hold is normally fixed after CTS, because before CTS the clock is ideal and skew is unknown. Mention that over-fixing hold can create setup violations, so tools fix hold only where setup slack allows.
30
How do you fix a setup violation?
KnownRevise
A setup violation means data arrives at the capture flip-flop too late, so the fix is to make the data path faster, make the capture clock arrive later, or give the path more time. Engineers try design-level fixes first, then physical optimisation, and lower the clock frequency only as a last resort.
Read full answerHide full answer
Applies toVLSI design (timing closure, ASIC and FPGA)
Recall the Condition
Tclk_to_q + Tcomb_max + Tsetup ≤ Tclk + Tskew − uncertainty. To fix negative slack, reduce the left side or increase the right side.
Swap to low-Vt cells: LVT/ULVT cells are faster, at the cost of more leakage.
Buffer insertion and splitting: break long wires or high-fan-out nets.
Logic restructuring: move late-arriving signals closer to the output of the logic cone, or rebalance the logic.
Placement and routing: move cells closer together, use upper metal layers with lower resistance, and route critical nets with non-default rules (wider spacing).
Pin swapping: connect the critical signal to the faster input pin of a gate.
Design (RTL) Fixes
Pipelining: add a register stage to split the long path (adds latency).
Retiming: move existing registers to balance logic between stages.
Reduce logic depth: use faster architectures, for example a carry-lookahead or parallel-prefix adder instead of a ripple-carry adder.
Duplicate registers or logic to reduce fan-out.
One-hot FSM encoding for faster next-state logic.
Clock-Based Fixes
Useful skew: delay the capture clock (or advance the launch clock) to borrow time from the next stage, if that stage has slack.
Timing exceptions: if the path is really a multicycle or false path, apply the correct constraint (only when the design actually works that way).
Lower frequency: the last option, since it changes the specification.
Example
Slack = −0.12 ns on a path through 12 logic levels. Swapping three cells to LVT gains 0.06 ns, and upsizing a weak driver on a fan-out-of-20 net gains 0.08 ns, giving slack = +0.02 ns.
Best Practices
Check whether the path is real (not a false or multicycle path) before fixing it.
Re-check hold, leakage and congestion after each fix.
Fix the worst negative slack first, but watch total negative slack across the design.
31
How do you fix a hold violation?
KnownRevise
A hold violation means new data reaches the capture flip-flop too soon after the clock edge, so the fix is to add delay to the fast data path or reduce the clock skew that makes the capture clock late. Unlike setup, hold cannot be fixed by changing the clock frequency.
Read full answerHide full answer
Applies toVLSI design (timing closure)
Recall the Condition
Tclk_to_q_min + Tcomb_min ≥ Thold + Tskew + uncertainty. To fix negative hold slack, make the data path slower or reduce positive skew.
Common Fixes
Insert delay cells or buffers on the data path, close to the capture flop’s D pin. This is the standard fix, done automatically by tools after CTS.
Downsize cells on the short path, or swap to slower high-Vt cells.
Detour routing: a longer wire adds delay (used sparingly).
Reduce skew: rebalance the clock tree so the capture clock does not arrive much later than the launch clock.
Use a flop with a smaller hold requirement or with built-in delay (some libraries offer these).
Lock-up latches for scan chains that cross clock domains or have large skew.
Worked Example
Data arrival (min) = 0.12 ns, hold requirement including skew and uncertainty = 0.20 ns, so slack = −0.08 ns. Inserting a delay cell of 0.10 ns gives arrival = 0.22 ns and slack = +0.02 ns. Then check that the same path still meets setup: if setup slack was +0.30 ns, it is now about +0.20 ns, which is still fine.
When to Fix Hold
After CTS: before clock tree synthesis the clock is ideal (zero skew), so real hold violations are not visible. Hold fixing normally happens post-CTS and again after routing.
At the fast corner: hold is checked at the fast process, high voltage and low-delay temperature corner, where data paths are quickest.
Also check hold at the slow corner, since skew can differ between corners.
Pitfalls
Over-fixing: adding too much delay can create setup violations on the same path, or on paths that share the logic.
Area and power: thousands of hold buffers add area, routing congestion and leakage.
Fixing in the wrong place: adding delay near the launch flop also delays other fan-out paths; insert near the capture flop.
Interview Tip
Stress the key fact: a hold violation in silicon makes the chip fail at any frequency, so hold must be closed with margin at sign-off.
32
What is clock skew, and can positive skew help timing?
KnownRevise
Clock skew is the difference in arrival time of the same clock edge at two flip-flops: skew = capture clock arrival − launch clock arrival. Positive skew (capture clock later) gives a path more time and helps setup, but it makes hold harder by the same amount.
Read full answerHide full answer
Applies toVLSI design (clock tree and static timing analysis)
Causes of Skew
Different wire lengths and buffer counts in the clock tree.
Different loads on clock buffers.
Process, voltage and temperature variation across the die (on-chip variation).
Deliberate skew inserted by tools (useful skew).
Effect on Setup and Hold
Setup: Tclk_to_q + Tcomb_max + Tsetup ≤ Tclk + skew → positive skew increases the time available.
Hold: Tclk_to_q + Tcomb_min ≥ Thold + skew → positive skew increases the hold requirement.
With zero skew: 0.1 + 0.85 + 0.1 = 1.05 ns > 1.0 ns → slack −0.05 ns.
With +0.1 ns useful skew on the capture flop: required = 1.0 + 0.1 = 1.1 ns → slack +0.05 ns.
The next stage (where this capture flop launches) now has 0.1 ns less time, so useful skew only works if that stage has spare slack. The hold check on this path also loses 0.1 ns of margin.
Global vs Local Skew
Local skew: between flops that actually talk to each other; this is what matters for timing.
Global skew: maximum difference between any two flops on the clock; matters less, but is reported.
Useful Skew
Modern place-and-route tools (concurrent clock and data optimisation, CCOpt) deliberately skew clocks to balance slack between consecutive pipeline stages, instead of aiming for zero skew everywhere.
Interview Tip
Answer “yes, positive skew can help setup”, then add immediately “but it reduces hold margin and borrows time from the next stage”, which shows you understand the trade-off.
33
What is clock jitter?
KnownRevise
Clock jitter is the variation in the timing of clock edges from their ideal positions, so consecutive periods are not exactly equal. It comes from noise in the clock source (PLL or oscillator) and the clock distribution network, and STA accounts for it as clock uncertainty.
Read full answerHide full answer
Applies toVLSI design (clocking and static timing analysis)
Jitter vs Skew
Aspect
Skew
Jitter
Definition
Spatial: same edge arrives at different flops at different times
Temporal: edges at one point vary from cycle to cycle
Nature
Mostly deterministic and static
Random and deterministic variation over time
Source
Clock tree imbalance
PLL noise, supply noise, crosstalk
Can be useful?
Yes (useful skew)
No; always reduces margin
Types of Jitter
Period jitter: deviation of one clock period from the ideal period.
Cycle-to-cycle jitter: difference between two consecutive periods.
Long-term (accumulated) jitter: deviation of an edge from its ideal position over many cycles.
Random jitter (thermal noise, Gaussian, unbounded) and deterministic jitter (supply noise, crosstalk, duty-cycle distortion, bounded).
Effect on Timing
Setup: the capture edge may arrive early and the launch edge late, shortening the effective period. Jitter is subtracted from the available time.
Hold: launch and capture use the same edge, so cycle-to-cycle jitter mostly cancels; hold uncertainty is usually smaller and covers skew and margin.
Before CTS, uncertainty also includes estimated skew; after CTS, real skew is calculated and the uncertainty is reduced to jitter plus margin.
Worked Example
With Tclk = 1.0 ns and 50 ps of setup uncertainty, the path must fit in 0.95 ns: Tclk_to_q + Tcomb_max + Tsetup ≤ 0.95 ns.
Reducing Jitter
Low-noise PLL design and clean, decoupled supplies for the PLL.
Shielding clock nets from aggressor signals.
Minimising supply noise (IR drop) in the clock tree buffers.
34
What is static timing analysis (STA)?
KnownRevise
Static timing analysis (STA) is a method that checks whether every timing path in a digital design meets its setup and hold requirements, by calculating delays mathematically from the netlist, cell libraries and constraints, without simulating input vectors. It is the standard sign-off method for timing in ASIC and FPGA flows.
Read full answerHide full answer
Applies toVLSI design (timing analysis, sign-off)
How STA Works
Inputs: the gate-level netlist, the standard cell timing libraries (.lib/Liberty), parasitics (SPEF from extraction) and constraints (SDC: clocks, I/O delays, exceptions).
Path breakdown: the design is split into timing paths, each starting at a startpoint (input port or flop clock pin) and ending at an endpoint (output port or flop data pin).
Delay calculation: cell delays from library tables (input slew and output load) plus wire delays from parasitics.
Checks: for each path, compute arrival time and required time, then slack = required − arrival.
Reporting: worst negative slack (WNS), total negative slack (TNS) and failing endpoints.
Four Path Types
Input port → flip-flop
Flip-flop → flip-flop
Flip-flop → output port
Input port → output port (pure combinational)
What STA Checks
Setup and hold on all flops.
Recovery and removal on asynchronous reset/set pins.
Clock gating setup and hold.
Maximum transition, capacitance and fan-out (design rule checks).
Minimum pulse width and clock period.
Multi-Corner Multi-Mode (MCMM)
Timing is checked across PVT corners (for example slow corner for setup, fast corner for hold) and functional modes (normal, test/scan, low power). On-chip variation is modelled with derates (OCV, AOCV, POCV/SOCV).
Advantages and Limitations
Advantages
Limitations
Exhaustive: covers all paths
Does not check functionality
Fast, no test vectors needed
Depends on correct constraints; wrong SDC gives wrong results
Handles millions of paths
Pessimistic for false paths unless constrained
Works at every implementation stage
Asynchronous (CDC) behaviour needs separate checks
Tools
Synopsys PrimeTime and Cadence Tempus for ASIC sign-off; AMD Vivado and Intel Quartus Timing Analyzer for FPGAs.
35
What is the difference between STA and dynamic timing simulation?
KnownRevise
Static timing analysis (STA) checks timing by calculating the delay of every path without input vectors, while dynamic timing simulation (gate-level simulation with SDF back-annotated delays) runs actual test vectors through the netlist and observes behaviour over time. STA is exhaustive for timing; dynamic simulation checks functionality with real delays but only for the vectors applied.
Read full answerHide full answer
Applies toVLSI design (timing verification)
Comparison
Aspect
STA
Dynamic timing simulation
Needs test vectors
No
Yes
Coverage
All paths, exhaustively
Only paths exercised by the vectors
Speed
Fast, scales to billions of gates
Very slow for large designs
Checks functionality
No
Yes
False paths
Reported unless constrained
Not exercised, so not a problem
Asynchronous logic, CDC
Limited
Can observe behaviour (but not true metastability)
Glitches, X-propagation
Not seen
Seen in simulation
Typical role
Timing sign-off
Confidence checks on netlists, resets, DFT, power-up
Why STA Is the Sign-Off Method
A design has far too many paths and input combinations for simulation to cover them all.
STA guarantees that every path is checked at every corner, which simulation can never promise.
Why Gate-Level Simulation Is Still Used
To check reset and initialisation sequences, including X-propagation from uninitialised flops.
To validate DFT logic (scan shift and capture patterns).
To catch errors in constraints: a wrong false path or multicycle path in SDC would hide a real failure from STA, but simulation with real delays can reveal it.
To check asynchronous interfaces and clock-gating behaviour.
To generate switching activity (SAIF/VCD) for accurate power analysis.
How They Work Together
STA closes timing on all paths at all corners.
Gate-level simulation with SDF delays from the same netlist runs a selected set of tests (boot, reset, key modes) as a sanity check.
Formal equivalence checking confirms the netlist matches the RTL functionally.
Interview Tip
Say that STA proves timing and simulation proves function, and that gate-level simulation is mainly a cross-check on constraints, resets and test logic.
36
What is slack in static timing analysis?
KnownRevise
Slack is the margin by which a timing path meets or fails its requirement: slack = required time − arrival time for setup, and slack = arrival time − required time for hold. Positive slack means the path meets timing; negative slack means it violates timing.
The most negative slack in the design; shows how far the worst path is from passing
TNS (total negative slack)
Sum of negative slacks over all failing endpoints; shows how widespread the problem is
Number of violating endpoints
How many paths fail
A design with WNS = −0.05 ns on three paths is close to closure; one with WNS = −0.05 ns but TNS = −200 ns has thousands of failing paths and needs broader changes.
Interpreting Slack
Zero slack: the path exactly meets timing with no margin; sign-off usually requires a small positive margin.
Large positive slack: the path is faster than needed; tools may downsize cells or use high-Vt cells there to save power and area.
Negative slack: must be fixed (setup: speed up the path; hold: add delay).
Interview Tip
Be precise about direction: for setup the data must arrive before the required time, for hold it must arrive after it. Many candidates mix up the hold slack formula.
37
What are false paths and multicycle paths in timing analysis?
KnownRevise
A false path is a timing path that exists structurally in the netlist but can never propagate data in real operation, so STA should ignore it. A multicycle path is a real path that is designed to take more than one clock cycle to deliver data, so STA should allow it extra cycles. Both are declared in SDC as timing exceptions.
Paths between asynchronous clock domains that are handled by synchronisers (often declared with set_clock_groups -asynchronous instead).
Paths through mutually exclusive mux selects that can never be active together.
Static configuration registers written once at boot and never changed during operation.
Test-mode-only logic during functional-mode analysis.
# Ignore timing from a quasi-static config register
set_false_path -from [get_cells cfg_reg*]
# Asynchronous clock domains (preferred over individual false paths)
set_clock_groups -asynchronous -group {clk_a} -group {clk_b}
Multicycle Paths
Example: a slow arithmetic unit whose result is enabled to be captured only every second cycle.
# Allow 2 cycles for setup on the multiplier path
set_multicycle_path 2 -setup -from [get_cells mul_in_reg*] -to [get_cells mul_out_reg*]
# Move the hold check back to the original edge
set_multicycle_path 1 -hold -from [get_cells mul_in_reg*] -to [get_cells mul_out_reg*]
Why the hold line: setting setup to 2 cycles moves the default hold check to one cycle later as well, which would demand far more hold delay than needed. Adding -hold 1 moves it back to the launch edge.
Effect on Timing
With Tclk = 2 ns and a 2-cycle multicycle path, the setup requirement becomes: Tclk_to_q + Tcomb_max + Tsetup ≤ 4 ns.
Comparison
Aspect
False path
Multicycle path
Path used in operation?
Never
Yes
STA treatment
Not timed at all
Timed with N cycles
Risk if wrong
A real failing path is hidden
Data captured before it settles
Requires design support
No
Yes: enable logic that captures only every N cycles
Best Practices
Every exception must be justified by the design (documented, reviewed, and ideally checked by CDC/formal tools).
Prefer narrow -from/-to targets over wildcard exceptions.
Wrong exceptions are one of the most dangerous sources of silicon failures, because STA reports a clean result while the real path fails.
38
What is the critical path in a digital circuit?
KnownRevise
The critical path is the timing path with the longest delay (the worst setup slack) in a synchronous design. It sets the maximum clock frequency: the clock period cannot be shorter than the critical path delay plus flip-flop overheads.
If pipelining splits the 1.2 ns of logic into two stages of 0.6 ns each, Tclk_min = 0.1 + 0.6 + 0.08 + 0.07 = 0.85 ns → f_max ≈ 1.18 GHz, at the cost of one extra cycle of latency.
How to Find It
STA tools report it directly: report_timing shows the worst path, with each cell and net delay.
In FPGA tools the timing report lists the worst negative slack path.
The critical path can change after each optimisation; fixing one path exposes the next (“near-critical” paths).
Typical Critical Paths
Wide adders and multipliers (carry chains).
Deep comparators and priority encoders.
Long wires between distant blocks.
High fan-out nets such as enables and resets driving many loads.
Memory access paths (SRAM read data to flops).
Ways to Shorten It
Pipelining and retiming registers.
Faster architectures: carry-lookahead or parallel-prefix adders, Wallace/Dadda tree multipliers.
Logic restructuring: put late-arriving inputs near the end of the logic cone.
Cell sizing and low-Vt cells, buffering and better placement.
Parallelism: process data in two lanes at half the rate.
Interview Tip
Clarify that the “longest path” is measured in delay, not number of gates, and that in modern nodes wire delay can dominate, so a path with few gates but long routing may be critical.
39
What is metastability in flip-flops?
KnownRevise
Metastability is a state in which a flip-flop’s output hovers between logic 0 and logic 1 for an unpredictable time, because its input changed inside the setup-hold window around the clock edge. It eventually resolves to a valid 0 or 1, but if downstream logic samples it before then, the system can fail.
A flip-flop contains a bistable latch (cross-coupled inverters) with a balance point midway between 0 and 1.
If data changes too close to the clock edge, the latch can be left near that balance point.
It then takes extra time to fall to one side; the resolution time is random and grows exponentially less likely with time.
When It Occurs
Signals crossing between asynchronous clock domains.
Asynchronous inputs such as push buttons, external interrupts and reset de-assertion.
Setup/hold violations on synchronous paths (a timing bug).
MTBF (Mean Time Between Failures)
MTBF = e^(t_r / τ) / (T_w × f_clk × f_data)
t_r = resolution time allowed before the next stage samples (often about one clock period)
τ = flip-flop resolution time constant (a technology parameter, often tens of picoseconds)
T_w = metastability window (related to setup + hold)
f_clk, f_data = clock frequency and data change rate
Because t_r is in an exponent, adding one more flop stage (one more cycle of resolution time) increases MTBF enormously, for example from hours to many thousands of years.
How to Handle It
Two-flop (or three-flop) synchroniser: the first flop may go metastable; the second samples it a full cycle later, when it has almost certainly resolved.
Handshake protocols and asynchronous FIFOs for multi-bit data.
Gray-code counters so only one bit changes at a time.
Use library synchroniser cells designed for small τ.
Key Point
Metastability cannot be eliminated, only made extremely unlikely. Simulation will not show it (the simulator shows x or a clean value), so CDC structures are checked with dedicated CDC lint tools.
40
What is clock domain crossing (CDC)?
KnownRevise
A clock domain crossing (CDC) occurs when a signal generated by logic on one clock is captured by logic on a different, asynchronous (or unrelated) clock. Because the receiving flop can sample the signal during a transition, CDC paths risk metastability, data loss and incoherent multi-bit values, so they need dedicated synchronisation circuits.
Read full answerHide full answer
Applies toVLSI design (multi-clock RTL design and verification)
Why CDC Is a Problem
Metastability: the capture flop may sample during the source signal’s transition.
Data loss: a short pulse in a fast domain may be missed by a slower clock.
Data incoherency: bits of a multi-bit bus may be captured on different cycles, giving a value that never existed.
Re-convergence: separately synchronised signals that recombine later may be out of step.
Standard Synchronisation Techniques
Situation
Technique
Single-bit level signal (slow changing)
Two-flop synchroniser
Single-bit pulse, fast to slow domain
Pulse stretching, or toggle synchroniser
Multi-bit control or data, low rate
Handshake (req/ack) or MUX-recirculation with a synchronised enable
CDC tools (Synopsys VC SpyGlass CDC, Siemens Questa CDC, Cadence Conformal/Jasper CDC) check structures, missing synchronisers and re-convergence.
Simulation with metastability injection and formal checks of handshake protocols complete the picture.
41
How does a two-flip-flop synchroniser work?
KnownRevise
A two-flip-flop synchroniser passes a single-bit asynchronous signal into a new clock domain through two flip-flops in series, both clocked by the destination clock. The first flop may go metastable, but it has a full clock cycle to resolve before the second flop samples it, so the output is almost always a clean, valid level.
Read full answerHide full answer
Applies toVLSI design (clock domain crossing)
How It Works
The asynchronous input feeds the D pin of flop 1 (FF1).
If the input changes inside FF1’s setup-hold window, FF1 may go metastable.
FF1’s output has nearly one destination clock period to settle to 0 or 1.
FF2 samples FF1’s output at the next edge; the probability that FF1 is still metastable then is extremely small.
Logic in the destination domain uses only FF2’s output.
Code Example
module sync_2ff (
input wire clk_dst, // destination clock
input wire rst_n,
input wire d_in, // from a flop in the source domain
output wire d_sync
);
(* ASYNC_REG = "TRUE" *) // FPGA hint: keep the flops close together
reg ff1, ff2;
always @(posedge clk_dst or negedge rst_n) begin
if (!rst_n) begin
ff1 <= 1'b0;
ff2 <= 1'b0;
end else begin
ff1 <= d_in; // may go metastable
ff2 <= ff1; // resolved value
end
end
assign d_sync = ff2;
endmodule
MTBF Improvement
MTBF ∝ e^(t_r/τ). With one flop, t_r is nearly zero (the next logic samples immediately). With two flops, t_r ≈ one clock period, so MTBF rises by a factor of e^(Tclk/τ). For Tclk = 1 ns and τ = 20 ps that factor is e^50, turning a failure every microsecond into effectively never. High-frequency or safety-critical designs use three flops.
Rules for Correct Use
Single bit only: never synchronise each bit of a bus separately; bits may resolve on different cycles.
Registered source: drive the input from a flop in the source domain, not combinational logic, to avoid glitches being captured.
No logic between FF1 and FF2, and place them close together.
Slow enough signals: the input must stay stable for at least about 1.5 destination clock periods, or pulses can be missed. For fast-to-slow pulses use a toggle synchroniser or handshake.
Adds two cycles of latency.
Interview Tip
Point out that the synchroniser does not prevent metastability; it gives it time to resolve, and its reliability is quantified by MTBF.
42
How do you safely transfer multi-bit data across clock domains?
KnownRevise
Multi-bit data cannot be passed across a clock domain crossing by synchronising each bit with its own two-flop synchroniser, because the bits may be captured on different cycles and form a value that never existed. Safe methods keep the data stable and synchronise only a single control signal, or use Gray-coded values or an asynchronous FIFO.
Read full answerHide full answer
Applies toVLSI design (clock domain crossing)
The Problem
If a 4-bit bus changes from 0111 to 1000, and each bit is synchronised separately, the receiver might capture 1111 or 0000 for one cycle, an incoherent value.
Safe Techniques
Technique
How it works
Best for
Handshake (req/ack)
Source holds data stable, sends a request through a synchroniser; destination captures data and returns an acknowledge
Low-rate control or configuration data
MUX recirculation (enable synchroniser)
A single “data valid” bit is synchronised; the destination loads the stable bus only when it sees the synchronised enable
Occasional data words
Gray code
Only one bit changes per increment, so any captured value is either the old or new count
Counters and FIFO pointers
Asynchronous FIFO
Dual-clock memory with Gray-coded read/write pointers synchronised across domains
Continuous data streams
Pulse/toggle synchroniser plus data hold
A toggle signal marks new data; data held for several cycles
Event-plus-data transfers
Handshake Sequence
Source puts data on the bus and raises req (data now held stable).
req passes through a two-flop synchroniser into the destination domain.
Destination captures the data (stable for several cycles) and raises ack.
ack is synchronised back; the source lowers req and may change the data.
Latency is several cycles of both clocks, so a handshake suits infrequent transfers.
Code Sketch: Enable-Based Capture
// Destination domain: load the bus only after the synchronised valid bit rises
reg v1, v2, v3;
always @(posedge clk_dst) begin
{v3, v2, v1} <= {v2, v1, valid_src}; // 2-flop sync plus edge-detect flop
if (v2 & ~v3) // rising edge of synchronised valid
data_dst <= data_src; // data_src has been stable for cycles
end
Design Rules
Data must stay stable from before the control signal changes until the receiver has captured it.
Constrain the data bus with a set_max_delay -datapath_only (or similar) so its skew stays within the synchroniser latency.
Verify with CDC tools, which recognise these schemes and flag unsynchronised buses.
43
What is an asynchronous FIFO, and why does it use Gray code pointers?
KnownRevise
An asynchronous FIFO is a dual-clock buffer where data is written with one clock and read with another, unrelated clock, making it the standard way to stream data across clock domains. Its read and write pointers are converted to Gray code before being synchronised into the other domain, because only one bit of a Gray code changes per increment, so a pointer sampled mid-change is always either the old or the new value.
Read full answerHide full answer
Applies toVLSI design (clock domain crossing)
Structure
Dual-port memory: written in the write domain, read in the read domain.
Write pointer (binary and Gray) in the write domain; read pointer in the read domain.
Synchronisers: the Gray write pointer is synchronised into the read domain (two flops) to compute empty; the Gray read pointer is synchronised into the write domain to compute full.
Pointers have one extra MSB (N+1 bits for 2^N entries) to distinguish full from empty.
Why Gray Code
Binary 0111 → 1000 changes four bits at once. Sampled during the change, a synchroniser could see any mix (for example 1111), making full or empty wrong. Gray 0100 → 1100 changes one bit, so the sampled value is 0100 or 1100, both valid.
Full (write domain): the two MSBs of the write Gray pointer are the inverse of the synchronised read Gray pointer’s two MSBs, and all other bits are equal.
Code Example: Pointer and Empty Flag (Read Side)
// ADDR = address width; pointers are ADDR+1 bits
reg [ADDR:0] rbin, rgray;
wire [ADDR:0] rbin_next = rbin + (rd_en & ~empty);
wire [ADDR:0] rgray_next = rbin_next ^ (rbin_next >> 1); // binary to Gray
always @(posedge rclk or negedge rrst_n)
if (!rrst_n) {rbin, rgray} <= '0;
else {rbin, rgray} <= {rbin_next, rgray_next};
// wgray_sync: write Gray pointer passed through a 2-flop synchroniser into rclk
always @(posedge rclk or negedge rrst_n)
if (!rrst_n) empty <= 1'b1;
else empty <= (rgray_next == wgray_sync);
Why the Flags Are Safe
Synchronisation delay makes the flags pessimistic: empty may stay asserted a few cycles after data arrives, and full may stay asserted after space frees up. The FIFO never overflows or underflows; it only loses a little throughput.
Sizing
Depth must cover the burst length and the rate difference: for a 100-word burst written at 200 MHz and read at 150 MHz, during the burst (0.5 µs) the reader removes 75 words, so at least 25 entries are needed (plus margin for synchroniser latency).
44
What is logic synthesis, and what inputs does a synthesis tool need?
KnownRevise
Logic synthesis is the automated conversion of RTL (Verilog, SystemVerilog or VHDL) into an optimised gate-level netlist built from cells of a target standard cell library, meeting timing, area and power goals. The tool needs the RTL, the cell libraries and the design constraints.
Read full answerHide full answer
Applies toVLSI design (ASIC synthesis)
Inputs
RTL source files: the synthesisable design and the top module name.
Technology libraries: Liberty (.lib / compiled .db) files with each cell’s function, timing, power and area at specific PVT corners.
Constraints (SDC): clocks, input/output delays, false and multicycle paths, max transition/capacitance, driving cells and loads.
Physical information (optional, for physically aware synthesis): LEF/technology files and a floorplan (DEF), so wire delays are estimated more accurately.
Other settings: DFT configuration, dont_use cell lists, operating conditions, and power intent (UPF) for low-power designs.
Synthesis Steps
Translation / elaboration: parse RTL and build a generic, technology-independent logic representation (operators, muxes, flops).
Clean up lint and latch warnings before synthesis.
Check that all clocks are defined and no paths are unconstrained.
Run logic equivalence checking (LEC) between RTL and netlist.
Review the synthesis log carefully; ignored constructs (delays, initial) are warnings, not errors.
45
What are SDC constraints?
KnownRevise
SDC (Synopsys Design Constraints) is a Tcl-based format that tells synthesis, place-and-route and STA tools the timing intent of a design: the clocks, the delays at the inputs and outputs, the environment, and any timing exceptions. Without correct SDC, the tools cannot know what “meeting timing” means.
Read full answerHide full answer
Applies toVLSI design (synthesis and static timing analysis)
Clock relationships: set_clock_groups -asynchronous or -logically_exclusive.
Modes: set_case_analysis to fix a signal (for example scan enable = 0 in functional mode).
Example
# 500 MHz system clock on port clk
create_clock -name clk -period 2.0 -waveform {0 1.0} [get_ports clk]
# Divided-by-2 clock generated inside the design
create_generated_clock -name clk_div2 -source [get_ports clk] \
-divide_by 2 [get_pins u_div/q_reg/Q]
set_clock_uncertainty -setup 0.10 [get_clocks clk]
set_clock_uncertainty -hold 0.05 [get_clocks clk]
# External devices use 0.8 ns of the 2.0 ns period on the input side
set_input_delay 0.8 -clock clk [remove_from_collection [all_inputs] [get_ports clk]]
set_output_delay 0.6 -clock clk [all_outputs]
set_driving_cell -lib_cell BUFX4 [all_inputs]
set_load 0.02 [all_outputs]
# Unrelated clock coming from a separate PLL
set_clock_groups -asynchronous -group {clk clk_div2} -group {clk_eth}
How the Numbers Work
For an input path, the internal logic gets: Tclk − input delay − Tsetup − uncertainty. With the values above: 2.0 − 0.8 − setup − 0.10, leaving about 1.0 ns for logic inside the chip.
Best Practices
Define every clock, including generated clocks from dividers and muxes.
Check for unconstrained paths with reports such as check_timing.
Keep exceptions minimal and documented; wrong false paths hide real failures.
Use the same SDC (adapted per stage) through synthesis, P&R and sign-off.
46
What is a standard cell library?
KnownRevise
A standard cell library is a collection of pre-designed, pre-characterised logic cells (gates, flip-flops, buffers and more) for a specific process technology, all built with the same height so they can be placed in rows. Synthesis maps RTL onto these cells, and place-and-route tools assemble them into a chip layout.
Each cell is simulated in SPICE across input slews and output loads, producing lookup tables of delay, output transition, power and setup/hold times. This is repeated at each PVT corner (for example ss_0.72V_125C, ff_0.88V_−40C).
Physical Design Rules
Fixed height measured in tracks (for example 6-track or 7.5-track cells); width varies with function.
Shared power rails: VDD and VSS run along the top and bottom of each cell, so adjacent cells in a row share them.
Cells are flipped in alternate rows so rails align.
Interview Tip
Mention the trade-off between drive strength and Vt choices: tools pick the smallest, highest-Vt cell that still meets timing to save power and area.
47
What are PVT corners in VLSI?
KnownRevise
PVT corners are combinations of Process, Voltage and Temperature at which a chip’s timing and power are analysed, so that the design works across the full range of manufacturing variation and operating conditions. The slowest corner is used mainly for setup checks and the fastest corner for hold checks.
Read full answerHide full answer
Applies toVLSI design (static timing analysis and sign-off)
The Three Variables
Process (P): manufacturing variation in transistor parameters. Labelled by NMOS/PMOS speed: SS (slow-slow), TT (typical), FF (fast-fast), and skewed corners SF and FS.
Voltage (V): supply variation, typically nominal ±10% (for example 0.72 V, 0.80 V, 0.88 V for a 0.8 V design).
Temperature (T): operating range, commonly −40 °C to 125 °C for industrial/automotive parts.
Typical Corners
Corner
Delay
Main use
SS, low V, high T (e.g. ss_0.72V_125C)
Slowest (in older nodes)
Setup
SS, low V, low T (e.g. ss_0.72V_−40C)
Slowest in advanced nodes (temperature inversion)
Setup
FF, high V, low T (e.g. ff_0.88V_−40C)
Fastest
Hold
FF, high V, high T (e.g. ff_0.88V_125C)
Fast, highest leakage
Hold, leakage power
TT, nominal V, 25 °C
Typical
Power estimates, characterisation
Temperature Inversion
At advanced nodes with low supply voltage, transistors can become slower at low temperature, because threshold voltage rises as temperature falls and that effect outweighs improved mobility. So both hot and cold slow corners must be checked for setup.
RC Corners
Interconnect also varies: Cworst, Cbest, RCworst, RCbest and typical extraction corners are combined with PVT corners, since wire delay is a large part of path delay.
Multi-Corner Multi-Mode (MCMM)
Sign-off runs every relevant combination of PVT corner, RC corner and mode (functional, scan shift, scan capture). Tools optimise all scenarios together so a fix in one corner does not break another.
On-Chip Variation
Within one die, cells still differ. OCV/AOCV/POCV derates add extra pessimism (for example slowing launch paths and speeding capture paths) on top of the global corner.
48
What is low-power design, and what are clock gating and power gating?
KnownRevise
Low-power design is the set of architecture, RTL and implementation techniques that reduce a chip’s dynamic and static power. Clock gating cuts dynamic power by stopping the clock to registers that are not changing, and power gating cuts leakage by switching off the supply to idle blocks entirely.
Read full answerHide full answer
Applies toVLSI design (low-power techniques)
Power Components
Dynamic: P = α · C · VDD² · f (switching activity, capacitance, voltage, frequency).
Static: P = VDD · I_leak (leakage).
Clock Gating
The clock tree and flops can consume a large share of dynamic power (often around a third or more in many designs).
An integrated clock-gating (ICG) cell (a latch plus AND gate) passes the clock only when an enable is active. The latch holds the enable stable while the clock is high, preventing glitches.
Synthesis tools insert ICGs automatically when RTL has an enable pattern:
// RTL with an enable: synthesis replaces the mux with a clock-gating cell
always @(posedge clk)
if (en) data_q <= data_d;
Benefit: removes clock toggling on the gated flops and their part of the clock tree. Cost: clock-gating setup/hold checks and a small area overhead.
Power Gating
Sleep (header or footer) transistors disconnect VDD (header, PMOS) or VSS (footer, NMOS) from a block when it is idle, cutting leakage almost to zero.
Requires extra cells:
Isolation cells clamp outputs of the off block to known values so powered-on logic does not see floating inputs.
Retention flops keep critical state on an always-on supply.
Power controller that sequences shut-down and wake-up.
Costs: wake-up latency, rush (in-rush) current when powering up, area for switches, and more complex verification.
Other Techniques
Multi-Vt cells: high-Vt on non-critical paths to reduce leakage.
Multi-voltage domains with level shifters.
DVFS: lower voltage and frequency when full performance is not needed.
Operand isolation and reduced switching activity in datapaths.
Memory techniques: light sleep and deep sleep modes for SRAMs.
Comparison
Technique
Saves
Latency to resume
Complexity
Clock gating
Dynamic power
None (next cycle)
Low
Power gating
Leakage (and dynamic)
Microseconds
High: UPF, isolation, retention
Low-power intent is described in UPF (IEEE 1801) and verified with power-aware simulation and static checks.
49
What is multi-Vt design?
KnownRevise
Multi-Vt design uses standard cells with different threshold voltages (Vt) on the same chip: low-Vt cells are fast but leak more, while high-Vt cells are slower but leak much less. Tools place fast low-Vt cells only on timing-critical paths and use high-Vt cells everywhere else to cut leakage power without losing speed.
Read full answerHide full answer
Applies toVLSI design (low-power implementation)
Vt Flavours
Cell type
Speed
Leakage
Typical use
ULVT (ultra-low Vt)
Fastest
Highest
A few cells on the most critical paths
LVT (low Vt)
Fast
High
Critical paths
SVT / RVT (standard/regular)
Medium
Medium
General logic
HVT (high Vt)
Slowest
Lowest
Non-critical paths, always-on logic
Subthreshold leakage grows exponentially as Vt decreases, so an LVT cell can leak many times more than an HVT cell of the same function, while being only modestly faster.
How It Is Implemented
The foundry provides the same cell functions in several Vt versions, made with different channel doping or work-function metals, with identical footprints so they can be swapped in place.
Synthesis or P&R flow: start with HVT/SVT cells, then swap to LVT/ULVT only where setup slack is negative (“leakage recovery” works the other way: swap fast cells to HVT where there is spare slack).
Constraints such as a maximum percentage of LVT cells are often set to limit leakage.
Worked Example
A block has 1 million cells. If all were LVT, leakage might be 200 mW. Using HVT for 85% of cells, SVT for 12% and LVT for 3% might cut leakage to around 40 mW, while every path still meets timing because only the critical 3% needed LVT.
Trade-Offs
Variation: Vt variation affects each flavour differently, so timing must be checked at all corners.
Hold: HVT cells help hold timing on short paths.
Mask cost: each Vt flavour can require additional implant masks in the process.
Interview Tip
Mention that multi-Vt optimisation is one of the cheapest leakage-reduction techniques because it needs no extra design structures, unlike power gating.
50
What is DVFS (dynamic voltage and frequency scaling)?
KnownRevise
DVFS (dynamic voltage and frequency scaling) is a power-management technique that lowers a chip’s supply voltage and clock frequency when full performance is not needed, and raises them under heavy load. Because dynamic power is proportional to V² · f, reducing both together saves far more power than reducing frequency alone.
Read full answerHide full answer
Applies toVLSI design (low-power SoC design)
Why It Saves So Much
P_dyn = α · C · V² · f
Example: a core runs at 1.0 V and 2.0 GHz. For a light workload it moves to 0.8 V and 1.4 GHz.
Dynamic power drops by about 55%, while performance drops by only 30%. Leakage also falls with lower voltage.
How It Works
Operating performance points (OPPs): a table of safe voltage-frequency pairs characterised for the chip.
Policy: the OS (for example Linux cpufreq governors) or firmware chooses an OPP based on load, temperature and battery state.
Sequence to speed up: raise the voltage first, wait for it to settle, then raise the frequency.
Sequence to slow down: lower the frequency first, then lower the voltage.
Hardware: a PMIC or on-chip voltage regulator changes the voltage; a PLL or clock divider changes the frequency.
Design Implications
Timing sign-off must cover every OPP, since lower voltage means slower gates; each mode is an STA scenario.
Separate voltage domains for blocks that scale independently, with level shifters on signals between domains.
Adaptive voltage scaling (AVS): on-chip monitors (ring oscillators, critical-path replicas) let each chip run at the minimum safe voltage for its actual process corner.
Memories have minimum operating voltages (Vmin), which can limit how low the voltage goes.
Where It Is Used
Smartphone and laptop CPUs and GPUs, data-centre processors, and any battery-powered or thermally limited SoC.
Interview Tip
Explain why voltage and frequency must change together: frequency is limited by the gate delay at a given voltage, so lowering voltage without lowering frequency causes setup violations.
51
What is UPF in low-power VLSI design?
KnownRevise
UPF (Unified Power Format, IEEE 1801) is a Tcl-based standard for describing a chip’s power intent: its power domains, supply networks, power switches, isolation, retention and level-shifting strategies, separately from the RTL. Simulation, synthesis, place-and-route and verification tools all read the same UPF so low-power structures are implemented and checked consistently.
RTL describes logic but not which blocks can be switched off, which run at different voltages, or what happens to signals crossing between them. Putting this into UPF keeps the RTL clean and lets the power architecture change without editing the design.
Main Concepts
Power domains: groups of logic sharing the same supply and power state.
Supply nets and ports: the VDD/VSS networks feeding each domain.
Power switches: header/footer switches that turn a domain on and off.
Isolation strategies: clamp outputs of a powered-off domain to 0 or 1.
Retention strategies: save and restore register state across power-down.
Level shifters: for signals between domains at different voltages.
Power state table: legal combinations of domain states (for example CPU off while always-on domain is on).
Example (Simplified)
create_power_domain PD_TOP
create_power_domain PD_CPU -elements {u_cpu}
create_supply_net VDD_AON
create_supply_net VDD_CPU
# Switch that powers PD_CPU from the always-on supply
create_power_switch sw_cpu -domain PD_CPU \
-input_supply_port {in VDD_AON} \
-output_supply_port {out VDD_CPU} \
-control_port {en pwr_ctrl/cpu_on} \
-on_state {on_state in {en}}
# Clamp CPU outputs to 0 when it is off
set_isolation iso_cpu -domain PD_CPU -applies_to outputs \
-clamp_value 0 -isolation_signal pwr_ctrl/iso_en -isolation_sense high
# Keep register state while powered down
set_retention ret_cpu -domain PD_CPU -retention_supply_set PD_TOP.primary
Where It Is Used in the Flow
Power-aware simulation (for example VCS NLP, Questa PA, Xcelium) corrupts signals in powered-off domains to catch missing isolation.
Synthesis and P&R insert isolation cells, level shifters, retention flops and power switches.
Static low-power checks (for example VC LP, Conformal Low Power) verify the netlist against the UPF.
CPF
Cadence’s older Common Power Format served the same purpose; UPF is now the industry standard.
52
What is functional verification in VLSI?
KnownRevise
Functional verification is the process of proving that an RTL design behaves exactly as its specification requires, before it is turned into silicon. It uses simulation, formal methods and emulation to find bugs, and it typically takes more engineering effort than writing the design itself.
Read full answerHide full answer
Applies toVLSI design (design verification)
Why It Matters
A bug found after tape-out can cost a new set of masks and months of delay.
Verification commonly takes the majority of a chip project’s effort, which is why design verification (DV) engineers often outnumber RTL designers.
Main Methods
Simulation: a testbench drives inputs into the design and checks outputs. Includes directed tests (specific scenarios) and constrained-random tests (many random but legal scenarios).
Formal verification: mathematically proves properties (assertions) hold for all possible inputs, or finds a counterexample; also used for equivalence checking between RTL and netlist.
Emulation and FPGA prototyping: run the design on special hardware at MHz speeds to boot software and run long tests.
Verification plan: list every feature to be verified, with the tests, assertions and coverage goals for each.
Testbench development: usually SystemVerilog with UVM.
Test writing and regression: thousands of tests run nightly.
Debug: analyse waveforms and logs, file and fix bugs.
Coverage closure: measure code and functional coverage until goals are met.
Sign-off: all planned features verified, coverage met, no open critical bugs.
Key Concepts
Scoreboard / reference model: predicts the expected output to compare against the DUT.
Assertions (SVA): check protocol rules and invariants during simulation and formal analysis.
Coverage: code coverage (lines, branches, toggles, FSM) and functional coverage (scenarios from the spec).
Interview Tip
Describe verification as answering two questions: “Does the design work?” (checking) and “Have we tested enough?” (coverage). Strong candidates mention both.
53
What is a testbench in Verilog and SystemVerilog?
KnownRevise
A testbench is a simulation-only module that instantiates the design under test (DUT), generates clocks, resets and input stimulus, and checks the DUT’s outputs against expected results. It has no ports of its own and is never synthesised.
Stimulus generator: directed values, random values or transactions.
Driver: converts stimulus into pin-level activity following the interface protocol.
Monitor: observes DUT outputs and converts them back into transactions.
Checker / scoreboard: compares actual outputs with expected outputs from a reference model.
Coverage collection and reporting.
Simple testbenches put all of this in one module; UVM testbenches separate each into reusable classes.
Code Example: Self-Checking Testbench
module tb_adder;
logic clk = 0;
logic [7:0] a, b;
logic [8:0] sum;
adder8 dut (.a(a), .b(b), .sum(sum)); // DUT: combinational 8-bit adder
always #5 clk = ~clk; // 100 MHz clock
initial begin
int errors = 0;
repeat (1000) begin
@(posedge clk);
a = $urandom_range(0, 255); // random stimulus
b = $urandom_range(0, 255);
#1; // let combinational logic settle
if (sum !== a + b) begin // check against reference
$error("a=%0d b=%0d sum=%0d expected=%0d", a, b, sum, a + b);
errors++;
end
end
$display("Test finished with %0d errors", errors);
$finish;
end
endmodule
Types of Testbenches
Type
Description
Directed
Hand-written specific scenarios; good for basic features and bugs found later
Self-checking
Compares results automatically instead of reading waveforms
Constrained random
Random legal stimulus to find unexpected corner cases
Layered / UVM
Reusable components, transactions, sequences and coverage
Best Practices
Make every testbench self-checking; manual waveform inspection does not scale.
Use !== (case inequality) in checks so x and z values are detected.
Seed random tests and log the seed so failures can be reproduced.
Add timeouts to stop tests that hang.
54
What is SystemVerilog, and what does it add to Verilog for verification?
KnownRevise
SystemVerilog (IEEE 1800) is a superset of Verilog that adds design improvements and, above all, a full verification language: object-oriented classes, constrained random stimulus, functional coverage, assertions and interfaces. It is the standard language for ASIC verification and the basis of UVM.
always_comb, always_ff, always_latch that express intent and let tools flag mistakes.
enum, struct, typedef, packages for cleaner RTL.
Interfaces and modports to bundle signals between modules.
unique and priority case/if for intent checking.
Verification Features
Classes and OOP: inheritance, polymorphism and virtual methods for reusable testbench components.
Constrained random: rand variables and constraint blocks, solved with randomize().
Functional coverage: covergroup, coverpoint and cross to measure which scenarios were exercised.
Assertions (SVA): immediate and concurrent assertions to check temporal behaviour.
Dynamic data types: dynamic arrays, queues, associative arrays and strings.
Process control: fork/join_any/join_none, mailboxes, semaphores and events.
Clocking blocks and program blocks to avoid race conditions between testbench and DUT.
DPI: Direct Programming Interface for calling C/C++ models.
Code Example: Constrained Random Plus Coverage
class packet;
rand bit [7:0] addr;
rand bit [15:0] len;
constraint c_len { len inside {[1:1500]}; } // legal lengths
constraint c_addr { addr dist { 0 := 10, [1:254] :/ 80, 255 := 10 }; }
endclass
module tb;
packet p = new();
covergroup cg;
coverpoint p.len { bins small = {[1:64]}; bins large = {[1024:1500]}; }
endgroup
cg cov = new();
initial begin
repeat (500) begin
if (!p.randomize()) $fatal(1, "randomize failed");
cov.sample(); // record coverage
end
$display("Coverage = %0.1f%%", cov.get_coverage());
end
endmodule
Why It Replaced Plain Verilog Testbenches
Plain Verilog has no classes, no constraint solver and no coverage, so building reusable, random, measurable testbenches was difficult. SystemVerilog made methodologies like UVM possible, and all major simulators (VCS, Xcelium, Questa) support it.
55
What is UVM in verification?
KnownRevise
UVM (Universal Verification Methodology) is a standard SystemVerilog class library and methodology for building reusable, scalable, constrained-random testbenches. It defines standard components (driver, monitor, sequencer, agent, scoreboard), a phased execution model and communication through transaction-level ports, so verification IP can be reused across projects.
Read full answerHide full answer
Applies toVLSI design (UVM 1.2 / IEEE 1800.2)
Why UVM Exists
Before UVM, companies used OVM, VMM and their own frameworks, so testbenches were hard to share.
Accellera released UVM in 2011; it was standardised as IEEE 1800.2 in 2017 (revised 2020).
It is supported by all major simulators.
Key Concepts
Transactions (uvm_sequence_item): data objects such as a bus read or write.
Sequences (uvm_sequence): generate streams of transactions, often constrained random.
class my_test extends uvm_test;
`uvm_component_utils(my_test)
my_env env;
function new(string name, uvm_component parent);
super.new(name, parent);
endfunction
function void build_phase(uvm_phase phase);
super.build_phase(phase);
env = my_env::type_id::create("env", this); // factory creation
endfunction
task run_phase(uvm_phase phase);
my_seq seq = my_seq::type_id::create("seq");
phase.raise_objection(this); // keep simulation running
seq.start(env.agent.sequencer);
phase.drop_objection(this); // allow it to end
endtask
endclass
Benefits and Costs
Benefits: reuse, standard structure, easy test variation through factory overrides and sequences, built-in reporting.
Costs: steep learning curve and heavy boilerplate; too much for very small blocks.
56
What are the main components of a UVM testbench?
KnownRevise
A UVM testbench is built from standard components: the sequencer, driver and monitor (grouped into an agent), a scoreboard for checking, an environment that holds them, and a test that configures everything and starts sequences. Each has one clear job, which makes the parts reusable.
Read full answerHide full answer
Applies toVLSI design (UVM 1.2 / IEEE 1800.2)
Component Roles
Component
Base class
Role
Sequence item
uvm_sequence_item
One transaction (e.g. address, data, read/write)
Sequence
uvm_sequence
Generates a series of transactions
Sequencer
uvm_sequencer
Arbitrates between sequences and hands items to the driver
Driver
uvm_driver
Converts transactions into pin wiggles on the DUT interface
Monitor
uvm_monitor
Watches the pins and reconstructs transactions; broadcasts them on an analysis port
Agent
uvm_agent
Groups sequencer, driver and monitor for one interface; active (drives) or passive (monitors only)
Scoreboard
uvm_scoreboard
Compares observed transactions against expected results from a reference model
Coverage collector
uvm_subscriber
Samples functional coverage from monitored transactions
Environment
uvm_env
Contains agents, scoreboards and coverage
Test
uvm_test
Top of the hierarchy; configures the environment and runs sequences
Data Flow
The test starts a sequence on a sequencer.
The sequence creates randomised items and sends them to the sequencer.
The driver pulls items (seq_item_port.get_next_item), drives them on the virtual interface, and calls item_done.
The monitor samples the interface and writes transactions to its analysis port.
The scoreboard and coverage collector receive those transactions and check or record them.
Driver Example
class bus_driver extends uvm_driver #(bus_item);
`uvm_component_utils(bus_driver)
virtual bus_if vif;
function new(string name, uvm_component parent);
super.new(name, parent);
endfunction
function void build_phase(uvm_phase phase);
if (!uvm_config_db#(virtual bus_if)::get(this, "", "vif", vif))
`uvm_fatal("NOVIF", "virtual interface not set")
endfunction
task run_phase(uvm_phase phase);
forever begin
seq_item_port.get_next_item(req); // get a transaction
@(posedge vif.clk);
vif.addr <= req.addr; // drive pins
vif.wdata <= req.data;
vif.valid <= 1'b1;
@(posedge vif.clk);
vif.valid <= 1'b0;
seq_item_port.item_done(); // tell the sequencer we are done
end
endtask
endclass
Interview Tip
Explain why the monitor is separate from the driver: the monitor must also work in passive agents (for example at system level, where another block drives the bus), and checking must never rely on what the driver intended to send.
57
What is constrained random verification?
KnownRevise
Constrained random verification generates test stimulus randomly, but only within constraints that keep it legal and meaningful, so a testbench can explore many scenarios, including corner cases nobody thought to write by hand. It is combined with self-checking scoreboards and functional coverage to know what has been tested.
Constraints stop the randomiser from producing illegal or useless inputs.
How It Works in SystemVerilog
Declare variables with rand (any value repeats possible) or randc (cyclic: all values before repeating).
Write constraint blocks that restrict values and relationships.
Call randomize(); a constraint solver picks values satisfying all constraints.
Use with for inline constraints per call, and dist to weight distributions.
Code Example
class mem_txn;
rand bit write;
rand bit [31:0] addr;
rand bit [3:0] burst_len;
constraint c_align { addr[1:0] == 2'b00; } // word aligned
constraint c_range { addr inside {[32'h1000_0000:32'h1FFF_FFFC]}; }
constraint c_burst { burst_len inside {1, 2, 4, 8}; }
constraint c_mix { write dist { 1 := 60, 0 := 40 }; } // 60% writes
endclass
// In a test or sequence:
mem_txn t = new();
repeat (1000) begin
if (!t.randomize() with { burst_len == 8 -> write == 1; }) // inline constraint
$fatal(1, "randomization failed");
// send t to the driver ...
end
The Verification Loop (Coverage-Driven Verification)
Write constraints from the specification.
Run many random tests with different seeds.
Check results automatically with a scoreboard and assertions.
Measure functional coverage.
Add or tighten constraints (or write directed tests) for uncovered areas.
Repeat until coverage goals are met.
Best Practices
Always log the random seed; rerunning with the same seed must reproduce a failure.
Avoid over-constraining, which removes the benefit of randomness.
Watch for constraint conflicts (randomize returns 0) and solver performance.
Use solve ... before ... when distributions are skewed by constraint dependencies.
58
What is the difference between functional coverage and code coverage?
KnownRevise
Code coverage is measured automatically by the simulator and shows which parts of the RTL code were executed (lines, branches, conditions, toggles, FSM states). Functional coverage is written by the verification engineer from the specification and shows which features and scenarios were exercised. Both are needed: 100% code coverage does not prove the specified functions were tested.
A FIFO’s RTL may reach 100% line coverage with a few writes and reads, yet the tests may never have written while full, read while empty, or done simultaneous read and write at the full boundary. Functional coverage makes those scenarios explicit:
Condition/expression: each sub-condition evaluated both true and false.
Toggle: each bit toggled 0→1 and 1→0.
FSM: each state and transition visited.
How They Are Used Together
Functional coverage tracks progress against the verification plan.
Code coverage reveals holes: unexecuted code means a missing test, dead code or an unreachable condition (which may be excluded with justification).
Sign-off requires both to meet agreed targets, plus no open bugs.
Interview Tip
Use the phrase “code coverage tells you what you have not tested; functional coverage tells you whether you tested what matters”.
59
What are SystemVerilog assertions (SVA)?
KnownRevise
SystemVerilog assertions (SVA) are statements that check whether the design’s behaviour obeys expected rules, for example “every request is acknowledged within 4 cycles”. They are evaluated during simulation and can also be proved by formal tools, catching bugs right where they occur instead of later at the outputs.
Use disable iff (!rst_n) so assertions do not fire during reset.
Keep each assertion small and focused on one rule.
Put protocol checkers in separate modules and attach them with bind.
60
What is formal verification in VLSI?
KnownRevise
Formal verification uses mathematical analysis, rather than simulation with test vectors, to prove that a design satisfies a property for all possible inputs and states, or to produce a counterexample trace showing how it fails. It is exhaustive within its scope, so it finds corner-case bugs that random simulation may never hit.
Read full answerHide full answer
Applies toVLSI design (formal verification)
Main Types
Equivalence checking (LEC): proves two representations are functionally identical, such as RTL vs synthesised netlist, or netlist before and after an ECO or scan insertion. Tools: Cadence Conformal, Synopsys Formality.
Model checking / formal property verification (FPV): proves SVA properties (assertions) hold for every reachable state, using assume properties to constrain legal inputs. Tools: Cadence Jasper, Synopsys VC Formal, Siemens Questa Formal.
Proving absence of deadlock, overflow, or protocol violations.
Early bug hunting before a full testbench exists.
Data-heavy logic such as large multipliers is harder; it needs specialised techniques.
Pitfalls
Over-constraining with assumptions can hide real bugs.
State explosion limits full proofs on large designs; abstraction and decomposition help.
61
What is the physical design flow in VLSI?
KnownRevise
The physical design flow turns a synthesised gate-level netlist into a manufacturable layout (GDSII/OASIS) by placing every cell and routing every wire, while meeting timing, power, area and manufacturing rules. Its main steps are floorplanning, power planning, placement, clock tree synthesis, routing and sign-off.
Read full answerHide full answer
Applies toVLSI design (ASIC back end)
Inputs
Gate-level netlist and SDC constraints from synthesis.
Technology files and LEF (cell and layer abstracts), Liberty timing libraries.
RC extraction tech files, UPF (power intent), and macro/IO data.
Flow Steps
Netlist import and sanity checks: libraries, constraints, unconstrained paths.
Floorplanning: die/core size, aspect ratio, macro and I/O placement, blockages.
Power planning: power rings, straps and rails for VDD/VSS; power switches for gated domains.
Placement: standard cells placed in rows, then optimised for timing and congestion (cell sizing, buffering).
Clock tree synthesis (CTS): build a balanced clock network to control skew and transition; fix hold after CTS.
Routing: global routing then detailed routing on metal layers; post-route optimisation.
Chip finishing: filler and decap cells, metal fill, antenna fixes.
Sign-off:
STA at all corners and modes with extracted parasitics (SPEF).
Power integrity: IR drop and electromigration.
Signal integrity: crosstalk delay and noise.
Physical verification: DRC, LVS, antenna, ERC.
Equivalence check between the final netlist and the synthesis netlist.
Tape-out: GDSII/OASIS released to the foundry.
Key Metrics
Metric
Goal
Timing
WNS ≥ 0 at all corners
Congestion
Routable with no overflow
IR drop
Within budget (often ~5–10% of VDD)
Utilisation
High density without congestion (often 60–80%)
DRC/LVS
Clean
Tools
Cadence Innovus, Synopsys IC Compiler II / Fusion Compiler for implementation; PrimeTime/Tempus for STA; Calibre, IC Validator or Pegasus for physical verification; RedHawk or Voltus for power integrity.
Interview Tip
Mention that the steps iterate: congestion after placement may send you back to the floorplan, and timing after routing may require ECOs.
62
What is floorplanning in physical design?
KnownRevise
Floorplanning is the first step of physical design, where engineers decide the chip’s (or block’s) size and shape, place large macros (memories, analog blocks, IP), position the I/O pins or pads, and plan power distribution and blockages. A good floorplan makes placement, routing and timing closure much easier; a poor one causes congestion and timing problems that later steps cannot fix.
Read full answerHide full answer
Applies toVLSI design (ASIC physical design)
Key Decisions
Die and core size: chosen from the total cell area and target utilisation (for example 70%), leaving room for routing and buffering.
Aspect ratio: core height / width; usually close to 1 unless package or neighbouring blocks dictate otherwise.
Macro placement: SRAMs and hard IPs are usually placed near the core edges, with pins facing the core, and kept close to the logic they talk to.
I/O placement: pins/pads placed according to the package and the surrounding blocks to keep top-level wires short.
Power planning: rings around the core and macros, vertical/horizontal straps, and standard cell rails.
Blockages and halos: placement blockages around macros (keep-out regions) and routing blockages where needed.
Row creation: standard cell rows with the correct site and orientation.
Physical-only cells: tap (well-tie) and end-cap cells added at this stage.
Worked Example
Total standard cell area = 2.1 mm², macro area = 0.9 mm², target utilisation for standard cells = 70%.
Core area ≈ 0.9 + 2.1 / 0.70 = 0.9 + 3.0 = 3.9 mm². A square core would be about 1.97 mm × 1.97 mm; add the I/O ring or block boundary spacing for the die size.
Good Floorplan Practices
Follow the data flow: place macros and logic so connected blocks are adjacent.
Leave channels between macros wide enough for routing, or avoid narrow channels altogether.
Avoid placing macros in the centre of the core, which blocks routing and fragments placement area.
Keep critical I/O close to the logic that uses them.
Check pin density and congestion maps early using a quick trial placement.
Outputs and Checks
A DEF/database with die size, rows, macros, pins and the power grid.
Early checks: congestion estimate, timing estimate, IR drop on the power grid.
Interview Tip
Expect follow-ups such as “what is utilisation?”, “why keep halos around macros?” and “how do you decide macro orientation?”. Answer each in terms of routing resources and timing.
63
What is placement in physical design?
KnownRevise
Placement is the physical design step that assigns a legal location in the standard cell rows to every cell in the netlist, aiming to minimise wire length and congestion while meeting timing. It happens after floorplanning and power planning, and before clock tree synthesis.
Read full answerHide full answer
Applies toVLSI design (ASIC physical design)
Stages of Placement
Global (coarse) placement: cells are spread across the core to minimise estimated wire length; overlaps are allowed at first. Modern tools use analytical (force-directed or electrostatic-like) algorithms.
Legalisation: cells are snapped to row sites with no overlaps, respecting placement blockages and cell orientation rules.
Detailed placement: local moves and swaps improve wire length and timing.
Timing: critical-path cells placed close together (timing-driven placement).
Congestion: avoid areas where routing demand exceeds supply; tools spread cells or add padding.
Wire length: shorter total wire length lowers delay and power.
Power: reduce capacitance on high-activity nets.
Utilisation: local density stays within limits (density screens or partial blockages).
Important Concepts
Scan chain reordering: scan connections are reordered after placement to shorten scan wiring.
High-fan-out net synthesis (HFNS): buffer trees are built for resets, enables and other big nets (not clocks, which are handled by CTS).
Spare cells: placed throughout the design for later metal-only ECO fixes.
Tie cells: constant 0/1 connections are made through tie-high/tie-low cells.
Typical Problems and Fixes
Problem
Fix
Hotspot congestion
Cell padding, density screens, re-floorplan macros
Timing violations
Bounds/regions to group logic, more optimisation effort
Long nets between macros
Better macro placement, pipelining in RTL
Pin access issues
Cell spacing rules, avoiding high pin density cells clustered together
Interview Tip
Mention that placement uses ideal clocks (no skew yet), so hold is usually ignored here and fixed after CTS.
64
What is clock tree synthesis (CTS)?
KnownRevise
Clock tree synthesis (CTS) is the physical design step that builds the network of buffers and wires distributing the clock from its source to every sequential cell, so the clock arrives with controlled skew, acceptable latency and clean transitions. Before CTS the clock is treated as ideal; after CTS, real clock delays are used for timing.
Read full answerHide full answer
Applies toVLSI design (ASIC physical design)
Goals of CTS
Low skew: small difference in arrival times between communicating flops.
Controlled insertion delay (latency): the time from clock source to sinks, kept reasonable.
Good transition (slew): sharp clock edges at every flop.
Low power: the clock network switches every cycle, so its capacitance matters.
Signal integrity: clock nets are shielded or given extra spacing to avoid crosstalk.
Very low skew in high-frequency CPUs; uses more power
Multi-source CTS / spine
Hybrid of tree and mesh
Large high-speed blocks
CTS Specifications
Defined in a CTS spec or tool settings: target skew, maximum latency, max transition, buffer/inverter cells allowed (often special clock cells with balanced rise/fall), NDRs and exclusion pins.
After CTS
Timing uses propagated clocks instead of ideal clocks.
Hold fixing is done now, because real skew is known.
Clock uncertainty in SDC is reduced to jitter plus margin.
Interview Tip
Explain why clocks use inverters rather than buffers in many flows (inverters are smaller and give better duty-cycle balance), and why clock cells have equal rise and fall delays.
65
What is routing, and how do global and detailed routing differ?
KnownRevise
Routing is the physical design step that creates the actual metal wires and vias connecting all cell pins according to the netlist, while obeying the foundry’s design rules and meeting timing and signal-integrity goals. It is done in two stages: global routing plans approximate paths over a coarse grid, and detailed routing draws the exact wires on tracks.
Read full answerHide full answer
Applies toVLSI design (ASIC physical design)
Global Routing
Divides the chip into a grid of global routing cells (GCells).
Assigns each net a path through the GCells and a set of layers, without exact track positions.
Measures congestion: demand (wires needed) versus capacity (tracks available) in each GCell. Overflow means some nets will not fit.
Fast; used for congestion maps and wire-length estimates.
Detailed Routing
Assigns each segment to specific tracks and places vias.
Must satisfy all design rules: width, spacing, minimum area, via enclosure, end-of-line, multi-patterning colouring at advanced nodes.
Iterates “search and repair” to remove shorts, opens and spacing violations.
Comparison
Aspect
Global routing
Detailed routing
Resolution
Coarse grid (GCells)
Exact tracks and vias
Output
Planned paths and layer assignment
Final metal geometry
Design rules
Not fully checked
Fully obeyed
Speed
Fast
Slow, compute-intensive
Main metric
Congestion overflow
DRC violations, shorts, opens
Routing Order
Special routing: power and ground (already done in power planning).
Clock nets: routed first, often with non-default rules (wider, double-spaced, shielded).
Critical signal nets: timing-driven routing.
Remaining signal nets.
Layer Usage
Lower metal layers (M1, M2) are thin and used for local connections and pin access.
Upper layers are thicker with lower resistance, used for long wires, clocks and power.
Preferred direction alternates by layer (for example M2 horizontal, M3 vertical).
Post-Route Work
Extract parasitics (RC) and rerun STA with signal-integrity (crosstalk) analysis.
Post-route optimisation and ECOs for remaining timing or SI violations.
Antenna fixes, metal fill, and final DRC/LVS.
66
What is congestion in physical design?
KnownRevise
Congestion occurs when the number of wires that must pass through an area of the chip exceeds the routing tracks available there. Congested regions cause detours, longer wires, timing degradation, crosstalk and, in severe cases, unroutable designs with shorts and DRC violations.
Read full answerHide full answer
Applies toVLSI design (ASIC physical design)
How It Is Measured
The global router divides the layout into GCells and computes, for each GCell edge, demand (wires needed) and capacity (tracks available).
Overflow = demand − capacity when demand exceeds capacity.
Tools show congestion maps (hotspots) and report total and maximum overflow, often as a percentage of GCells overflowing per layer.
Common Causes
High cell density / utilisation in an area.
High pin density: many small cells with many pins (for example complex AOI/OAI cells, muxes) clustered together.
Macro placement: narrow channels between macros, or macros placed in the core centre.
Congestion forces detours, increasing wire length and capacitance. It also brings wires close together, increasing coupling capacitance and crosstalk. So congestion and timing must be closed together.
Interview Tip
Distinguish global congestion (overall too little routing space, fix with die size or utilisation) from local hotspots (a small region, fix with padding, placement changes or logic restructuring).
67
What are DRC and LVS checks?
KnownRevise
DRC (Design Rule Check) verifies that the layout’s geometry obeys the foundry’s manufacturing rules, such as minimum width, spacing and enclosure. LVS (Layout Versus Schematic) verifies that the circuit extracted from the layout matches the intended netlist (the same devices and connections). Both must be clean before tape-out.
Read full answerHide full answer
Applies toVLSI design (physical verification)
DRC
Checks rules from the foundry’s design rule manual for every layer:
Minimum width and spacing of metal, poly and diffusion.
Minimum area and enclosure (for example a via must be enclosed by metal by a given amount).
Density rules (minimum and maximum metal density per window).
End-of-line, notch and multi-patterning colouring rules at advanced nodes.
Antenna rules (often run as a separate check).
Violations can cause shorts, opens or yield loss in manufacturing.
LVS
Extracts devices (transistors, resistors, capacitors) and connectivity from the layout.
Compares them with the source netlist (CDL/SPICE derived from the gate-level netlist).
Typical errors:
Shorts: two nets accidentally connected.
Opens: a net broken into pieces.
Missing or extra devices, wrong device sizes.
Pin mismatches: labels on the wrong shape or missing.
Floating wells or missing well/substrate connections.
Comparison
Aspect
DRC
LVS
Question answered
Can the layout be manufactured?
Is it the right circuit?
Inputs
Layout (GDSII/OASIS) + rule deck
Layout + netlist + rule deck
Typical errors
Spacing, width, density, enclosure
Shorts, opens, device mismatch
Tools
Siemens Calibre, Synopsys IC Validator, Cadence Pegasus
Antenna check: charge accumulation on long metal connected to gates during manufacturing.
Density/fill checks and DFM (design for manufacturing) recommended rules.
Interview Tip
A common follow-up is “which is worse, a DRC error or an LVS error?” Both block tape-out, but an LVS error means the chip is functionally wrong, while a DRC error affects manufacturability and yield.
68
What are IR drop and electromigration?
KnownRevise
IR drop is the voltage loss along the power and ground network caused by current (I) flowing through the resistance ® of the metal wires, so cells see less than the nominal supply voltage. Electromigration (EM) is the gradual movement of metal atoms caused by high current density, which over time can open or short wires. IR drop affects performance now; electromigration affects reliability over the chip’s lifetime.
Read full answerHide full answer
Applies toVLSI design (power integrity and reliability sign-off)
IR Drop
Static IR drop: based on average current; V_drop = I_avg × R_grid.
Dynamic IR drop: based on peak switching current in a time window, including L·di/dt effects and decap; usually larger and more critical.
Effects: lower effective VDD slows cells, causing setup failures, and in extreme cases functional failures.
Typical budget: total drop within about 5–10% of VDD (both VDD and VSS sides).
Worked example: a power strap segment with resistance 0.05 Ω carries 400 mA → drop = 0.4 × 0.05 = 20 mV. On a 0.8 V supply that is 2.5% from this segment alone.
Fixes: wider or denser power straps, more vias, more power pads/bumps, decap cells near switching hotspots, spreading high-activity cells, staggering clock gating.
Electromigration
Electrons transfer momentum to metal atoms; at high current density, atoms move and form voids (opens) or hillocks (shorts).
Lifetime is described by Black’s equation: MTTF = A · J⁻ⁿ · exp(Ea / kT), where J is current density, n ≈ 1–2, Ea is activation energy and T is temperature. Higher current density and temperature shorten life.
Applies to power nets (mostly DC current) and signal nets (AC/RMS and peak current).
Fixes: wider wires, more vias (multi-cut vias), reducing drive strength on signal nets, splitting high-current nets, keeping temperature lower.
Comparison
Aspect
IR drop
Electromigration
Problem type
Performance/functional
Long-term reliability
Cause
Wire resistance × current
High current density over time
Effect
Slower cells, timing failures
Opens/shorts after months or years
Analysis tools
Ansys RedHawk-SC, Cadence Voltus
Same tools, plus foundry EM rules
Interview Tip
Link IR drop back to timing: modern STA flows can use IR-drop-aware (voltage-aware) timing, because a path in a hotspot sees lower voltage and is slower than the corner assumes.
69
What is crosstalk, and how does it affect timing?
KnownRevise
Crosstalk is unwanted interference between neighbouring wires through their coupling capacitance: a switching wire (the aggressor) injects charge into a nearby wire (the victim). It can cause glitches on quiet nets (crosstalk noise) and can speed up or slow down transitions on switching nets (crosstalk delay), which changes timing.
Read full answerHide full answer
Applies toVLSI design (signal integrity)
Why It Has Grown
At advanced nodes, wires are tall, narrow and closely spaced, so coupling capacitance between adjacent wires can be a large share of a net’s total capacitance.
Faster edges and lower supply voltages reduce noise margins.
Two Effects
1. Crosstalk noise (glitch) - The victim is static (for example held at 0) while the aggressor switches. - A glitch appears on the victim; if it exceeds the receiving gate’s noise margin and propagates to a flop or latch, it can corrupt data.
2. Crosstalk delay - Both nets switch at about the same time. - Opposite directions: effective coupling capacitance increases (Miller effect, up to about 2×Cc), so the victim slows down → worse setup. - Same direction: effective coupling capacitance decreases → the victim speeds up → worse hold.
Aggressor vs victim switching
Effect on victim
Timing risk
Opposite directions
Slower transition
Setup violation
Same direction
Faster transition
Hold violation
Victim quiet
Glitch
Functional noise failure
How It Is Analysed
Signal-integrity-aware STA (for example PrimeTime SI, Tempus SI) uses coupling capacitances from extraction and timing windows of aggressors to compute delta delays and noise bumps.
Only aggressors whose switching windows overlap the victim’s are considered.
Prevention and Fixes
Spacing: increase distance between critical nets (non-default rules).
Shielding: route VDD/VSS wires next to clocks or sensitive nets.
Upsize the victim driver so it holds its value more strongly; downsize aggressor drivers or slow their edges.
Layer changes: route long parallel nets on different layers or reduce parallel run length.
Buffer insertion to break long coupled segments.
Interview Tip
Clock nets are the most important victims to protect, because crosstalk on a clock adds jitter to every flop it drives; that is why clocks are routed with double spacing or shielding.
70
What is the antenna effect in VLSI?
KnownRevise
The antenna effect is damage to a transistor’s thin gate oxide during manufacturing, caused by electrical charge collected on long metal wires during plasma etching. If a large metal area is connected only to a gate (with no diffusion to drain the charge), the charge can build up and stress or break down the oxide, causing yield or reliability failures.
Read full answerHide full answer
Applies toVLSI design (physical design and manufacturing)
How It Happens
Metal layers are built one at a time. While an upper layer is not yet fabricated, a wire on a lower layer may connect to a gate but not yet to any diffusion (source/drain) that could discharge it.
Plasma etching charges exposed metal; that metal acts like an antenna collecting charge.
The charge flows into the gate and creates a high voltage across the thin gate oxide, possibly causing breakdown or shifting the threshold voltage.
Antenna Ratio
Foundries limit the antenna ratio:
Antenna ratio = (area of metal connected to the gate on a given layer) / (gate area)
Rules specify maximum ratios per layer, and sometimes cumulative ratios over several layers. Example: if the limit is 400 and a gate of area 0.05 µm² connects to 30 µm² of metal-2, the ratio is 600, a violation.
Fixes
Jumper (layer hopping): break the long wire and route a short section on a higher layer. The lower-layer segment connected to the gate is shortened, and by the time the upper layer is made, the net also connects to a driver diffusion.
Antenna diodes: insert a reverse-biased diode cell near the gate input to safely drain charge to the substrate. Costs a little area and capacitance.
Buffer insertion: split the long net so each gate sees a shorter wire.
Routing near the driver: connect to diffusion as early (on as low a layer) as possible.
In the Design Flow
Place-and-route tools check antenna rules during and after routing and fix most violations automatically using jumpers or diodes.
Final sign-off checks run with the foundry’s physical verification deck (Calibre, IC Validator or Pegasus).
Interview Tip
Make clear that the antenna effect is a manufacturing-time problem, not a problem in normal operation; once the chip is finished, the diffusions provide a discharge path.
71
What is design for testability (DFT)?
KnownRevise
Design for testability (DFT) is the practice of adding test structures to a chip so that manufacturing defects can be detected after fabrication, quickly and with high coverage. It does not test whether the design is correct (that is verification); it tests whether each manufactured chip was built correctly.
Read full answerHide full answer
Applies toVLSI design (DFT and manufacturing test)
Why DFT Is Needed
Manufacturing introduces defects: shorts, opens, bridging and resistive vias.
Without special structures, internal flip-flops are hard to control and observe from the chip’s pins, so testing would need enormous numbers of patterns.
Shipping defective chips is costly, especially in automotive and data-centre products.
Main DFT Techniques
Scan design: flip-flops are replaced with scan flops linked into shift registers (scan chains), making internal state directly controllable and observable.
ATPG (Automatic Test Pattern Generation): software generates patterns targeting fault models such as stuck-at and transition faults.
Test compression: on-chip decompressors and compactors (for example Synopsys DFTMAX, Siemens Tessent TestKompress) cut test time and data volume by large factors.
Memory BIST (MBIST): on-chip engines test SRAMs with March algorithms; repair (redundant rows/columns) is often included.
Logic BIST (LBIST): on-chip pattern generation and response compaction, used in automotive in-field testing.
Boundary scan (JTAG, IEEE 1149.1): tests board-level connections between chips.
IEEE 1687 (IJTAG) and 1500: access networks for embedded instruments and cores.
Key Metrics
Fault coverage: percentage of modelled faults detected (often 98–99%+ for stuck-at).
Test time and data volume: directly affect test cost on the tester (ATE).
DPPM: defective parts per million that escape to customers.
Costs
Extra area (scan muxes, BIST logic), a small timing impact (mux in the data path) and extra power during test.
Scan shift power can exceed functional power, so test power must be managed.
Where DFT Fits in the Flow
Scan insertion is usually done during or after synthesis, scan chains are reordered after placement, and ATPG runs on the final netlist. DFT engineers also validate patterns with gate-level simulation.
72
What is scan insertion, and what is a scan chain?
KnownRevise
Scan insertion is the DFT step that replaces normal flip-flops with scan flip-flops and connects them into long shift registers called scan chains. In test mode, the tester shifts values into every flop, runs one functional clock to capture the logic’s response, and shifts the results out, making the chip’s internal state controllable and observable.
Read full answerHide full answer
Applies toVLSI design (DFT)
The Scan Flip-Flop
A mux-D scan flop adds a 2:1 multiplexer in front of the D input:
SE (scan enable) = 0: normal operation, the flop captures functional data D.
SE = 1: scan mode, the flop captures SI (scan in) from the previous flop in the chain.
The flop’s Q also feeds the next flop’s SI.
Scan Test Procedure
Shift in (SE = 1): load a test pattern into all flops through the scan-in pins, one bit per clock.
Capture (SE = 0): apply one (or two, for at-speed tests) functional clock pulses; flops capture the combinational logic’s response.
Shift out (SE = 1): unload the captured values through scan-out pins while shifting in the next pattern.
The tester compares the shifted-out values with expected values.
Example of Test Time
With 100,000 flops in 100 chains, each chain has 1,000 flops, so shifting one pattern takes about 1,000 cycles. With 5,000 patterns at a 50 MHz shift clock: 5,000 × 1,000 / 50 × 10⁶ = 0.1 s. Compression reduces this further.
Scan Insertion Steps
Define scan ports, number of chains and test clocks.
Replace flops with scan flops and stitch chains (balanced lengths).
Handle non-scannable elements (latches, asynchronous resets controlled in test mode, clock gating with a test-enable).
Insert lock-up latches between chains or clock domains with skew.
Reorder chains after placement to reduce wiring.
Run DRC checks (DFT rule checks) for uncontrollable clocks and resets.
Design Rules for Scan Friendliness
Asynchronous sets/resets and generated clocks must be controllable from test pins.
Avoid combinational loops and latches where possible.
Clock-gating cells need a test-enable input so clocks run during shift.
Interview Tip
Explain why chains are balanced: test time depends on the longest chain, so equal-length chains minimise shift cycles.
73
What is ATPG in DFT?
KnownRevise
ATPG (Automatic Test Pattern Generation) is the software process that creates the input patterns used to test manufactured chips, choosing values to shift into scan chains so that each modelled fault produces a different output from a good chip. It also reports fault coverage, the percentage of modelled faults the patterns detect.
Read full answerHide full answer
Applies toVLSI design (DFT and manufacturing test)
How ATPG Works
Read the scan-inserted netlist, libraries and test protocol (how to shift, capture and use clocks).
Build a list of faults for the chosen fault models.
For each target fault:
Activate it: set the faulty node to the opposite of its stuck value.
Propagate it: sensitise a path so the difference reaches a scan flop or output.
Simulate the pattern to find all other faults it detects (fault simulation), and drop them from the list.
Compress and order patterns; write them in tester formats (STIL, WGL).
Classic algorithms include the D-algorithm, PODEM and FAN; modern tools use SAT-based techniques as well.
Fault Models
Fault model
Targets
Test type
Stuck-at (SA0/SA1)
Nodes stuck at 0 or 1
Slow-speed scan
Transition (slow-to-rise/fall)
Delay defects
At-speed (launch-on-capture or launch-on-shift)
Path delay
Delay on specific critical paths
At-speed
Bridging
Shorts between neighbouring nets
Uses layout data
Cell-aware
Defects inside standard cells
Uses cell-level defect models
IDDQ
Elevated quiescent current
Current measurement
Fault Classes in Reports
Detected (DT): proven caught by the patterns.
Possibly detected (PT): detection depends on unknown values.
Undetectable (UD): redundant or tied logic that cannot be tested.
ATPG untestable (AU): testable in theory but blocked by constraints (for example uncontrollable clocks).
Not detected (ND): no pattern found.
Coverage = detected / total testable faults, and targets are often above 98–99% for stuck-at.
Mention that low coverage usually comes from design issues (uncontrollable resets, clocks, black-boxed memories, X-sources), and the fix is better DFT, not more ATPG effort.
74
What are stuck-at faults?
KnownRevise
A stuck-at fault is a fault model in which a signal line in a circuit is assumed to be permanently fixed at logic 0 (stuck-at-0, SA0) or logic 1 (stuck-at-1, SA1), regardless of its inputs. It is the simplest and most widely used fault model for generating manufacturing test patterns.
Read full answerHide full answer
Applies toVLSI design (DFT and manufacturing test)
Why It Is Used
Real defects (shorts to power or ground, opens, missing contacts) often behave like a node stuck at a value.
The model is simple, so ATPG can handle millions of gates.
Patterns that detect stuck-at faults also catch many other defect types.
How Many Faults
Each line (gate input, output, fan-out branch) has two possible faults, SA0 and SA1. A circuit with N lines has 2N single stuck-at faults; tools reduce the list using fault equivalence and dominance (fault collapsing).
Detecting a Fault: Example
For a 2-input AND gate y = a & b, to detect a SA0:
Activate: set a = 1 (the opposite of the stuck value), so a good circuit and a faulty circuit differ at a.
Propagate: set b = 1 so the difference reaches y.
Good circuit: y = 1; faulty circuit: y = 0 → detected.
Test patterns for an AND gate’s single stuck-at faults:
Pattern (a, b)
Detects
1, 1
a SA0, b SA0, y SA0
0, 1
a SA1, y SA1
1, 0
b SA1, y SA1
Three patterns detect all six faults.
Limitations
Does not model delay defects (a node that switches, but too slowly); transition and path-delay fault models are used for those at-speed tests.
Does not model bridging between nets or defects inside cells precisely; bridging and cell-aware models fill those gaps.
Assumes a single fault at a time, though multiple faults are usually caught anyway.
Fault Coverage
Coverage = detected faults / total faults. Undetectable faults usually indicate redundant logic, which may also be a design issue worth reviewing.
75
What is BIST (built-in self-test)?
KnownRevise
BIST (built-in self-test) is on-chip hardware that tests the chip (or a block of it) by itself: it generates test patterns, applies them, and compresses and checks the responses, reporting pass or fail. It reduces dependence on expensive external testers and allows testing in the field, for example at every power-up in a car.
Read full answerHide full answer
Applies toVLSI design (DFT)
Main Types
Memory BIST (MBIST): tests embedded SRAMs and register files, which have dense layouts and specific defect types. Uses algorithms such as March C−, which writes and reads patterns in ascending and descending address order to catch stuck-at, transition, coupling and address decoder faults. Often paired with built-in self-repair, which swaps faulty rows or columns for spares.
Logic BIST (LBIST): tests random logic through scan chains. A pseudo-random pattern generator (PRPG), usually an LFSR, fills the chains; a MISR (multiple-input signature register) compresses outputs into a signature compared with the expected (golden) value.
LBIST Building Blocks
Block
Function
LFSR / PRPG
Generates pseudo-random patterns
Phase shifter
Decorrelates patterns between neighbouring chains
Scan chains
Apply patterns and capture responses
MISR
Compacts responses into a signature
Controller
Sequences shift/capture and compares the signature
Test points
Improve controllability/observability of random-resistant logic
Advantages
Test cost: less tester memory and time; runs at functional speed.
In-field testing: required by safety standards such as ISO 26262 for automotive chips (periodic or power-on self-test).
Access: tests embedded memories that are hard to reach from pins.
Disadvantages
Area overhead for controllers, LFSRs and MISRs.
Lower coverage per pattern for random logic (random-pattern-resistant faults need test points or top-up ATPG).
X-sources (uninitialised memories, analog outputs) corrupt MISR signatures, so they must be blocked.
Interview Tip
Name a March algorithm and briefly describe it: March C− has 6 elements with 10 operations per address (10N), for example ⇕(w0); ⇑(r0,w1); ⇑(r1,w0); ⇓(r0,w1); ⇓(r1,w0); ⇕(r0).
76
What is an FPGA, and what are LUTs, flip-flops and block RAMs?
KnownRevise
An FPGA (Field-Programmable Gate Array) is a chip containing a large array of configurable logic blocks, memory blocks, DSP blocks and programmable interconnect, whose function is defined after manufacture by loading a configuration bitstream. LUTs implement combinational logic, flip-flops store state, and block RAMs provide larger on-chip memories.
Read full answerHide full answer
Applies toVLSI design (FPGA architecture, AMD/Xilinx and Intel/Altera devices)
Main Building Blocks
Look-up tables (LUTs): a k-input LUT is a small memory of 2^k bits that can implement any Boolean function of k inputs. Modern devices use 6-input LUTs (AMD UltraScale+, Intel adaptive logic modules are fracturable 6-input/8-input structures). A 6-LUT can also act as two smaller functions, a small distributed RAM or a shift register.
Flip-flops (registers): paired with LUTs in each logic block for sequential logic, with clock enable and set/reset controls.
Carry chains: dedicated fast paths for adders and counters.
Block RAM (BRAM): dedicated dual-port memories (for example 36 Kb blocks in AMD devices, M20K 20 Kb blocks in Intel devices) for FIFOs, buffers and lookup tables.
DSP slices: hardened multiply-accumulate units for signal processing and arithmetic.
Programmable interconnect: switch boxes and routing tracks connecting everything.
I/O blocks and transceivers: support many I/O standards and multi-gigabit serial links.
Clock management: PLLs/MMCMs and global clock networks.
Hard IP: PCIe, Ethernet MACs, memory controllers, and in SoC FPGAs, ARM processor systems.
LUT Example
A 4-input LUT implementing y = (a & b) | (c ^ d) stores the 16 output values of the truth table in its memory cells; the inputs act as the address that selects the output.
Resource Comparison
Resource
Best for
Notes
LUTs
Random logic, small muxes
Count is the main “size” metric
Flip-flops
Pipelines, state
Usually plentiful (often 2 per LUT)
Distributed RAM (LUTRAM)
Very small memories
Uses LUTs
Block RAM
Larger memories, FIFOs
Fixed size blocks; synchronous read
DSP slices
Multipliers, filters
Faster and lower power than LUT multipliers
Configuration
Most FPGAs are SRAM-based: the configuration is lost at power-off and reloaded from flash at boot. Flash-based and antifuse FPGAs (Microchip) keep their configuration.
77
What is the FPGA design flow?
KnownRevise
The FPGA design flow takes a design from RTL to a configured FPGA: write and simulate the RTL, synthesise it to the device’s primitives, implement it (place and route) with timing constraints, generate a bitstream, and program and debug the hardware. Unlike an ASIC flow, there is no mask fabrication, so iterations take hours instead of months.
Timing analysis: static timing analysis checks setup and hold; close timing by changing RTL, constraints or implementation strategies.
Bitstream generation: create the configuration file.
Programming and on-board debug: load the bitstream via JTAG or flash; use embedded logic analysers (Vivado ILA, Quartus Signal Tap) to view internal signals.
Use synchronous design and vendor clocking resources (MMCM/PLL, global buffers); avoid gated clocks in logic.
Register FPGA I/O and use the I/O flip-flops for predictable timing.
Check utilisation and timing reports after each run; fix timing at the RTL level when paths have many logic levels.
78
What EDA tools are used in the VLSI industry?
KnownRevise
EDA (Electronic Design Automation) tools are the software used to design, verify and implement chips. The market is dominated by Synopsys, Cadence and Siemens EDA (formerly Mentor Graphics), with FPGA vendors and open-source tools covering other needs.
Read full answerHide full answer
Applies toVLSI design (industry tools, current product names)
Tools by Design Step
Step
Synopsys
Cadence
Siemens EDA
RTL simulation
VCS
Xcelium
Questa
Lint / CDC / RDC
VC SpyGlass
Jasper / Conformal (CDC apps)
Questa Lint, Questa CDC
Formal verification
VC Formal
Jasper
Questa Formal
Emulation / prototyping
ZeBu, HAPS
Palladium, Protium
Veloce
Logic synthesis
Design Compiler, Fusion Compiler
Genus
—
DFT and ATPG
TestMAX (DFTMAX, ATPG)
Modus
Tessent
Place and route
IC Compiler II, Fusion Compiler
Innovus
Aprisa
Static timing analysis
PrimeTime
Tempus
—
Equivalence checking
Formality
Conformal LEC
—
Parasitic extraction
StarRC
Quantus
Calibre xACT
Physical verification (DRC/LVS)
IC Validator
Pegasus
Calibre
Power integrity
PrimePower (power)
Voltus
mPower
Custom/analog layout
Custom Compiler
Virtuoso
—
Circuit simulation (SPICE)
HSPICE, PrimeSim
Spectre
Analog FastSPICE, Eldo
Ansys RedHawk-SC (now part of Synopsys) is a widely used IR drop/EM sign-off tool, and Siemens Calibre is the de-facto standard for DRC/LVS sign-off.
FPGA Tools
AMD Vivado (and Vitis for HLS/software) for AMD/Xilinx FPGAs.
Intel Quartus Prime for Intel/Altera FPGAs.
Microchip Libero SoC and Lattice Radiant/Diamond.
Open-Source Tools
Icarus Verilog and Verilator for simulation and linting.
Yosys for synthesis, OpenROAD/OpenLane for RTL-to-GDS flows, Magic and KLayout for layout and DRC, ngspice for circuit simulation.
Often used with open PDKs (SkyWater SKY130, GF180) for learning and shuttle projects.
Interview Tip
You don’t need to know every tool. Name the ones you have used, what you did with them (for example “ran synthesis in Genus and STA in PrimeTime”), and which reports you read.
79
What is the difference between front-end and back-end VLSI roles?
KnownRevise
Front-end VLSI roles cover the logical design of a chip, writing RTL and verifying that it is functionally correct. Back-end VLSI roles cover the physical implementation, turning the netlist into a manufacturable layout that meets timing, power and manufacturing rules. Roles in between, such as synthesis, STA and DFT, can sit on either side depending on the company.
Read full answerHide full answer
Applies toVLSI design (career roles)
Front-End Roles
RTL design engineer: micro-architecture and synthesisable Verilog/SystemVerilog; lint, CDC and synthesis-friendly coding.
Design verification (DV) engineer: SystemVerilog/UVM testbenches, assertions, coverage closure, debug. Often the largest team.
Formal verification engineer: property-based proofs and equivalence checks.
Architecture / performance modelling: C++/SystemC models and trade-off studies.
If you enjoy coding, logic and debugging behaviour, front-end design or verification fits.
If you enjoy optimisation, timing and the physical side of silicon, back-end fits.
Freshers often join DV or PD teams because those teams hire the most.
Interview Tip
Show you understand how your side affects the other: for example, an RTL designer who pipelines long paths saves the PD team weeks of timing closure.
80
How do you explain a VLSI project in an interview?
KnownRevise
To explain a VLSI project in an interview, describe what you built, why, how you designed and verified it, which tools you used, the problems you solved and the measurable results, in about two to three minutes. Interviewers use this question to check whether you really did the work and understand the design flow, so be specific and be ready to go deeper on any detail.
Read full answerHide full answer
Applies toVLSI design (interview preparation)
A Structure That Works
Goal: one sentence on what the design does (for example “a UART controller with a configurable baud rate and FIFOs”).
Architecture: main blocks, interfaces, clocking and reset.
Your role: what you personally designed, verified or implemented.
Flow and tools: RTL language, simulator, synthesis, STA, FPGA or ASIC flow.
Verification: testbench type, test cases, assertions, coverage.
Challenges and fixes: a real problem (a CDC issue, a timing violation, a latch, a protocol bug) and how you solved it.
Results: numbers such as clock frequency achieved, area or LUT usage, power, coverage percentage.
What you would improve.
Example Answer (Fresher, FPGA Project)
“I designed a UART transmitter and receiver in Verilog with 16-deep FIFOs and a programmable baud-rate generator. The receiver oversamples by 16 and uses a two-flop synchroniser on the RX input because it is asynchronous. I verified it in Vivado’s simulator with a self-checking testbench that looped TX back to RX for 10,000 random bytes and checked parity and framing errors, and I added assertions on the FIFO full and empty flags. During implementation on an Artix-7 board, one path in the baud-rate divider failed timing at 100 MHz; I pipelined the comparison and met timing with 1.2 ns of slack. The design used about 180 LUTs and 150 flip-flops. I tested it on hardware by sending data to a PC terminal and checking it with an ILA. Next, I would add a UVM testbench and functional coverage.”
Topics Interviewers Commonly Probe
Why you chose that architecture or encoding.
How you handled reset and clock domain crossings.
Exact setup/hold or slack numbers from your reports.
What your coverage numbers were and how you closed holes.
What a specific line of your code does.
Common Mistakes
Listing tools without explaining what you did with them.
Claiming work you cannot explain in detail; follow-up questions expose it quickly.
No numbers: frequency, utilisation, coverage and test results make the story credible.
Spending all the time on background instead of your contribution.
Interview Tip
Prepare one project deeply rather than many superficially, and have a block diagram ready to sketch on a whiteboard.