RTL Review

← 03 CDC, Reset and Async Design | Index | 05 Code Reading and Debugging →

Round 04 — Combined answers (Gemini · GPT · Claude)

Contents

0. Resume probe

M4Q1 · "80% fewer gates and 90% lower power. Walk me through the before/after measurement setup, and tell me what the number would have been at the slow corner."

Gemini Answer

GPT Answer

"For a 1x1 cost-down design I redesigned the NDBPS lookup, reducing gates by 80% and estimated power by 90% relative to the original, by synthesis. Those are block-level synthesis results, not measured silicon power. I would bring the actual baseline, library, corner, constraints, activity assumptions, and reports before quoting a corner-specific result." The resume does not identify those measurement settings or the implementation technique.

Claude Answer

Template (replace the corner/tool names with the real ones):

"Both numbers are module-level Design Compiler runs of the old and new ndbps_lut with
identical scripts: same library and corner, same SDC and clock, same tool version, same
hierarchy (flat, no ungroup differences), pre-DFT, clock gating enabled in both. 'Gates' is
NAND2-equivalent cell area from the area report, not cell count. Power is the DC/PrimeTime
PX estimate with the same SAIF from the module-level rate-matrix testbench, so the activity
is identical and representative of real per-PPDU traffic; it is dynamic power of the block
only, no clock tree, and I say that on the slide. At the slow corner the area ratio barely
moves because the structure is the same, and the dynamic-power ratio also holds; what
changes is the absolute numbers and the leakage share, so the total power ratio would be
a bit less than 90% at a hot, leaky corner where leakage of the remaining cells shows up."

Part A — Rapid-fire Q and A (0:05–0:20)

M4Q2 · A1. Break dynamic power into its terms. For a MAC that is idle 95% of the time, which term dominates and what does that imply for where you optimise?

Gemini Answer

GPT Answer

Switching power is approximately alpha*C*V^2*f, plus internal/short-circuit power; leakage is separate. At 95% idle, ungated clock power or leakage may dominate, but measure it. Target clocks, idle input toggles, and retention/power states according to that breakdown.

Claude Answer

P = α·C·V²·f (switching) + short-circuit + leakage (I_leak·V). At 95% idle the
switching term of the datapath is small; what's left is the clock tree (α ≈ 1 on every
clock pin) and leakage. So optimise at the root: hierarchical clock gating that stops whole
subtrees, and power gating of idle domains, rather than shaving datapath toggles.

M4Q3 · A2. Leakage: which three knobs reduce it, and which of them are available to an RTL engineer?

Gemini Answer

  1. Multi-Vt cell selection (HVT vs. SVT/LVT): Chosen by synthesis/PD, indirectly controlled by RTL: when RTL has generous timing slack (fewer logic levels), the tool maps 95%+ of gates to low-leakage HVT cells instead of leaky LVT cells.
  2. Gate count / SRAM macro count reduction: Directly controlled by RTL architecture (e.g., factoring LUTs, sharing buffers, using 1RW instead of 2RW SRAMs).
  3. Power gating (MTCMOS header/footer switches) & SRAM sleep modes (LS/DS/SD): Controlled by RTL power-management FSMs and UPF definitions.

GPT Answer

Higher-Vt cells, power gating, and reduced device/cell area reduce leakage; supply/bias choices can also matter. RTL directly influences area and idle architecture; library selection and power intent require implementation collaboration.

Claude Answer

Higher-Vt cells, power gating (cut supply), lower voltage / body bias (plus longer
channel cells). The RTL engineer controls area (fewer cells leak less), the power-gating
structure (domain partition, isolation, retention), and critical-path length so PD can swap
LVT back to HVT.

M4Q4 · A3. ICG-based clock gating vs. an enable mux on the D input: area, power, and timing consequences. When does the tool refuse to insert an ICG?

Gemini Answer

GPT Answer

An enable mux prevents data updates but still clocks the flop. An ICG suppresses clock-tree/flop switching, at the cost of a gate, control timing, test enable, and minimum group size. Unsupported enable logic, unsafe timing, small groups, or policy restrictions may prevent insertion.

Claude Answer

ICG: one cell per register bank, stops clock-tree and flop-internal clock toggling
(the big win), adds an enable-to-ICG setup check and a latch in the clock path. Enable mux:
one mux per bit, flops still clocked every cycle, saves nothing on the clock tree, and adds a
level to the D path. The tool refuses below the minimum bank width, when the enable isn't a
pure synchronous enable (mixed with reset or async terms), when the enable cone is
excluded by constraint, or when the flops are on the critical path and the extra setup
check would fail.

M4Q5 · A4. What is operand isolation and when does it beat clock gating?

Gemini Answer

GPT Answer

Operand isolation holds inactive inputs constant so a combinational cone stops toggling. It can beat clock gating when upstream inputs still toggle into a large inactive combinational block; often use both. Place the isolation before the expensive cone.

Claude Answer

Holding the inputs of a combinational cone stable (AND/latch) when its output
is unused, so a multiplier doesn't churn. Beats clock gating when the cone is combinational
and fed from registers that must keep toggling for other consumers, or when inputs change
every cycle but the result is consumed rarely.

M4Q6 · A5. How does a synthesis tool estimate power without a simulation? What is a SAIF/VCD-based estimate, and which of the two numbers do you put on a slide?

Gemini Answer

GPT Answer

Vectorless estimates assume toggle probabilities; SAIF/VCD-based analysis uses simulated activity, with coverage and annotation limits. Present activity-based estimates when representative, and label workload/corner/coverage. Never present either as measured silicon power.

Claude Answer

Without a simulation: static probability and toggle rate defaults at primary inputs
(say 0.5 / 0.1) propagated probabilistically through the netlist, usually ignoring glitches
and the clock tree. SAIF/VCD: real activity from a representative test applied net by net.
The slide gets the SAIF number, with the traffic scenario, corner and whether the clock
tree is included written on it.

M4Q7 · A6. Reading an area report: what do you look at first to decide whether a change actually helped — total cell area, combinational vs. sequential split, or something else?

Gemini Answer

  1. Sequential vs. Combinational vs. Macro/Memory split at each hierarchy level.
  2. Flop count (Number of sequential cells): Verify no registers were accidentally constant-propagated away (0 area because a bug tied valid to 0!) or duplicated unexpectedly.
  3. LVT/SVT/HVT distribution and buffer/inverter area: Check that a smaller combinational gate count didn't come at the cost of forcing the tool to swap HVT cells to LVT to meet timing.

GPT Answer

First compare the same functionality and scope at the same timing target. Then inspect total mapped area, sequential/combinational split, buffers/clock gates, and slack. Check whether logic moved across a reporting boundary or a smaller design missed timing.

Claude Answer

Sequential cell count and area first: if the flop count moved, functionality or
pipelining changed, or something got optimised away. Then combinational area by hierarchy
to localise the change, then check nothing was constant-propagated out because of an
unconnected output or a tied input. Total cell area last, and only if both runs used the
same constraints.

M4Q8 · A7. A 1500-entry case statement producing a 12-bit value: what does synthesis build, and why might it be far from minimal?

Gemini Answer

GPT Answer

A case table becomes optimized decode/mux/Boolean logic, or a ROM where mapping supports it. A generic optimizer may miss algebraic structure across 1500 entries; repeated decodes and wide muxing can dominate.

Claude Answer

A ROM/PLA-style sum-of-products after heuristic two-level minimisation, then
technology-mapped. It is far from minimal because the tool sees a 13-input, 32-output
boolean function with no idea that it is a product of small factors; illegal combinations
become explicit values instead of don't-cares; and the result depends on case-item order
and default handling.

M4Q9 · A8. Resource sharing: give an RTL pattern where the tool will share a multiplier and one where it cannot, even though mathematically it could.

Gemini Answer

GPT Answer

(sel ? a : c) * b exposes one shared multiplier. Two independent products required simultaneously cannot use one single-cycle multiplier without scheduling or a faster internal clock. Mutually exclusive expressions can sometimes be shared automatically, but verify the mapped netlist.

Claude Answer

Shareable: if (sel) y = a*b; else y = c*d; — mutually exclusive branches, same
width/signedness → one multiplier with muxed operands. Not shareable: y = a*b + c*d
(both needed at once), different widths or signedness, a register between the two uses,
the two multiplies in different always blocks, or when the shared version fails timing.

M4Q10 · A9. FSM encoding (binary / one-hot / gray): what does each buy in area, speed, and power, and how do you stop the tool from re-encoding when you need LEC to pass?

Gemini Answer

GPT Answer

Binary uses few state flops; one-hot often simplifies decode at greater clock/reset cost; Gray can reduce transitions for suitable state sequences. No encoding wins universally. Use supported preservation settings and compatible equivalence setup where exact encoding is required; LEC need not fail merely because encoding changes.

Claude Answer

Binary: fewest flops, denser next-state logic. One-hot: simplest decode, fastest,
N flops. Gray: one bit toggles per transition, lowest state-register switching. To keep LEC
simple: disable FSM extraction/re-encoding (set_fsm_encoding/-fsm_extract none or the
Genus equivalent) and code states as explicit localparam values so the state flops map
1:1. If re-encoding is allowed, LEC needs the FSM mapping file.

M4Q11 · A10. Ungrouping / boundary optimisation: what does it enable, what does it break (think ECOs, LEC, hierarchical timing budgets)?

Gemini Answer

GPT Answer

Boundary optimization exposes constants, sharing, and cross-module simplification. It complicates hierarchical matching, ECO locality, names, and independent timing budgets. Preserve selected architectural boundaries rather than disabling optimization everywhere.

Claude Answer

Enables cross-boundary constant propagation, dead-logic removal through ports,
sharing and cross-boundary timing optimisation. Breaks: swapping a sub-block netlist in an
ECO, hierarchical LEC (compare points at the boundary vanish), per-block timing budgets and
per-block DFT chains. Keep the boundaries you'll need for ECO/LEC/budgets; ungroup glue.

M4Q12 · A11. Multi-Vt: what is the typical split, who decides it, and why does an RTL change affect it?

Gemini Answer

GPT Answer

There is no universal multi-Vt percentage. Implementation chooses the mix to meet timing/leakage goals. Shorter RTL paths create slack for higher-Vt cells; added mux depth can force lower-Vt cells.

Claude Answer

Typically 80–90% HVT/SVT and 5–20% LVT/ULVT on critical paths; PD decides during
leakage recovery after timing closure. An RTL change that shortens the critical path or
cuts a high-fanout net lets PD swap LVT back to HVT, so leakage follows RTL timing quality.

M4Q13 · A12. Power domains / UPF: name the four cell types you must think about when a block can be powered off, and what the RTL author must provide for each.

Gemini Answer

  1. Isolation cells (ISO): Clamp signals crossing from a power-gated domain to an always-on domain to 0 or 1. RTL provides: glitch-free iso_en control asserted before power-down.
  2. Retention flip-flops (RFF): Keep state in a balloon latch during power-off. RTL provides: save strobe before power-off and restore strobe after power-on (while clock is gated).
  3. Level shifters (LS): Translate voltage swings between VDD1 and VDD2 domains. RTL provides: clean domain boundary partitioning.
  4. Power switches (Header/Footer MTCMOS): Gate VDD / VSS. *RTL provides:*daisy-chained pwr_req / pwr_ack power controller FSM sequencing reset, clock gate, save, iso_en, and switch enable.

GPT Answer

Think isolation, level shifters, retention flops, and power switches. RTL/architecture supplies safe clamp values, voltage crossings, retained state, and sequencing/control intent; UPF and implementation describe/insert the physical structures. Reset/restoration and always-on control must also be specified.

Claude Answer

Isolation cells (RTL: isolation enable and clamp value, sequenced before power
off), level shifters (RTL: know and keep the boundary clean), retention flops (RTL:
save/restore sequence and which registers), power switches (RTL: the power-sequence
controller: isolate → save → switch off, and acks on the way up). Always-on buffers for
signals that cross the off domain.

M4Q14 · A13. You want to prove the new design is smaller than the old one. List the conditions the two synthesis runs must share for the comparison to be valid.

Gemini Answer

GPT Answer

Match library/PVT, tool version/options, timing and I/O constraints, parameters, hierarchy scope, power intent, physical assumptions, scan state, and activity workload. Establish equivalence and compare timing as well as area/power.

Claude Answer

Same library and corner, same SDC/clock/I/O constraints, same tool version and
scripts, same hierarchy and ungroup settings, same DFT state, same clock-gating settings,
same physical mode (wire-load or placement-aware), same definition of "gates" (NAND2
equivalents vs cell count), and the same boundary of what is counted.

M4Q15 · A14. "90% lower power by synthesis estimate" — give two reasons that number could be wrong in silicon, in either direction.

Gemini Answer

  1. Over-estimated in synthesis: If the parent hierarchy already clock-gates or operand-isolates the inputs when the MAC is idle, the baseline block was already consuming near-zero dynamic power 95% of the time in silicon, so chip-level savings are smaller than standalone vectorless block estimates.
  2. Under-estimated in synthesis: Pre-layout synthesis ignores long physical wire capacitances and multi-input gate glitch propagation delays across 9,000 gates of deep PLA logic, so the real silicon dynamic energy reduction during active bursts can be even larger.

GPT Answer

Real traffic/idle behavior may differ from assumed toggles; routed capacitance, glitches, CTS, voltage, temperature, and leakage may differ from pre-layout estimates. Savings may increase or decrease depending on these factors.

Claude Answer

Too optimistic: default activity instead of real traffic, or the old block was
already clock-gated upstream so its real power was never 100%. Too pessimistic/wrong the
other way: clock tree, glitch power in deep SOP logic and wire cap are missing from the
estimate, so the real saving from killing a glitchy 9k-cell cone can be larger than the
estimate; and at a hot corner leakage of the remaining cells dilutes the total ratio.

Part B — Deep dive: factor the NDBPS lookup (0:20–0:55)

The legacy block computes N_DBPS (data bits per OFDM symbol) and N_CBPS (coded bits per
symbol) with a flat lookup:

inputs:  mcs[3:0]    (0..13)
         nss[2:0]    (1..8 encoded as 0..7)
         ru[3:0]     (RU/BW size index: 26,52,106,242,484,996,2x996,4x996 tones ...)
         dcm         (dual-carrier modulation, halves data rate for MCS 0/1/3/4)
outputs: n_dbps[15:0], n_cbps[15:0], valid (0 for illegal combos)

Implemented as case ({mcs,nss,ru,dcm}) with ~1500 explicit entries generated by a script
from the 802.11 rate tables. Synthesis gives ~9 k cells. You must cut it hard for a 1×1
cost-down die.

Reference formulas (802.11ax/be):

N_SD(ru)        : data subcarriers per RU   (26-tone:24, 52:48, 106:102, 242:234, 484:468,
                                             996:980, 2x996:1960, 4x996:3920)
N_BPSCS(mcs)    : bits per subcarrier       (1,2,2,4,4,6,6,6,8,8,10,10,12,12 for MCS 0..13)
R(mcs)          : code rate                 (1/2,1/2,3/4,1/2,3/4,2/3,3/4,5/6,3/4,5/6,3/4,5/6,3/4,5/6)
N_CBPS = N_SD * N_BPSCS * N_SS
N_DBPS = N_CBPS * R
DCM: halves N_BPSCS effectively (only valid for MCS 0,1,3,4)

M4Q16 · B1. Legality

  1. (5 min) Legality. Which combinations are illegal (e.g., MCS 12/13 at small RUs, DCM
    with MCS 2)? How would you represent legality compactly rather than as 1500 case items?

Gemini Answer

Instead of encoding legality in 1,500 rows, legality in 802.11ax/be/bn is the conjunction of four orthogonal rules (~40 gates total):

// 1. Range checks
wire mcs_range_ok = (mcs <= 4'd13);
// 2. DCM is only legal for MCS ∈ {0, 1, 3, 4} and NSS ∈ {1, 2} (encoded nss <= 1) and not 4096-QAM
wire dcm_ok       = !dcm || ((mcs == 4'd0 || mcs == 4'd1 || mcs == 4'd3 || mcs == 4'd4) && (nss <= 3'd1));
// 3. Small RU restrictions: MCS 10/11 require RU >= 26 (always true), MCS 12/13 (4096-QAM) if restricted,
//    plus classic 802.11ac/ax integer N_DBPS exclusion (only exists in VHT 20MHz MCS9 NSS != 3,6; in HE/EHT all are integer!)
wire ru_mcs_ok    = (ru <= 4'd7); // valid RU index
assign valid      = mcs_range_ok && dcm_ok && ru_mcs_ok;

GPT Answer

Legality: decode field ranges, actual NSS=encoded_nss+1 using four bits, DCM eligibility, and standard/version/RU-specific restrictions as compact predicates or small masks. DCM with MCS 2 is excluded by the exercise. Do not invent a blanket small-RU restriction for MCS 12/13: verify the exact PHY format and standard revision against approved tables. Keep legality separate from the numeric computation.

Claude Answer

Rules, not entries: DCM only with MCS ∈ {0,1,3,4} and nss ≤ 2; MCS 12/13 only at RU ≥ 242
and never with DCM; MCS 10/11 excluded at the smallest RUs per the table; mcs ∉ 0..13
or ru beyond the defined indices → invalid. Represent as an 8-entry ROM indexed by ru
that returns a 14-bit "allowed MCS" mask, ANDed with the DCM and nss rules: tens of gates.

M4Q17 · B2. Factored datapath

  1. (10 min) Factored datapath. Design the arithmetic structure for N_CBPS and N_DBPS.
    Deal with the fractional code rate exactly (no floating point, no divider): show how to
    compute N_CBPS * R for R ∈ {1/2, 2/3, 3/4, 5/6} using shifts, adds and tiny multipliers
    so that the result is bit-exact with the table.

Gemini Answer

We use the exact 802.11 physical factorization:

NCBPS=NSD(ru)×NBPSCS(mcs,dcm)×NSSNDBPS=NCBPS×R(mcs)

Trick to make ×R∈{1/2,2/3,3/4,5/6} 100% bit-exact without a divider:
Notice that every NSD(ru) in 802.11ax/be/bn is even, and for every MCS with R=2/3 or R=5/6, NBPSCS∈{6,12} is an exact multiple of 6!
Therefore, define pre-divided sub-carrier bits:

GPT Answer

Structure: decode N_SD, modulation bits, and rate numerator/denominator; use shift/add choices for small constants and a small NSS multiplier. Form CBPS=NSD*BPSCS*NSS, then apply the specified DCM and coding-rate rules. Preserve rational precision until the spec's defined rounding point. For an exactly divisible C: half=C>>1; three-quarters=(C>>2)*3 when C is divisible by 4; two-thirds=2*(C/3) when divisible by 3; five-sixths=5*(C/6) when divisible by 6. Cancel denominator factors against NSD/BPSCS/NSS before multiplying. A small RU/MCS/DCM table of precomputed exact factors, or fixed reciprocal/shift/add division with proven correction, removes a runtime variable divider.

Width/spec trap: the exercise's unrestricted maximum CBPS is 3920*12*8=376320, requiring 19 bits; 16-bit outputs overflow. Also, its simplified formulas can yield fractions, e.g. 980*8*5/6. Resolve legality, units, and rounding against the golden reference rather than silently truncating. Reordering a truncating divide and NSS multiply is not generally equivalent.

Claude Answer

M4Q18 · B3. Estimate

  1. (5 min) Estimate. Estimate gate count for your structure (tables, multipliers, adders,
    muxes) and compare to the 9 k baseline. Which piece dominates?

Gemini Answer

GPT Answer

Estimate: replace a wide flat decoder with small tables, narrow constant arithmetic, and NSS scaling; for the 1x1 derivative, constant-propagate NSS=1. I would budget on the order of hundreds to a few thousand equivalent gates initially, then measure. Mux/arithmetic structure and library mapping decide the result; a precise gate count without synthesis would be invented.

Claude Answer

Piece Cells
Two ROMs + legality ~100
12×4 multiplier ~150–200
× (nss+1) shift-add, 19-bit ~150–200
×12R shift-add + rate mux ~120
DCM shift, /3 ROM variants, output mux ~60
Total ~600–700 vs 9k

The multiplier and the × nss adder chain dominate; the ROMs are noise. That is a ~92%
cut, consistent with the 80% I measured on the real block (which carries extra outputs).

M4Q19 · B4. Power

  1. (5 min) Power. This block is evaluated once per PPDU but sits in a clock-always-on
    region. Where does its power go, and what structural change gets you a large power
    reduction independent of the area reduction?

Gemini Answer

GPT Answer

Power: isolate or capture request inputs only when the block is invoked; hold them stable while idle. Gate pipeline registers with recognized enables/ICGs. An always-on clock region does not require the whole arithmetic cone to toggle continuously. Separate clock savings from area-related and operand-activity savings.

Claude Answer

Baseline burned power because mcs/nss/ru are shared registers that change every cycle
and 9k cells of glitchy SOP logic re-evaluated continuously. Structural fix: register the
inputs behind an ICG enabled by tx_start (or operand-isolate the cone) so the logic sees
one input change per PPDU and sits still otherwise. That is most of the 90%; the smaller,
shallower cone also has far less glitch power per evaluation.

M4Q20 · B5. Prove it

  1. (5 min) Prove it. How do you prove the factored version equals the table for every
    legal input and produces valid=0 for every illegal input? What tool, what runtime, and
    what do you do about LEC when the structure has totally changed?

Gemini Answer

GPT Answer

Proof: build a combinational miter over old/new outputs and legality. The raw input space is only 16*8*16*2=4096 combinations, so exhaustive evaluation is practical too. Compare valid on all inputs and numeric outputs where the contract defines them, including illegal-output behavior if specified. Use formal/LEC with output-level matching rather than requiring internal register correspondence. Runtime should be measured, not promised. Sequentially pipelined versions need latency-aware equivalence or a transaction scoreboard.

Claude Answer

M4Q21 · B6. Timing and reuse

  1. (5 min) Timing & reuse. The block's output now feeds the re-pipelined length-parameter
    path from round 02. Does your factored design fit in one 640 MHz cycle? If not, where do
    you cut? Can the same structure give you the reciprocal of N_DBPS for free?

Gemini Answer

GPT Answer

Timing/reuse: put rate/legality decode before arithmetic; cut between base-rate generation, NSS scaling, and quotient arithmetic as needed. Only synthesis and placement establish 640 MHz closure. The reciprocal is not free: a legal-divisor index can address a separate constant ROM, with additional area, precision, and timing cost.

Claude Answer

ROM (3 levels) → 12×4 mult (~12) → × nss adders (~10) → ×12R adder (~8) → mux: about
35 levels, marginal at 640 MHz (~30 budget). Cut after N_CBPS: stage 1 ROMs + multiply +
× nss, stage 2 rate scaling + legality + outputs. Reciprocal: 1/N_DBPS = 1/N_SD · 1/N_BPSCS · 1/(nss+1) · 1/R; the first three are tiny ROMs and 1/R is exact, so a second product
path gives a fixed-point reciprocal with two small multiplies — cheap, not free, and the
error compounds, so it needs ~2 guard bits per factor and relies on the ±1 correction
stage in the ceil-divide. That is the design I'd pair with round 02.

Part C — Your questions (0:55–1:00)

M4Q22 · C1. Questions for the interviewer

Gemini Answer

  1. "Does the synthesis flow here run power-aware optimization using real SAIF activity vectors from DV regressions, or vectorless estimation?"
  2. "How does the team balance module boundary preservation (for LEC/ECOs) against auto-ungrouping for PPA?"
  3. "What is the UPF power-domain partitioning across the MAC—is there an always-on beacon/TSF island separate from the main Tx/Rx power domain?"

GPT Answer

Which traffic traces drive power signoff? How are before/after PPA runs normalized? Who owns MAC UPF and the legal-rate golden tables?

Claude Answer

  1. Is there a SAIF-driven power flow at IP level, and which traffic profile is the
    reference for the MAC?
  2. Who owns UPF for the MAC, and at what stage is the domain partition frozen?
  3. How early is hierarchical vs. flat synthesis decided, and can an IP ask for a kept
    boundary for ECO reasons?